Documentation
¶
Index ¶
- type ConfigEntity
- type ConsumptionEntity
- type CoreEntity
- func (core *CoreEntity) Cli() *kafka.Client
- func (core *CoreEntity) Conn() *kafka.Dialer
- func (core *CoreEntity) Consumption(config *ConsumptionEntity)
- func (core *CoreEntity) InitTopics(topics []string)
- func (core *CoreEntity) Production(topic string, message []kafka.Message)
- func (core *CoreEntity) Topic(key string) *kafka.Writer
- func (core *CoreEntity) Uninstall()
- type TLSEntity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigEntity ¶
type ConfigEntity struct { Tls TLSEntity `json:"tls" bson:"tls" yaml:"tls" mapstructure:"tls"` Account string `json:"account" bson:"account" yaml:"account" mapstructure:"account"` Password string `json:"password" bson:"password" yaml:"password" mapstructure:"password"` Address []string `json:"address" yaml:"address" mapstructure:"address"` MaxRetry uint `json:"max_retry" yaml:"max_retry" mapstructure:"max_retry"` }
type ConsumptionEntity ¶
type CoreEntity ¶
type CoreEntity struct {
// contains filtered or unexported fields
}
func New ¶
func New(logger *zap.Logger, config *ConfigEntity) (*CoreEntity, error)
func (*CoreEntity) Cli ¶
func (core *CoreEntity) Cli() *kafka.Client
func (*CoreEntity) Conn ¶
func (core *CoreEntity) Conn() *kafka.Dialer
func (*CoreEntity) Consumption ¶
func (core *CoreEntity) Consumption(config *ConsumptionEntity)
func (*CoreEntity) InitTopics ¶
func (core *CoreEntity) InitTopics(topics []string)
func (*CoreEntity) Production ¶
func (core *CoreEntity) Production(topic string, message []kafka.Message)
func (*CoreEntity) Topic ¶
func (core *CoreEntity) Topic(key string) *kafka.Writer
func (*CoreEntity) Uninstall ¶
func (core *CoreEntity) Uninstall()
type TLSEntity ¶
type TLSEntity struct { CaCert string `json:"ca_cert" bson:"ca_cert" yaml:"ca_cert" mapstructure:"ca_cert"` ClientCert string `json:"client_cert" bson:"client_cert" yaml:"client_cert" mapstructure:"client_cert"` ClientCertKey string `json:"client_cert_key" bson:"client_cert_key" yaml:"client_cert_key" mapstructure:"client_cert_key"` }
Click to show internal directories.
Click to hide internal directories.