Documentation ¶
Index ¶
- Constants
- func GetConfigDump(adminPort int) (*envoyAdmin.ConfigDump, error)
- func GetConfigDumpStr(adminPort int) (string, error)
- func GetServerInfo(adminPort int) (*envoyAdmin.ServerInfo, error)
- func IsClusterPresent(cfg *envoyAdmin.ConfigDump, clusterName string) bool
- func IsOutboundListenerPresent(cfg *envoyAdmin.ConfigDump, listenerName string) bool
- func IsOutboundRoutePresent(cfg *envoyAdmin.ConfigDump, clusterName string) bool
- func WaitForHealthCheckLive(adminPort int) error
- type Envoy
- type LogLevel
Constants ¶
const ( // DefaultLogLevel the log level used for Envoy if not specified. DefaultLogLevel = LogLevelWarning // DefaultLogEntryPrefix the default prefix for all log lines from Envoy. DefaultLogEntryPrefix = "[ENVOY]" )
Variables ¶
This section is empty.
Functions ¶
func GetConfigDump ¶
func GetConfigDump(adminPort int) (*envoyAdmin.ConfigDump, error)
GetConfigDump polls Envoy admin port for the config dump and returns the response.
func GetConfigDumpStr ¶
GetConfigDumpStr polls Envoy admin port for the config dump and returns the response as a string.
func GetServerInfo ¶
func GetServerInfo(adminPort int) (*envoyAdmin.ServerInfo, error)
GetServerInfo returns a structure representing a call to /server_info
func IsClusterPresent ¶
func IsClusterPresent(cfg *envoyAdmin.ConfigDump, clusterName string) bool
IsClusterPresent inspects the given Envoy config dump, looking for the given cluster
func IsOutboundListenerPresent ¶
func IsOutboundListenerPresent(cfg *envoyAdmin.ConfigDump, listenerName string) bool
IsOutboundListenerPresent inspects the given Envoy config dump, looking for the given listener.
func IsOutboundRoutePresent ¶
func IsOutboundRoutePresent(cfg *envoyAdmin.ConfigDump, clusterName string) bool
IsOutboundRoutePresent inspects the given Envoy config dump, looking for an outbound route which targets the given cluster.
func WaitForHealthCheckLive ¶
WaitForHealthCheckLive polls the server info for Envoy and waits for it to transition to "live".
Types ¶
type Envoy ¶
type Envoy struct { // YamlFile (required) the v2 yaml config file for Envoy. YamlFile string // BinPath (optional) the path to the Envoy binary. If not set, uses the debug binary under ISTIO_OUT. If the // ISTIO_OUT environment variable is not set, the default location under GOPATH is assumed. If ISTIO_OUT contains // multiple debug binaries, the most recent file is used. BinPath string // LogFilePath (optional) Sets the output log file for Envoy. If not set, Envoy will output to stderr. LogFilePath string // LogLevel (optional) if provided, sets the log level for Envoy. If not set, DefaultLogLevel will be used. LogLevel LogLevel // LogEntryPrefix (optional) if provided, sets the prefix for every log line from this Envoy. Defaults to DefaultLogPrefix. LogEntryPrefix string // contains filtered or unexported fields }
Envoy is a wrapper that simplifies running Envoy.