config

package
v0.0.0-...-bfdebff Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFiltersFromConfig

func ReadFiltersFromConfig(filtersConfig []YamlFilterConfig) ([]subscriptions.Filter, error)

Types

type CompiledConfig

type CompiledConfig struct {
	BrokerHost     string
	BrokerLogin    string
	BrokerPassword string
	Clients        []CompiledFiltersConfig
}

func ReadConfigFile

func ReadConfigFile(filename string) *CompiledConfig

type CompiledFiltersConfig

type CompiledFiltersConfig struct {
	Login         string
	Password      string
	BrokerFilters []subscriptions.Filter
	ClientFilters []subscriptions.Filter
}

type YamlFilterConfig

type YamlFilterConfig struct {
	Topic       string
	Template    string
	ValMap      map[string]string `yaml:"val_map"`
	ValRegex    string            `yaml:"val_regex"`
	ValTemplate string            `yaml:"val_template"`
}

type YamlFiltersConfig

type YamlFiltersConfig struct {
	BrokerFilters []YamlFilterConfig `yaml:"client_to_broker"`
	ClientFilters []YamlFilterConfig `yaml:"broker_to_client"`
}

type YamlMainConfig

type YamlMainConfig struct {
	BrokerHost     string `yaml:"broker_host"`
	BrokerLogin    string `yaml:"broker_login"`
	BrokerPassword string `yaml:"broker_password"`
	Clients        []struct {
		Login         string
		Password      string
		FiltersConfig string `yaml:"filters_config"`
	}
}

Jump to

Keyboard shortcuts

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