config

package
v0.0.0-...-7a62f64 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 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 {
	Server   ServerConfig   `json:"server" yaml:"server" toml:"server"`
	Metrics  MetricsConfig  `json:"metrics" yaml:"metrics" toml:"metrics"`
	Database DatabaseConfig `json:"database" yaml:"database" toml:"database"`
}

func LoadConfig

func LoadConfig(ctx context.Context, path string) (*Config, error)

type DatabaseConfig

type DatabaseConfig struct {
	Driver   string                   `json:"driver" yaml:"driver" toml:"driver"`
	Postgres *database.PostgresConfig `json:"postgres" yaml:"postgres" toml:"postgres"`
}

type MetricsConfig

type MetricsConfig struct {
	ServiceName string `json:"service_name" yaml:"service_name" toml:"service_name"`
	Address     string `json:"address" yaml:"address" toml:"address"`
}

type ServerConfig

type ServerConfig struct {
	Address   string   `json:"address" yaml:"address" toml:"address"`
	ApiKeys   []string `json:"api_keys" yaml:"api_keys" toml:"api_keys"`
	AgentKeys []string `json:"agent_keys" yaml:"agent_keys" toml:"agent_keys"`
}

Jump to

Keyboard shortcuts

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