config

package
v0.0.33 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheConfig

type CacheConfig struct {
	MaxCaches       int           `yaml:"max-caches,omitempty" json:"max-caches,omitempty"`
	StoreType       string        `yaml:"store-type,omitempty" json:"store-type,omitempty"`
	Dir             string        `yaml:"dir,omitempty" json:"dir,omitempty"`
	PruneIDLifetime time.Duration `yaml:"prune-id-lifetime,omitempty" json:"prune-id-lifetime,omitempty"`
}

type Config

type Config struct {
	GRPCServer *GRPCServer  `yaml:"grpc-server,omitempty" json:"grpc-server,omitempty"`
	Cache      *CacheConfig `yaml:"cache,omitempty" json:"cache,omitempty"`
	Prometheus *PromConfig  `yaml:"prometheus,omitempty" json:"prometheus,omitempty"`
}

func New

func New(file string) (*Config, error)

type GRPCServer

type GRPCServer struct {
	Address        string        `yaml:"address,omitempty" json:"address,omitempty"`
	TLS            *TLS          `yaml:"tls,omitempty" json:"tls,omitempty"`
	MaxRecvMsgSize int           `yaml:"max-recv-msg-size,omitempty" json:"max-recv-msg-size,omitempty"`
	RPCTimeout     time.Duration `yaml:"rpc-timeout,omitempty" json:"rpc-timeout,omitempty"`
	BufferSize     int           `yaml:"buffer-size,omitempty" json:"buffer-size,omitempty"`
	WriteWorkers   int           `yaml:"write-workers,omitempty" json:"write-workers,omitempty"`
}

type PromConfig

type PromConfig struct {
	Address string `yaml:"address,omitempty" json:"address,omitempty"`
}

type TLS

type TLS struct {
	CA         string `yaml:"ca,omitempty" json:"ca,omitempty"`
	Cert       string `yaml:"cert,omitempty" json:"cert,omitempty"`
	Key        string `yaml:"key,omitempty" json:"key,omitempty"`
	ClientAuth string `yaml:"client-auth,omitempty" json:"client-auth,omitempty"`
}

func (*TLS) NewConfig

func (t *TLS) NewConfig(ctx context.Context) (*tls.Config, error)

Jump to

Keyboard shortcuts

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