Documentation
¶
Index ¶
Constants ¶
View Source
const (
ProviderName = "kafka"
)
Variables ¶
This section is empty.
Functions ¶
func NewSubscriber ¶
func NewSubscriber(opts *subscribe.NewSubscriberOptions) (subscribe.Subscriber, error)
NewSubscriber creates a new kafka subscriber
Types ¶
type Config ¶
type Config struct { Brokers []string `yaml:"brokers" json:"brokers"` GroupID string `yaml:"group_id" json:"group_id"` Version string `yaml:"version" json:"version"` CleanupGroup bool `yaml:"cleanup_group" json:"cleanup_group"` }
Config provides configuration to the subscriber
type Subscriber ¶
type Subscriber struct {
// contains filtered or unexported fields
}
Subscriber implements the Subscriber interface for kafka
func (*Subscriber) Connect ¶
func (s *Subscriber) Connect(ctx context.Context) error
Connect connects to kafka
func (*Subscriber) Disconnect ¶
func (s *Subscriber) Disconnect(ctx context.Context) error
Disconnect disconnects from kafka
func (*Subscriber) Subscribe ¶
func (s *Subscriber) Subscribe(ctx context.Context) error
Subscribe subscribes to bundle updates
func (*Subscriber) Unsubscribe ¶
func (s *Subscriber) Unsubscribe(ctx context.Context) error
Unsubscribe unsubscribes from bundle updates
Click to show internal directories.
Click to hide internal directories.