client: add context publish option (#1588)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
da66561d1e
commit
06220ab8c8
@ -252,6 +252,13 @@ func WithExchange(e string) PublishOption {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PublishContext sets the context in publish options
|
||||||
|
func PublishContext(ctx context.Context) PublishOption {
|
||||||
|
return func(o *PublishOptions) {
|
||||||
|
o.Context = ctx
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// WithAddress sets the remote addresses to use rather than using service discovery
|
// WithAddress sets the remote addresses to use rather than using service discovery
|
||||||
func WithAddress(a ...string) CallOption {
|
func WithAddress(a ...string) CallOption {
|
||||||
return func(o *CallOptions) {
|
return func(o *CallOptions) {
|
||||||
|
Loading…
Reference in New Issue
Block a user