Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
13
options.go
13
options.go
@@ -5,8 +5,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/twmb/franz-go/pkg/kgo"
|
||||
"go.unistack.org/micro/v3/broker"
|
||||
"go.unistack.org/micro/v3/client"
|
||||
"go.unistack.org/micro/v4/broker"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -35,11 +34,6 @@ func PublishKey(key []byte) broker.PublishOption {
|
||||
return broker.SetPublishOption(publishKey{}, key)
|
||||
}
|
||||
|
||||
// ClientPublishKey set the kafka message key (client option)
|
||||
func ClientPublishKey(key []byte) client.PublishOption {
|
||||
return client.SetPublishOption(publishKey{}, key)
|
||||
}
|
||||
|
||||
type optionsKey struct{}
|
||||
|
||||
// Options pass additional options to broker
|
||||
@@ -115,8 +109,3 @@ type publishPromiseKey struct{}
|
||||
func PublishPromise(fn func(*kgo.Record, error)) broker.PublishOption {
|
||||
return broker.SetPublishOption(publishPromiseKey{}, fn)
|
||||
}
|
||||
|
||||
// ClientPublishKey set the kafka message key (client option)
|
||||
func ClientPublishPromise(fn func(*kgo.Record, error)) client.PublishOption {
|
||||
return client.SetPublishOption(publishPromiseKey{}, fn)
|
||||
}
|
||||
|
Reference in New Issue
Block a user