config

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 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(configPath, configYaml string) (string, error)

FindAdminAddress parses the admin address from config sources.

func FindAdminAddressFromArgs added in v1.3.0

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

FindAdminAddressFromArgs extracts config sources from args and returns the admin address.

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(configPath, configYaml string) (*Config, error)

ParseListeners parses the admin address (if any) and all static listeners from config sources.

This mimics Envoy's config merging behavior from source/server/server.cc:

  • configPath is loaded first (if non-empty)
  • configYaml is merged on top via protobuf MergeFrom (if non-empty)
  • configYaml always wins for conflicting fields, regardless of which was specified first on CLI

For listeners with the same name, the later config wins (protobuf MergeFrom behavior).

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