Documentation ¶
Overview ¶
Package client is the kcl client, containing global options and a kgo.Client builder.
Index ¶
- func Strnorm(s string) string
- func Wizard(noHelp bool)
- type Cfg
- type CfgSASL
- type CfgTLS
- type Client
- func (c *Client) AddOpt(opt kgo.Opt)
- func (c *Client) AsJSON() bool
- func (c *Client) Client() *kgo.Client
- func (c *Client) DefaultCfgPath() string
- func (c *Client) DiskCfg() Cfg
- func (c *Client) GroupTransactSession() *kgo.GroupTransactSession
- func (c *Client) RemakeWithOpts(opts ...kgo.Opt) *kgo.Client
- func (c *Client) TimeoutMillis() int32
- type Requestor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cfg ¶
type Cfg struct { SeedBrokers []string `toml:"seed_brokers,omitempty"` TimeoutMillis int32 `toml:"timeout_ms,omitempty"` TLS *CfgTLS `toml:"tls,omitzero"` SASL *CfgSASL `toml:"sasl,omitempty"` }
cfg contains kcl options that can be defined in a file.
type CfgTLS ¶
type CfgTLS struct { CACert string `toml:"ca_cert_path,omitempty"` ClientCertPath string `toml:"client_cert_path,omitempty"` ClientKeyPath string `toml:"client_key_path,omitempty"` ServerName string `toml:"server_name,omitempty"` InsecureSkipVerify bool `toml:"insecure,omitempty"` MinVersion string `toml:"min_version,omitempty"` CipherSuites []string `toml:"cipher_suites"` CurvePreferences []string `toml:"curve_preferences"` }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client contains kgo client options and a kgo client.
func New ¶
New returns a new Client with the given config and installs some persistent flags and commands to root.
func (*Client) Client ¶
Client returns a new kgo.Client using all buffered options.
This can only be used once.
func (*Client) DefaultCfgPath ¶
DefaultCfgPath returns the default path that is used to load configs.
func (*Client) GroupTransactSession ¶ added in v0.4.0
func (c *Client) GroupTransactSession() *kgo.GroupTransactSession
GroupTransactSession returns a new kgo.GroupTransactSession using all buffered options.
This can only be used once, and is incompatible with the Client function.
func (*Client) RemakeWithOpts ¶ added in v0.1.1
RemakeWithOpts remakes the client with additional opts added. The opts are not persisted to the overall Client opts, but the created client does persist. This is not concurrent safe.
func (*Client) TimeoutMillis ¶
TimeoutMillis is what requests that have timeouts should use.