Documentation ¶
Index ¶
- Constants
- Variables
- func CompileRegex(s string) (*regexp.Regexp, error)
- func DecodeConfig(config any, configJson []byte) error
- func GetKafkaClientOptions(c KafkaClientConfig, l *zap.Logger) []kgo.Opt
- func ListToMap(a []string) map[string]bool
- func Parse(ptr any, values map[string]int) error
- func ParseChild(parent reflect.Value, v reflect.Value, values map[string]int) error
- func ParseField(v reflect.Value, vField reflect.Value, tField *reflect.StructField, ...) error
- func ParseFieldSelector(selector string) []string
- func ParseSlice(v reflect.Value, values map[string]int) error
- func SetDefaultValues(data interface{}) error
- func VerifyGroupNumbers(groups []int, totalGroups int, logger *zap.Logger) []int
- type Base8
- type Config
- type Duration
- type Expression
- type FieldSelector
- type KafkaClientConfig
- type KafkaClientSaslConfig
- type KafkaClientSslConfig
- type ListMap
- type MetaTemplates
- type PipelineConfig
- type Regexp
- type VaultConfig
Constants ¶
Variables ¶
View Source
var DataUnitAliases = map[string]int{ "kb": KB, "kib": KiB, "mb": MB, "mib": MiB, "gb": GB, "gib": GiB, "tb": TB, "tib": TiB, "pb": PB, "pib": PiB, "b": B, }
DataUnitAliases is map to add alias. Alias must not contain space Only lowercase letters should be used in the map, but aliases are case-insensitive
Functions ¶
func DecodeConfig ¶ added in v0.18.0
func GetKafkaClientOptions ¶ added in v0.29.0
func GetKafkaClientOptions(c KafkaClientConfig, l *zap.Logger) []kgo.Opt
func ParseChild ¶
it isn't just a recursion it also captures values with the same name from parent i.e. take this config:
{ "T": 10, "Child": { // has `child:true` in a tag "T": null } }
this function will set `config.Child.T = config.T` see file.d/cfg/config_test.go:TestHierarchy for an example
func ParseField ¶
func ParseFieldSelector ¶
func ParseSlice ¶
ParseSlice recursively parses elements of an slice calls Parse, not ParseChild (!)
func SetDefaultValues ¶ added in v0.18.0
func SetDefaultValues(data interface{}) error
Types ¶
type Config ¶
type Config struct { Vault VaultConfig Pipelines map[string]*PipelineConfig }
func NewConfigFromFile ¶
type Expression ¶
type Expression string
func (*Expression) UnmarshalJSON ¶ added in v0.8.9
func (e *Expression) UnmarshalJSON(raw []byte) error
type FieldSelector ¶
type FieldSelector string
type KafkaClientConfig ¶ added in v0.29.0
type KafkaClientConfig interface { GetBrokers() []string GetClientID() string IsSaslEnabled() bool GetSaslConfig() KafkaClientSaslConfig IsSslEnabled() bool GetSslConfig() KafkaClientSslConfig }
type KafkaClientSaslConfig ¶ added in v0.29.0
type KafkaClientSslConfig ¶ added in v0.29.0
type MetaTemplates ¶ added in v0.26.0
type PipelineConfig ¶
type PipelineConfig struct {
Raw *simplejson.Json
}
type VaultConfig ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.