INNER CODE UNIT · Go
discoverNodeID
moleculer-go/moleculer · moleculer.go:267
func discoverNodeID() string {
hostname, err := os.Hostname()
if err != nil {
hostname = "node-" + util.RandomString(2)
}
return fmt.Sprint(hostname, "-", util.RandomString(5))
}
type RetryPolicy struct {
Enabled bool
Retries int
Delay int
MaxDelay int
Factor int
Check func(error) bool
}
type ActionHandler func(context Context, params Payload) interface{}