controlplane

package
v0.10.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2020 License: Apache-2.0 Imports: 63 Imported by: 0

Documentation

Overview

Package controlplane contains the HTTP and gRPC base servers and the xDS gRPC implementation for envoy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	GRPCListener net.Listener
	GRPCServer   *grpc.Server
	HTTPListener net.Listener
	HTTPRouter   *mux.Router
	// contains filtered or unexported fields
}

A Server is the control-plane gRPC and HTTP servers.

func NewServer

func NewServer(name string) (*Server, error)

NewServer creates a new Server. Listener ports are chosen by the OS.

func (*Server) DeltaAggregatedResources

DeltaAggregatedResources is not implemented.

func (*Server) OnConfigChange added in v0.10.0

func (srv *Server) OnConfigChange(cfg *config.Config)

OnConfigChange updates the pomerium config options.

func (*Server) Run

func (srv *Server) Run(ctx context.Context) error

Run runs the control-plane gRPC and HTTP servers.

func (*Server) StreamAccessLogs

StreamAccessLogs receives logs from envoy and prints them to stdout.

func (*Server) StreamAggregatedResources

StreamAggregatedResources streams xDS resources based on incoming discovery requests.

This is setup as 3 concurrent goroutines:

  • The first retrieves the requests from the client.
  • The third sends responses back to the client.
  • The second waits for either the client to request a new resource type or for the config to have been updated
  • in either case, we loop over all of the current client versions and if any of them are different from the current version, we send the updated resource

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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