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

configs

package
v1.21.1 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2026 License: Apache-2.0 Imports: 9 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 {
	DB  db.Config  `yaml:"database"`
	API api.Config `yaml:"api"`
}

func (*Config) RegisterFlags added in v0.7.0

func (cfg *Config) RegisterFlags(f *flag.FlagSet)

RegisterFlags adds the flags required to configure this to the given FlagSet.

type QueryProtection added in v1.20.0

type QueryProtection struct {
	Rejection rejection `json:"rejection"`
}

func (*QueryProtection) RegisterFlagsWithPrefix added in v1.20.0

func (cfg *QueryProtection) RegisterFlagsWithPrefix(f *flag.FlagSet, prefix string)

func (*QueryProtection) Validate added in v1.20.0

func (cfg *QueryProtection) Validate(monitoredResources flagext.StringSliceCSV) error

type ResourceMonitor added in v1.20.0

type ResourceMonitor struct {
	Resources       flagext.StringSliceCSV `yaml:"resources"`
	Interval        time.Duration          `yaml:"interval"`
	CPURateInterval time.Duration          `yaml:"cpu_rate_interval"`
}

func (*ResourceMonitor) RegisterFlags added in v1.20.0

func (cfg *ResourceMonitor) RegisterFlags(f *flag.FlagSet)

func (*ResourceMonitor) Validate added in v1.20.0

func (cfg *ResourceMonitor) Validate() error

Directories

Path Synopsis
db

Jump to

Keyboard shortcuts

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