Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthConfig ¶
type AuthConfig struct { TLS struct { // Whether to use TLS when connecting to the broker // (defaults to false). Enabled bool `mapstructure:"enabled"` // controls whether a client verifies the server's certificate chain and host name // defaults to false InsecureSkipVerify bool `mapstructure:"insecure_skip_verify"` // certificate file for client authentication CertFile string `mapstructure:"cert_file"` // key file for client authentication KeyFile string `mapstructure:"key_file"` // certificate authority file for TLS client authentication CAFile string `mapstructure:"ca_file"` } `mapstructure:"tls"` SASL struct { Enabled bool `mapstructure:"enabled"` Mechanism string `mapstructure:"mechanism"` } }
type Config ¶
type Config struct { Broker string `mapstructure:"broker" validate:"required"` Auth AuthConfig `mapstructure:"auth_config"` }
Config holds the set of configuration for the kafka extractor
type Extractor ¶
type Extractor struct { plugins.BaseExtractor // contains filtered or unexported fields }
Extractor manages the extraction of data from a kafka broker
type KubernetesTokenProvider ¶ added in v0.10.5
type KubernetesTokenProvider struct {
// contains filtered or unexported fields
}
func NewKubernetesTokenProvider ¶ added in v0.10.5
func NewKubernetesTokenProvider(opts ...TokenProviderOption) *KubernetesTokenProvider
NewKubernetesTokenProvider creates a new TokenProvider that reads the token from kubernetes pod service account token file. By default, the token file path for kafka is stored in `/var/run/secrets/kafka/serviceaccount/token`. User need to make sure there a valid projected service account token on that path.
func (*KubernetesTokenProvider) Token ¶ added in v0.10.5
func (tp *KubernetesTokenProvider) Token() (*sarama.AccessToken, error)
Token returns the token from the service account token file.
type TokenProviderOption ¶ added in v0.10.5
type TokenProviderOption func(*TokenProviderOptions)
func WithTokenFilePath ¶ added in v0.10.5
func WithTokenFilePath(path string) TokenProviderOption
WithTokenFilePath sets the file path to the token.
type TokenProviderOptions ¶ added in v0.10.5
type TokenProviderOptions struct { // FilePath is the path to the file containing the token. FilePath string }
Click to show internal directories.
Click to hide internal directories.