add server Context option to pass own context
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
		| @@ -126,18 +126,21 @@ func Context(ctx context.Context) Option { | ||||
| 	} | ||||
| } | ||||
|  | ||||
| // Registry used for discovery | ||||
| func Registry(r registry.Registry) Option { | ||||
| 	return func(o *Options) { | ||||
| 		o.Registry = r | ||||
| 	} | ||||
| } | ||||
|  | ||||
| // Register the service with a TTL | ||||
| func RegisterTTL(t time.Duration) Option { | ||||
| 	return func(o *Options) { | ||||
| 		o.RegisterTTL = t | ||||
| 	} | ||||
| } | ||||
|  | ||||
| // Register the service with at interval | ||||
| func RegisterInterval(t time.Duration) Option { | ||||
| 	return func(o *Options) { | ||||
| 		o.RegisterInterval = t | ||||
|   | ||||
		Reference in New Issue
	
	Block a user