common

package
v0.0.0-...-ad5601e Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2019 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClusterResource       = typePrefix + "Cluster"
	EndpointResource      = typePrefix + "ClusterLoadAssignment"
	RouteResource         = typePrefix + "RouteConfiguration"
	ListenerResource      = typePrefix + "Listener"
	SecretResource        = typePrefix + "auth.Secret"
	XdsCluster            = "xds_cluster"
	RouterHttpFilter      = "envoy.router"
	HTTPConnectionManager = "envoy.http_connection_manager"
	TCPProxy              = "envoy.tcp_proxy"
	TLS_INSPECTOR         = "envoy.listener.tls_inspector"
	ORIGINAL_DST          = "envoy.listener.original_dst"
	HttpFaultInjection    = "envoy.fault"
)

Variables

View Source
var (
	ALL_DOMAIN = []string{"*"}
)

Functions

func ContainsResource

func ContainsResource(resourceNames []string, resource string) bool

func MakeResource

func MakeResource(resources []proto.Message, typeURL string, version string) (*envoy_api_v2.DiscoveryResponse, error)

Types

type ControlPlaneService

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

func NewControlPlaneService

func NewControlPlaneService(k8sManager *kubernetes.K8sResourceManager) *ControlPlaneService

func (*ControlPlaneService) GetK8sManager

func (cps *ControlPlaneService) GetK8sManager() *kubernetes.K8sResourceManager

func (*ControlPlaneService) GetResourceClone

func (cps *ControlPlaneService) GetResourceClone(name string) (EnvoyResource, string)

func (*ControlPlaneService) GetResourceNoCopy

func (cps *ControlPlaneService) GetResourceNoCopy(name string) (EnvoyResource, string)

func (*ControlPlaneService) GetResources

func (cps *ControlPlaneService) GetResources(resourceNames []string) (map[string]EnvoyResource, string)

func (*ControlPlaneService) ProcessRequest

func (cps *ControlPlaneService) ProcessRequest(req *envoy_api_v2.DiscoveryRequest, builder ResponseBuilder) (*envoy_api_v2.DiscoveryResponse, error)

func (*ControlPlaneService) UpdateResource

func (cps *ControlPlaneService) UpdateResource(resource EnvoyResource, resourceVersion string)

type EnvoyResource

type EnvoyResource interface {
	Name() string
	Type() string
	String() string
}

type EnvoyResourceClonable

type EnvoyResourceClonable interface {
	EnvoyResource
	Clone() EnvoyResourceClonable
}

type ResponseBuilder

type ResponseBuilder func(resourceMap map[string]EnvoyResource, version string, node *core.Node) (*envoy_api_v2.DiscoveryResponse, error)

type SecretManager

type SecretManager struct {
	RootCertificate *x509.Certificate
	RootKey         *rsa.PrivateKey

	PemRootCertBytes []byte
	PemRootKeyBytes  []byte
}

func NewSecretManager

func NewSecretManager() (*SecretManager, error)

func (*SecretManager) GenerateGatewaySecret

func (manager *SecretManager) GenerateGatewaySecret(hosts []string) ([]byte, []byte, error)

Jump to

Keyboard shortcuts

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