Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct { SubscriberFactory SubscriberFactory Publisher message.Publisher }
func Kafka ¶
func Kafka( brokers []string, subscriberConfigTemplate kafka.SubscriberConfig, publisherConfigTemplate kafka.PublisherConfig, logger *slog.Logger, ) (Agent, error)
func Nats ¶
func Nats( url string, subscriberConfigTemplate nats.SubscriberConfig, publisherConfigTemplate nats.PublisherConfig, logger *slog.Logger, ) (Agent, error)
func Redis ¶
func Redis( client redis.UniversalClient, subscriberConfigTemplate redisstream.SubscriberConfig, publisherConfigTemplate redisstream.PublisherConfig, ) (Agent, error)
type Broker ¶
type Broker[Item any] struct { Agent Agent ItemCodec codec.Codec[Item, []byte] Logger *slog.Logger ConsumerChannelBufferSize int }
type FunctionalSubscriberFactory ¶
type FunctionalSubscriberFactory func( ctx context.Context, settings broker.ConsumerSettings, ) (message.Subscriber, error)
func (FunctionalSubscriberFactory) New ¶
func (f FunctionalSubscriberFactory) New(ctx context.Context, settings broker.ConsumerSettings) (message.Subscriber, error)
type SubscriberFactory ¶
type SubscriberFactory interface {
New(ctx context.Context, settings broker.ConsumerSettings) (message.Subscriber, error)
}
Click to show internal directories.
Click to hide internal directories.