config

package
v0.0.0-...-d510c65 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthnConfig

type AuthnConfig struct {
	Method    string          `yaml:"method"`
	Preshared PresharedConfig `yaml:"preshared"`
}

type Config

type Config struct {
	Mode  string      `yaml:"mode"`
	Slave SlaveConfig `yaml:"slave"`
	Http  HttpConfig  `yaml:"http"`
	GRPC  GRPCConfig  `yaml:"grpc"`
	Store StoreConfig `yaml:"store"`
	Log   LogConfig   `yaml:"log"`
	Authn AuthnConfig `yaml:"authn"`
}

func DefaultConfig

func DefaultConfig() *Config

type GRPCConfig

type GRPCConfig struct {
	Port string    `yaml:"port"`
	TLS  TLSConfig `yaml:"tls"`
}

type HttpConfig

type HttpConfig struct {
	Port               string    `yaml:"port"`
	CORSAllowedOrigins []string  `yaml:"corsAllowedOrigins"`
	CORSAllowedHeaders []string  `yaml:"corsAllowedHeaders"`
	TLS                TLSConfig `yaml:"tls"`
}

type LogConfig

type LogConfig struct {
	Level string `yaml:"level"`
}

type PresharedConfig

type PresharedConfig struct {
	Key string `yaml:"key"`
}

type RedisConfig

type RedisConfig struct {
	Addr     string `yaml:"addr"`
	Password string `yaml:"password" json:"-"`
	DB       int    `yaml:"db"`
	PoolSize int    `yaml:"poolSize"`
}

type SlaveConfig

type SlaveConfig struct {
	Id             string      `yaml:"id"`
	SlaveHTTPAddr  string      `yaml:"slaveHTTPAddr"`
	MasterHTTPAddr string      `yaml:"masterHTTPAddr"`
	MasterAuthn    AuthnConfig `yaml:"masterAuthn"`
}

type StoreConfig

type StoreConfig struct {
	Engine string      `yaml:"engine"`
	Redis  RedisConfig `yaml:"redis"`
}

type TLSConfig

type TLSConfig struct {
	Enabled  bool   `yaml:"enabled"`
	CertPath string `yaml:"certPath"`
	KeyPath  string `yaml:"keyPath"`
}

Jump to

Keyboard shortcuts

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