internal

package
v5.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAvroSchemaRegistryClient added in v5.1.0

func CreateAvroSchemaRegistryClient(context *ClientContext) (srclient.ISchemaRegistryClient, error)

func CreateClient

func CreateClient(context *ClientContext) (sarama.Client, error)

func CreateClientConfig

func CreateClientConfig(context *ClientContext) (*sarama.Config, error)

func CreateClusterAdmin

func CreateClusterAdmin(context *ClientContext) (sarama.ClusterAdmin, error)

func GetClientID

func GetClientID(context *ClientContext, defaultPrefix string) string

func TopicExists

func TopicExists(client *sarama.Client, name string) (bool, error)

Types

type AvroConfig added in v5.2.0

type AvroConfig struct {
	SchemaRegistry string
	JSONCodec      avro.JSONCodec
	RequestTimeout time.Duration
	TLS            TLSConfig
	Username       string
	Password       string
}

type ClientContext

type ClientContext struct {
	Name           string
	Brokers        []string
	TLS            TLSConfig
	Sasl           SaslConfig
	Kubernetes     K8sConfig
	RequestTimeout time.Duration
	ClientID       string
	KafkaVersion   sarama.KafkaVersion
	Avro           AvroConfig
	Protobuf       protobuf.SearchContext
	Producer       ProducerConfig
	Consumer       ConsumerConfig
}

func CreateClientContext

func CreateClientContext() (ClientContext, error)

type Config

type Config struct {
	Name  string
	Value string
}

func ListConfigs

func ListConfigs(admin *sarama.ClusterAdmin, resource sarama.ConfigResource, includeDefaults bool) ([]Config, error)

type ConsumerConfig

type ConsumerConfig struct {
	IsolationLevel string
}

type DocsFlags

type DocsFlags struct {
	Directory  string
	DocType    string
	SinglePage bool
}

type DocsOperation

type DocsOperation struct {
}

func (*DocsOperation) GenerateDocs

func (operation *DocsOperation) GenerateDocs(rootCmd *cobra.Command, flags DocsFlags) error

type K8sConfig

type K8sConfig struct {
	Enabled         bool
	Binary          string
	KubeConfig      string
	KubeContext     string
	Namespace       string
	Image           string
	ImagePullSecret string
	ServiceAccount  string
	KeepPod         bool
	Labels          map[string]string
	Annotations     map[string]string
	NodeSelector    map[string]string
	Affinity        map[string]any
	Tolerations     []K8sToleration
}

type K8sToleration added in v5.3.0

type K8sToleration struct {
	Key      string `json:"key" yaml:"key"`
	Operator string `json:"operator" yaml:"operator"`
	Value    string `json:"value" yaml:"value"`
	Effect   string `json:"effect" yaml:"effect"`
}

type ProducerConfig

type ProducerConfig struct {
	Partitioner     string
	RequiredAcks    string
	MaxMessageBytes int
}

type SaslConfig

type SaslConfig struct {
	Enabled       bool
	Username      string
	Password      string
	Mechanism     string
	TokenProvider TokenProvider
}

type TLSConfig

type TLSConfig struct {
	Enabled  bool
	CA       string
	Cert     string
	CertKey  string
	Insecure bool
}

type TokenProvider

type TokenProvider struct {
	PluginName string
	Options    map[string]any
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL