Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) Close() error
- func (c *Client) DefaultConfig() string
- func (c *Client) Description() string
- func (c *Client) GetConnectedClient() interface{}
- func (c *Client) Name() string
- func (c *Client) Prepare() error
- func (c *Client) RegisterListener(listener chan<- api.ClientStatus)
- func (c *Client) ShowName() string
- func (c *Client) Start() error
Constants ¶
View Source
const ( Name = "kafka-client" ShowName = "Kafka Client" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { config.CommonFields Brokers string `mapstructure:"brokers"` // The Kafka broker addresses (default `localhost:9092`). Version string `mapstructure:"version"` // The version should follow this pattern, which is `major.minor.veryMinor.patch`. EnableTLS bool `mapstructure:"enable_TLS"` // The TLS switch (default false). ClientPemPath string `mapstructure:"client_pem_path"` // The file path of client.pem. The config only works when opening the TLS switch. ClientKeyPath string `mapstructure:"client_key_path"` // The file path of client.key. The config only works when opening the TLS switch. CaPemPath string `mapstructure:"ca_pem_path"` // The file path oca.pem. The config only works when opening the TLS switch. RequiredAcks int16 `mapstructure:"required_acks"` // 0 means NoResponse, 1 means WaitForLocal and -1 means WaitForAll (default 1). ProducerMaxRetry int `mapstructure:"producer_max_retry"` // The producer max retry times (default 3). MetaMaxRetry int `mapstructure:"meta_max_retry"` // The meta max retry times (default 3). RetryBackoff int `mapstructure:"retry_backoff"` // How long to wait for the cluster to settle between retries (default 100ms). MaxMessageBytes int `mapstructure:"max_message_bytes"` // The max message bytes. IdempotentWrites bool `mapstructure:"idempotent_writes"` // Ensure that exactly one copy of each message is written when is true. ClientID string `mapstructure:"client_id"` // A user-provided string sent with every request to the brokers. CompressionCodec int `mapstructure:"compression_codec"` // Represents the various compression codecs recognized by Kafka in messages. RefreshPeriod int `mapstructure:"refresh_period"` // How frequently to refresh the cluster metadata. InsecureSkipVerify bool `mapstructure:"insecure_skip_verify"` // Controls whether a client verifies the server's certificate chain and host name. // contains filtered or unexported fields }
func (*Client) DefaultConfig ¶
func (*Client) Description ¶
func (*Client) GetConnectedClient ¶
func (c *Client) GetConnectedClient() interface{}
func (*Client) RegisterListener ¶
func (c *Client) RegisterListener(listener chan<- api.ClientStatus)
Click to show internal directories.
Click to hide internal directories.