config

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Filesystem                 ConfigFilesystem
	EtcdClient                 ConfigEtcd                `yaml:"etcd_client"`
	GrpcNotifications          []ConfigGrpcNotifications `yaml:"grpc_notifications"`
	NotificationCommand        []string                  `yaml:"notification_command"`
	NotificationCommandRetries uint64                    `yaml:"notification_command_retries"`
	LogLevel                   string                    `yaml:"log_level"`
}

func GetConfig

func GetConfig(confFilePath string) (Config, error)

func (*Config) GetLogLevel

func (c *Config) GetLogLevel() int64

type ConfigEtcd

type ConfigEtcd struct {
	Prefix            string
	Endpoints         []string
	ConnectionTimeout time.Duration `yaml:"connection_timeout"`
	RequestTimeout    time.Duration `yaml:"request_timeout"`
	RetryInterval     time.Duration `yaml:"retry_interval"`
	Retries           uint64
	Auth              ConfigEtcdAuth
}

type ConfigEtcdAuth

type ConfigEtcdAuth struct {
	CaCert       string `yaml:"ca_cert"`
	ClientCert   string `yaml:"client_cert"`
	ClientKey    string `yaml:"client_key"`
	PasswordAuth string `yaml:"password_auth"`
	Username     string `yaml:"-"`
	Password     string `yaml:"-"`
}

type ConfigFilesystem

type ConfigFilesystem struct {
	Path                  string
	SlashPath             string `yaml:"-"`
	FilesPermission       string `yaml:"files_permission"`
	DirectoriesPermission string `yaml:"directories_permission"`
}

type ConfigGrpcAuth

type ConfigGrpcAuth struct {
	CaCert     string `yaml:"ca_cert"`
	ClientCert string `yaml:"client_cert"`
	ClientKey  string `yaml:"client_key"`
}

type ConfigGrpcNotifications

type ConfigGrpcNotifications struct {
	Endpoint     string
	Filter       string
	FilterRegex  *regexp.Regexp `yaml:"-"`
	TrimKeyPath  bool           `yaml:"trim_key_path"`
	MaxChunkSize uint64         `yaml:"max_chunk_size"`
	Auth         ConfigGrpcAuth
}

type EtcdPasswordAuth

type EtcdPasswordAuth struct {
	Username string
	Password string
}

Jump to

Keyboard shortcuts

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