Documentation
¶
Index ¶
- func InitKafkaTopic(bootstrapUrl string, partitionNumber int, topics ...string) (err error)
- func NewKafkaReader(config configuration.Config, topic model.Topic, handler ReadHandler) (reader *kafka.Reader, err error)
- func NewKafkaWriter(config configuration.Config, topic model.Topic) *kafka.Writer
- type Bypass
- type BypassProvider
- type Com
- type Command
- type KafkaCom
- type KafkaComProvider
- type KeySeparationBalancer
- type Provider
- type ReadHandler
- type ResourcePermissions
- type Right
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitKafkaTopic ¶
func NewKafkaReader ¶
func NewKafkaReader(config configuration.Config, topic model.Topic, handler ReadHandler) (reader *kafka.Reader, err error)
func NewKafkaWriter ¶
func NewKafkaWriter(config configuration.Config, topic model.Topic) *kafka.Writer
Types ¶
type BypassProvider ¶
type BypassProvider struct{}
func NewBypassProvider ¶
func NewBypassProvider() *BypassProvider
func (*BypassProvider) Get ¶
func (this *BypassProvider) Get(config configuration.Config, topic model.Topic, readHandler ReadHandler) (Com, error)
type Command ¶
type Command struct { Command string `json:"command"` Id string `json:"id"` Rights *ResourcePermissions `json:"rights"` Owner string `json:"owner,omitempty"` }
type KafkaComProvider ¶
type KafkaComProvider struct{}
func NewKafkaComProvider ¶
func NewKafkaComProvider() *KafkaComProvider
func (*KafkaComProvider) Get ¶
func (this *KafkaComProvider) Get(config configuration.Config, topic model.Topic, readHandler ReadHandler) (result Com, err error)
type KeySeparationBalancer ¶
type KeySeparationBalancer struct { SubBalancer kafka.Balancer Seperator string }
func (*KeySeparationBalancer) Balance ¶
func (this *KeySeparationBalancer) Balance(msg kafka.Message, partitions ...int) (partition int)
type Provider ¶
type Provider interface {
Get(config configuration.Config, topic model.Topic, readHandler ReadHandler) (Com, error)
}
type ReadHandler ¶
type ResourcePermissions ¶
Click to show internal directories.
Click to hide internal directories.