Help us shape the future of Go! Take the 2026 Go Developer Survey

config

package
v0.0.38 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2025 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 {
	StoreType string `yaml:"store-type,omitempty" json:"store-type,omitempty"`
	Dir       string `yaml:"dir,omitempty" json:"dir,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