config

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindAdminAddress

func FindAdminAddress(args []string) (string, error)

FindAdminAddress parses the admin address from command-line args.

Types

type Address

type Address struct {
	SocketAddress socketAddress `yaml:"socket_address"`
}

type Config

type Config struct {
	Admin           string // host:port format, empty if no admin
	StaticListeners []Listener
}

func ParseListeners

func ParseListeners(args []string) (*Config, error)

ParseListeners parses the admin address (if any) and all static listeners from command-line args.

This mimics Envoy's config merging behavior: - Each config file or YAML string is parsed in order. - For each listener, the last occurrence with a given name wins (mechanical merge, like Envoy's protobuf merge). - The admin address is also replaced by the last occurrence.

type Listener

type Listener struct {
	Name     string
	Address  string // host:port format
	Protocol string
	Filters  []filterInfo
}

Jump to

Keyboard shortcuts

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