configutil

package
v0.12.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: Apache-2.0 Imports: 49 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CortexAPISpecToCortexConfig

func CortexAPISpecToCortexConfig[T cortexspec](
	in T,
	overriders ...CortexConfigOverrider,
) (*cortex.Config, *cortex.RuntimeConfigValues, error)

func CortexTargets

func CortexTargets() []string

func LoadFromAPI

func LoadFromAPI[T any](dest T, src proto.Message) error

func MarshalCortexConfig

func MarshalCortexConfig(config *cortex.Config) ([]byte, error)

func MarshalRuntimeConfig

func MarshalRuntimeConfig(config *cortex.RuntimeConfigValues) ([]byte, error)

Types

type AlertmanagerOverrideShape

type AlertmanagerOverrideShape struct {
	AlertmanagerURL string
	EnableV2        bool
	ClientTLS       TLSClientConfigShape
}

type CortexConfigOverrider

type CortexConfigOverrider interface {
	// contains filtered or unexported methods
}

func MergeOverrideLists

func MergeOverrideLists(lists ...[]CortexConfigOverrider) []CortexConfigOverrider

func NewHostOverrides

func NewHostOverrides(impl StandardOverridesShape) []CortexConfigOverrider

These are overrides that configure host options such as networking and storage. Generally always required to have a working Cortex config.

func NewImplementationSpecificOverrides

func NewImplementationSpecificOverrides(impl ImplementationSpecificOverridesShape) []CortexConfigOverrider

These are overrides that are generally always required, but are specific to the runtime environment and are logically separate from the standard override set.

func NewOverrider

func NewOverrider[T any](fn func(*T) bool) CortexConfigOverrider

func NewTargetsOverride

func NewTargetsOverride(targets ...string) []CortexConfigOverrider

type ImplementationSpecificOverridesShape

type ImplementationSpecificOverridesShape = struct {
	QueryFrontendAddress string
	MemberlistJoinAddrs  []string
	AlertManager         AlertmanagerOverrideShape
}

type StandardOverridesShape

type StandardOverridesShape = struct {
	HttpListenAddress      string
	HttpListenPort         int
	HttpListenNetwork      string
	GrpcListenAddress      string
	GrpcListenPort         int
	GrpcListenNetwork      string
	StorageDir             string
	RuntimeConfig          string
	TLSServerConfig        TLSServerConfigShape
	TLSGatewayClientConfig TLSClientConfigShape
	TLSCortexClientConfig  TLSClientConfigShape
}

type TLSClientConfigShape

type TLSClientConfigShape = struct {
	CertPath           string
	KeyPath            string
	CAPath             string
	ServerName         string
	InsecureSkipVerify bool
}

type TLSServerConfigShape

type TLSServerConfigShape = struct {
	TLSCertPath string
	TLSKeyPath  string
	ClientAuth  string
	ClientCAs   string
}

Jump to

Keyboard shortcuts

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