update to v4
All checks were successful
test / test (push) Successful in 3m29s

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2025-03-12 16:57:25 +03:00
parent f4f8793686
commit ac454693a6
12 changed files with 240 additions and 300 deletions

View File

@@ -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)
}