add context in server handler option
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
5bfca99627
commit
2d1e6db9fd
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user