Documentation
¶
Index ¶
- Constants
- func RegisterSubscriber[T any](srv *Server, ctx context.Context, topic, queue string, disableAutoAck bool, ...) error
- type Server
- type ServerOption
- func WithAddress(addrs []string) ServerOption
- func WithBrokerOptions(opts ...broker.Option) ServerOption
- func WithCodec(c string) ServerOption
- func WithEnableKeepAlive(enable bool) ServerOption
- func WithGlobalPropagator() ServerOption
- func WithGlobalTracerProvider() ServerOption
- func WithPlainMechanism(username, password string) ServerOption
- func WithPropagator(propagators propagation.TextMapPropagator) ServerOption
- func WithTracerProvider(provider trace.TracerProvider, tracerName string) ServerOption
- type SubscribeOption
- type SubscribeOptionMap
- type SubscriberMap
- type Transport
Constants ¶
View Source
const (
KindKafka transport.Kind = "kafka"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Server ¶
func NewServer ¶
func NewServer(opts ...ServerOption) *Server
func (*Server) RegisterSubscriber ¶
func (s *Server) RegisterSubscriber(ctx context.Context, topic, queue string, disableAutoAck bool, handler broker.Handler, binder broker.Binder, opts ...broker.SubscribeOption) error
RegisterSubscriber registers a subscriber @param ctx is the context @param topic is Subscribe topics @param queue is Subscribe group @param handler is Subscriber handler
type ServerOption ¶
type ServerOption func(o *Server)
func WithBrokerOptions ¶
func WithBrokerOptions(opts ...broker.Option) ServerOption
WithBrokerOptions .
func WithEnableKeepAlive ¶ added in v2.0.5
func WithEnableKeepAlive(enable bool) ServerOption
WithEnableKeepAlive enable keep alive
func WithGlobalTracerProvider ¶
func WithGlobalTracerProvider() ServerOption
WithGlobalTracerProvider .
func WithPlainMechanism ¶
func WithPlainMechanism(username, password string) ServerOption
WithPlainMechanism .
func WithPropagator ¶
func WithPropagator(propagators propagation.TextMapPropagator) ServerOption
WithPropagator .
func WithTracerProvider ¶
func WithTracerProvider(provider trace.TracerProvider, tracerName string) ServerOption
WithTracerProvider .
type SubscribeOption ¶
type SubscribeOption struct {
// contains filtered or unexported fields
}
type SubscribeOptionMap ¶
type SubscribeOptionMap map[string]*SubscribeOption
type SubscriberMap ¶
type SubscriberMap map[string]broker.Subscriber
type Transport ¶
type Transport struct {
// contains filtered or unexported fields
}
Transport is a Kafka transport.
func (*Transport) NodeFilters ¶
func (tr *Transport) NodeFilters() []selector.NodeFilter
NodeFilters returns the client select filters.
func (*Transport) ReplyHeader ¶
ReplyHeader returns the reply header.
func (*Transport) RequestHeader ¶
RequestHeader returns the request header.
Click to show internal directories.
Click to hide internal directories.