settings

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyGRPCSettings

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

func ApplyHTTPSettings

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

func FromValues added in v0.49.1

func FromValues(values map[string]string) map[string]string

func IsHTTPKey added in v0.17.1

func IsHTTPKey(key string) bool

IsHTTPKey reports whether key is a supported HTTP setting key.

func Merge

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

Merge folds scopes together in precedence order and returns canonical keys, so later scopes override earlier ones regardless of how each one wrote the key. Keys are visited in sorted order to keep two forms of the same key in one scope from resolving differently between runs.

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 *grpcx.Options, resolver *vars.Resolver) Handler

func HTTPHandler

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

type Matcher

type Matcher func(string) bool

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