config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	Name              string   `yaml:"name,omitempty"`
	Brokers           []string `yaml:"brokers,omitempty"`
	Version           string   `yaml:"version,omitempty"`
	SASL              *SASL    `yaml:"sasl,omitempty"`
	TLS               *TLS     `yaml:"tls,omitempty"`
	SecurityProtocol  string   `yaml:"security_protocol,omitempty"`
	SchemaRegistryURL string   `yaml:"schema_registry_url,omitempty"`
}

func (Cluster) GetName added in v0.1.0

func (c Cluster) GetName() string

type Configuration added in v0.1.0

type Configuration struct {
	CurrentCluster string    `yaml:"current_cluster"`
	Clusters       []Cluster `yaml:"clusters"`
	Topics         []Topic   `yaml:"topics"`
}

func (*Configuration) GetClusterByName added in v0.1.0

func (c *Configuration) GetClusterByName(name string) (Cluster, bool)

func (*Configuration) GetCurrentCluster added in v0.1.0

func (c *Configuration) GetCurrentCluster() Cluster

func (*Configuration) GetTopicByName added in v0.1.0

func (c *Configuration) GetTopicByName(name string) (Topic, bool)

func (*Configuration) SetCluster added in v0.1.0

func (c *Configuration) SetCluster(cluster Cluster)

func (*Configuration) SetCurrentCluster added in v0.1.0

func (c *Configuration) SetCurrentCluster(name string) bool

func (*Configuration) SetTopic added in v0.1.0

func (c *Configuration) SetTopic(topic Topic)

type Encoding

type Encoding string
const (
	MSGPack  Encoding = "msgpack"
	Protobuf Encoding = "protobuf"
	Avro     Encoding = "avro"
	RAW      Encoding = "raw"
	Base64   Encoding = "base64"
)

type SASL added in v0.1.0

type SASL struct {
	Mechanism    string `yaml:"mechanism,omitempty"`
	Username     string `yaml:"username,omitempty"`
	Password     string `yaml:"password,omitempty"`
	ClientID     string `yaml:"client_id,omitempty"`
	ClientSecret string `yaml:"client_secret,omitempty"`
	TokenURL     string `yaml:"token_url,omitempty"`
	Token        string `yaml:"token,omitempty"`
}

type TLS added in v0.1.0

type TLS struct {
	Cafile        string `yaml:"cafile,omitempty"`
	Clientfile    string `yaml:"clientfile,omitempty"`
	Clientkeyfile string `yaml:"clientkeyfile,omitempty"`
	Insecure      bool   `yaml:"insecure,omitempty"`
}

type Topic

type Topic struct {
	Name              string   `yaml:"name"`
	Encoding          Encoding `yaml:"encoding,omitempty"`
	ProtoType         string   `yaml:"proto_type,omitempty"`
	ProtoPaths        []string `yaml:"proto_paths,omitempty"`
	ProtoExcludePaths []string `yaml:"proto_exclude_paths,omitempty"`
	AvroSchemaURL     string   `yaml:"avro_schema_url,omitempty"`
	AvroSchemaID      int      `yaml:"avro_schema_id,omitempty"`
}

func (Topic) GetName added in v0.1.0

func (t Topic) GetName() string

Jump to

Keyboard shortcuts

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