envoy

package
v1.17.0-beta34 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultProxyName = "default~proxy"
)
View Source
const (
	ServiceName = "gateway-proxy"
)

Variables

This section is empty.

Functions

func NextAccessLogPort

func NextAccessLogPort() uint32

Types

type DockerOptions

type DockerOptions struct {
	// Extra volume arguments
	Volumes []string
	// Extra env arguments.
	// see https://docs.docker.com/engine/reference/run/#env-environment-variables for more info
	Env []string
}

DockerOptions contains extra options for running in docker

type Factory

type Factory interface {
	NewInstance() *Instance
	Clean()
}

Factory is a helper for running multiple envoy instances

func NewDockerFactory

func NewDockerFactory(defaultBootstrapTemplate *template.Template, dockerImage string) Factory

func NewFactory

func NewFactory() Factory

NewFactory returns a new envoy service Factory

func NewLinuxFactory

func NewLinuxFactory(defaultBootstrapTemplate *template.Template, envoyPath, tmpDir string) Factory

type Instance

type Instance struct {
	AccessLogAddr string
	AccessLogPort uint32
	// Path to access logs for binary run
	AccessLogs string

	RatelimitAddr string
	RatelimitPort uint32
	ID            string
	Role          string

	LogLevel string

	GlooAddr    string // address for gloo and services
	Port        uint32
	RestXdsPort uint32

	// Envoy API Version to use, default to V3
	ApiVersion string

	DockerOptions
	UseDocker           bool
	DockerImage         string
	DockerContainerName string

	*RequestPorts
	// contains filtered or unexported fields
}

func (*Instance) AdminClient added in v1.17.0

func (ei *Instance) AdminClient() *admincli.Client

func (*Instance) Binary

func (ei *Instance) Binary() string

func (*Instance) Clean

func (ei *Instance) Clean()

func (*Instance) ConfigDump deprecated

func (ei *Instance) ConfigDump() (string, error)

Deprecated: Prefer StructuredConfigDump

func (*Instance) DisablePanicMode

func (ei *Instance) DisablePanicMode() error

func (*Instance) EnablePanicMode

func (ei *Instance) EnablePanicMode() error

func (*Instance) LocalAddr

func (ei *Instance) LocalAddr() string

func (*Instance) Logs

func (ei *Instance) Logs() (string, error)

func (*Instance) Run deprecated

func (ei *Instance) Run(port int) error

Deprecated: use RunWith instead

func (*Instance) RunWith

func (ei *Instance) RunWith(runConfig RunConfig) error

func (*Instance) RunWithConfigFile

func (ei *Instance) RunWithConfigFile(ctx context.Context, port int, configFile string) error

func (*Instance) RunWithRole deprecated

func (ei *Instance) RunWithRole(role string, port int) error

Deprecated: use RunWith instead

func (*Instance) RunWithRoleAndRestXds deprecated

func (ei *Instance) RunWithRoleAndRestXds(role string, glooPort, restXdsPort int) error

Deprecated: use RunWith instead

func (*Instance) Statistics

func (ei *Instance) Statistics() (string, error)

func (*Instance) StructuredConfigDump

func (ei *Instance) StructuredConfigDump() (*adminv3.ConfigDump, error)

type RequestPorts

type RequestPorts struct {
	HttpPort   uint32
	HttpsPort  uint32
	HybridPort uint32
	TcpPort    uint32
	AdminPort  uint32
}

RequestPorts are the ports that the Instance will listen on for requests

type RunConfig

type RunConfig struct {
	Context context.Context

	Role        string
	Port        uint32
	RestXdsPort uint32
}

type SafeBuffer

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

SafeBuffer is a goroutine safe bytes.Buffer

func (*SafeBuffer) String

func (s *SafeBuffer) String() string

String returns the contents of the unread portion of the buffer as a string. If the Buffer is a nil pointer, it returns "<nil>".

func (*SafeBuffer) Write

func (s *SafeBuffer) Write(p []byte) (n int, err error)

Write appends the contents of p to the buffer, growing the buffer as needed. It returns the number of bytes written.

Jump to

Keyboard shortcuts

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