Documentation ¶
Index ¶
- func GetLoopbackAddr(ctx context.Context, port int) (string, error)
- func GetLoopbackIp(ctx context.Context) (string, error)
- func LocalEnvoyCmd(ctx context.Context, dockerFlags, envoyFlags []string) (*dexec.Cmd, error)
- func RunEnvoy(ctx context.Context, adsAddress string, portmaps ...string) error
- type EnvoyController
- type RequestLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LocalEnvoyCmd ¶
Types ¶
type EnvoyController ¶
type EnvoyController struct {
// contains filtered or unexported fields
}
EnvoyController runs a go control plane for envoy that tracks ACKS/NACKS for configuration updates. This allows code to know when envoy has successfully reconfigured as well as have access to the error details when envoy is fed invalid configuration.
func NewEnvoyController ¶
func NewEnvoyController(address string) *EnvoyController
NewEnvoyControler creates a new envoy controller that binds to the supplied address when Run.
func (*EnvoyController) Configure ¶
func (e *EnvoyController) Configure(ctx context.Context, node, version string, snapshot ecp_v3_cache.ResourceSnapshot) (*status.Status, error)
Configure will update the envoy configuration and block until the reconfiguration either succeeds or signals an error.
type RequestLogger ¶
A RequestLogger can serve HTTP on multiple ports and records all requests to .Requests for later examination.
func (*RequestLogger) ListenAndServeHTTP ¶
func (rl *RequestLogger) ListenAndServeHTTP(ctx context.Context, addresses ...string) error
func (*RequestLogger) Log ¶
func (rl *RequestLogger) Log(r *http.Request)
Click to show internal directories.
Click to hide internal directories.