configuration

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AvroGenConfiguration

type AvroGenConfiguration struct {
	// raw avro schema
	Schema SchemaConfiguration
	// schema name only works if the schema registry is configured
	SchemaName string `yaml:"schemaName"`
	// list of generators available
	// in the rules
	Generators map[string]string
	// set of rules to customize the
	// avro generation
	GenerationRules map[string]string `yaml:"generationRules"`
}

type Configuration

type Configuration struct {
	Kafka     KafkaConfiguration
	Producers []ProducerConfiguration
}

func LoadConfiguration

func LoadConfiguration(fileName string) (*Configuration, error)

Load the configuration from the provided yaml file path

type KafkaConfiguration

type KafkaConfiguration struct {
	ClusterEndpoint string                      `yaml:"clusterEndpoint"`
	SchemaRegistry  SchemaRegistryConfiguration `yaml:"schemaRegistry"`
	Security        Security
	Sasl            SaslConfiguration `yaml:"sasl"`
}

type ProducerConfiguration

type ProducerConfiguration struct {
	Name             string
	NumberOfMessages int `yaml:"numberOfMessages"`
	Avro             AvroGenConfiguration
	Topic            string `yaml:"topic"`
}

type SaslConfiguration

type SaslConfiguration struct {
	Username string
	Password string
}

type SchemaConfiguration

type SchemaConfiguration struct {
	Id  int
	Raw string
}

type SchemaRegistryConfiguration

type SchemaRegistryConfiguration struct {
	Endpoint string
	Username string
	Password string
}

type Security

type Security string
const (
	None Security = "none"
	Sasl Security = "sasl"
	MTLS Security = "mtls"
)

Jump to

Keyboard shortcuts

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