Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AWSDefaultConfigLoader = awsconfig.LoadDefaultConfig SNSTopicResolverFactory = sns.NewGenerateArnTopicResolver SNSPublisherFactory = func(cfg sns.PublisherConfig, logger watermill.LoggerAdapter) (message.Publisher, error) { return sns.NewPublisher(cfg, logger) } SNSSubscriberFactory = func(cfg sns.SubscriberConfig, sqsCfg sqs.SubscriberConfig, logger watermill.LoggerAdapter) (message.Subscriber, error) { return sns.NewSubscriber(cfg, sqsCfg, logger) } )
View Source
var ( KafkaPublisherFactory = func(cfg kafka.PublisherConfig, logger watermill.LoggerAdapter) (message.Publisher, error) { return kafka.NewPublisher(cfg, logger) } KafkaSubscriberFactory = func(cfg kafka.SubscriberConfig, logger watermill.LoggerAdapter) (message.Subscriber, error) { return kafka.NewSubscriber(cfg, logger) } )
View Source
var ( AmqpConnectionFactory = func(cfg amqp.ConnectionConfig, logger watermill.LoggerAdapter) (*amqp.ConnectionWrapper, error) { return amqp.NewConnection(cfg, logger) } AmqpPublisherFactory = func(cfg amqp.Config, logger watermill.LoggerAdapter, conn *amqp.ConnectionWrapper) (message.Publisher, error) { return amqp.NewPublisherWithConnection(cfg, logger, conn) } AmqpSubscriberFactory = func(cfg amqp.Config, logger watermill.LoggerAdapter, conn *amqp.ConnectionWrapper) (message.Subscriber, error) { return amqp.NewSubscriberWithConnection(cfg, logger, conn) } )
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory interface {
Build(ctx context.Context, conf *config.Config, logger watermill.LoggerAdapter) (Transport, error)
}
Factory abstracts how Protoflow initialises message transports.
func DefaultFactory ¶
func DefaultFactory() Factory
DefaultFactory returns the built-in transport factory that knows how to initialise Kafka, RabbitMQ, and AWS SNS/SQS transports.
Click to show internal directories.
Click to hide internal directories.