Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { Topic() string Publish(ctx context.Context, value []byte, key []byte) error PublishWithoutKey(ctx context.Context, value []byte) error PublishWithEvent(ctx context.Context, value []byte, key []byte, event chan kafka.Event) error PublishRaw(ctx context.Context, msg *kafka.Message, event chan kafka.Event) error Close() }
type Config ¶
type Config struct { Topic string `json:"topic"` BootstrapServers string `json:"bootstrap.servers"` SecurityProtocol string `json:"security.protocol"` SslCaLocation string `json:"ssl.ca.location"` SaslMechanism string `json:"sasl.mechanism"` SaslUsername string `json:"sasl.username"` SaslPassword string `json:"sasl.password"` ConfigMap map[string]kafka.ConfigValue `json:"config.map"` }
type EventHandlerFunc ¶
type Option ¶
type Option func(opts *Options)
func EventHandler ¶
func EventHandler(handler EventHandlerFunc) Option
type Options ¶
type Options struct { Topic string EventHandler EventHandlerFunc IsDebug bool }
Click to show internal directories.
Click to hide internal directories.