proxy

package
v0.0.0-...-2911148 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Default binary version.
	DefaultBinaryVersion = "1.21.0"
	// Default download timeout.
	DefaultDownloadTimeout = 30 * time.Second
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Logger         telemetry.Logger
	ProxyConfig    *bootstrapv3.Bootstrap
	GenerateConfig func() (*bootstrapv3.Bootstrap, error)
}

Config holds the configuration object for running the proxy.

type Service

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

Service is a run.Service implementation that runs the proxy.

func New

func New(g *run.Group, cfg *Config) *Service

New returns a new run.Service that wraps envoy binary. Setting the cfg to nil, expecting setting the envoy's -c from a file.

func (*Service) FlagSet

func (s *Service) FlagSet() *run.FlagSet

FlagSet provides command line flags for the proxy.

func (*Service) GracefulStop

func (s *Service) GracefulStop()

GracefulStop stops the underlying process by sending interrupt.

func (*Service) Name

func (s *Service) Name() string

Name returns the service name.

func (*Service) PreRun

func (s *Service) PreRun() (err error)

PreRun prepares the binary to run.

func (*Service) Serve

func (s *Service) Serve() error

Serve runs the binary.

func (*Service) Validate

func (s *Service) Validate() error

Validate validates the given configuration.

Jump to

Keyboard shortcuts

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