Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Admin ¶
type Admin struct { BootstrapServers []string ClientId string SecurityProtocol string Tls *Tls CreateTopicTimeout time.Duration `default:"15s"` }
func (Admin) GetClientId ¶
func (Admin) GetSecurityProtocol ¶
type Client ¶
type Client struct { Version string `default:"2.1.1"` BootstrapServers []string `default:"[\"localhost:9092\"]"` SecurityProtocol string // TLS ClientId string Debug bool Tls *Tls Admin Admin Producer Producer Consumer Consumer }
func (*Client) PostBinding ¶
type Consumer ¶
type Consumer struct { BootstrapServers []string ClientId string SecurityProtocol string Tls *Tls InitialOffset int64 `default:"-1"` // -1: Newest, -2: Oldest CommitMode string `default:"AUTO_COMMIT_INTERVAL" validate:"required=false,oneof=AUTO_COMMIT_INTERVAL AUTO_COMMIT_IMMEDIATELY"` }
func (Consumer) GetClientId ¶
func (Consumer) GetSecurityProtocol ¶
type EventProducer ¶
type EventProducer struct {
EventMappings map[string]EventTopic
}
func NewEventProducer ¶
func NewEventProducer(loader config.Loader) (*EventProducer, error)
func (EventProducer) Prefix ¶
func (p EventProducer) Prefix() string
type EventTopic ¶
type KafkaConsumer ¶
type KafkaConsumer struct {
HandlerMappings map[string]TopicConsumer
}
func NewKafkaConsumer ¶
func NewKafkaConsumer(loader config.Loader) (*KafkaConsumer, error)
func (KafkaConsumer) Prefix ¶
func (c KafkaConsumer) Prefix() string
type Producer ¶
type Producer struct { BootstrapServers []string ClientId string SecurityProtocol string Tls *Tls FlushMessages int `default:"1"` FlushFrequency time.Duration `default:"1s"` }
func (Producer) GetClientId ¶
func (Producer) GetSecurityProtocol ¶
type TopicAdmin ¶
type TopicAdmin struct {
Topics []core.TopicConfiguration
}
func NewTopicAdmin ¶
func NewTopicAdmin(loader config.Loader) (*TopicAdmin, error)
func (TopicAdmin) Prefix ¶
func (h TopicAdmin) Prefix() string
type TopicConsumer ¶
type TopicConsumer struct { // Enable or disable this consumer Enable bool // Topic field is high priority than Topics. // When Topic is provided, Topics will be ignored. Topic string // Topics field is lower priority than Topic. // When Topic is provided, Topics will be ignored. Topics []string // GroupId of consumer GroupId string // TODO implement it Concurrency int }
Click to show internal directories.
Click to hide internal directories.