add context in server handler option

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2020-09-11 11:55:31 +03:00
parent 5bfca99627
commit 2d1e6db9fd

View File

@ -7,10 +7,11 @@ type HandlerOption func(*HandlerOptions)
type HandlerOptions struct { type HandlerOptions struct {
Internal bool Internal bool
Metadata map[string]map[string]string Metadata map[string]map[string]string
Context context.Context
} }
func NewHandlerOptions() HandlerOptions { func NewHandlerOptions() HandlerOptions {
return HandlerOptions{} return HandlerOptions{Context: context.Background()}
} }
type SubscriberOption func(*SubscriberOptions) type SubscriberOption func(*SubscriberOptions)