settings

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyGRPCSettings

func ApplyGRPCSettings(opts *grpcclient.Options, settings map[string]string, resolver *vars.Resolver) error

func ApplyHTTPSettings

func ApplyHTTPSettings(opts *httpclient.Options, settings map[string]string, resolver *vars.Resolver) error

func FromEnv

func FromEnv(set vars.EnvironmentSet, envName string) map[string]string

func Merge

func Merge(scopes ...map[string]string) map[string]string

Types

type Applier

type Applier struct {
	// contains filtered or unexported fields
}

func New

func New(handlers ...Handler) Applier

func (Applier) ApplyAll

func (a Applier) ApplyAll(settings map[string]string) (map[string]string, error)

type ApplyFunc

type ApplyFunc func(key, val string) error

type Handler

type Handler struct {
	Match Matcher
	Apply ApplyFunc
}

func GRPCHandler

func GRPCHandler(opts *grpcclient.Options, resolver *vars.Resolver) Handler

func HTTPHandler

func HTTPHandler(opts *httpclient.Options, resolver *vars.Resolver) Handler

type Matcher

type Matcher func(string) bool

func ExactMatcher

func ExactMatcher(keys ...string) Matcher

func PrefixMatcher

func PrefixMatcher(prefixes ...string) Matcher

type ResolverProvider

type ResolverProvider interface {
	Resolver() *vars.Resolver
}

Jump to

Keyboard shortcuts

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