update for latest micro
Some checks failed
coverage / build (push) Successful in 3m22s
test / test (push) Failing after 19m17s

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2025-06-09 17:27:45 +03:00
parent eb56a48dda
commit fe81a14413
4 changed files with 25 additions and 17 deletions

View File

@@ -27,11 +27,11 @@ func SubscribeContext(ctx context.Context) broker.SubscribeOption {
return broker.SetSubscribeOption(subscribeContextKey{}, ctx)
}
type publishKey struct{}
type messageKey struct{}
// PublishKey set the kafka message key (broker option)
func PublishKey(key []byte) broker.PublishOption {
return broker.SetPublishOption(publishKey{}, key)
// MessageKey set the kafka message key (broker option)
func MessageKey(key []byte) broker.MessageOption {
return broker.SetMessageOption(messageKey{}, key)
}
type optionsKey struct{}
@@ -103,11 +103,11 @@ func SubscribeFatalOnError(b bool) broker.SubscribeOption {
return broker.SetSubscribeOption(fatalOnErrorKey{}, b)
}
type publishPromiseKey struct{}
type messagePromiseKey struct{}
// PublishPromise set the kafka promise func for Produce
func PublishPromise(fn func(*kgo.Record, error)) broker.PublishOption {
return broker.SetPublishOption(publishPromiseKey{}, fn)
// MessagePromise set the kafka promise func for Produce
func MessagePromise(fn func(*kgo.Record, error)) broker.MessageOption {
return broker.SetMessageOption(messagePromiseKey{}, fn)
}
type subscribeMessagePoolKey struct{}