Documentation
¶
Overview ¶
Package client is the kcl client, containing global options and a kgo.Client builder.
Index ¶
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,omitempty"` SASL *CfgSASL `toml:"sasl,omitempty"` }
cfg contains kcl options that can be defined in a file.
type CfgSASL ¶
type CfgSASL struct { Method string `toml:"method,omitempty"` Zid string `toml:"zid,omitempty"` User string `toml:"user,omitempty"` Pass string `toml:"pass,omitempty"` IsToken bool `toml:"is_token,omitempty"` AccessKey string `toml:"access_key,omitempty"` SecretKey string `toml:"secret_key,omitempty"` }
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"` 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) 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.