envoy

package
v0.0.0-...-9ee3051 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2019 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EndpointResource      = typePrefix + "ClusterLoadAssignment"
	ClusterResource       = typePrefix + "Cluster"
	RouteResource         = typePrefix + "RouteConfiguration"
	ListenerResource      = typePrefix + "Listener"
	RouterHttpFilter      = "envoy.router"
	HTTPConnectionManager = "envoy.http_connection_manager"
)

Variables

This section is empty.

Functions

func MakeResource

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

func MessageToStruct

func MessageToStruct(msg proto.Message) (*types.Struct, error)

Types

type AggregatedDiscoveryService

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

func (*AggregatedDiscoveryService) StreamAggregatedResources

type AssignmentInfo

type AssignmentInfo struct {
	PodIP   string
	Weight  uint32
	Version string
}

func (*AssignmentInfo) String

func (info *AssignmentInfo) String() string

type ClustersDiscoveryService

type ClustersDiscoveryService struct {
	DiscoveryService
}

func NewClustersDiscoveryService

func NewClustersDiscoveryService() *ClustersDiscoveryService

func (*ClustersDiscoveryService) BuildResource

func (cds *ClustersDiscoveryService) BuildResource(resourceMap map[string]EnvoyResource, version string, node *core.Node) (*v2.DiscoveryResponse, error)

func (*ClustersDiscoveryService) FetchClusters

func (*ClustersDiscoveryService) PodAdded

func (cds *ClustersDiscoveryService) PodAdded(pod *kubernetes.PodInfo)

func (*ClustersDiscoveryService) PodDeleted

func (cds *ClustersDiscoveryService) PodDeleted(pod *kubernetes.PodInfo)

func (*ClustersDiscoveryService) PodUpdated

func (cds *ClustersDiscoveryService) PodUpdated(oldPod, newPod *kubernetes.PodInfo)

func (*ClustersDiscoveryService) PodValid

func (cds *ClustersDiscoveryService) PodValid(pod *kubernetes.PodInfo) bool

func (*ClustersDiscoveryService) StreamClusters

type DiscoveryService

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

func NewDiscoveryService

func NewDiscoveryService() DiscoveryService

func (*DiscoveryService) FetchResource

func (ds *DiscoveryService) FetchResource(req *v2.DiscoveryRequest, builder ResponseBuilder) (*v2.DiscoveryResponse, error)

func (*DiscoveryService) GetResource

func (ds *DiscoveryService) GetResource(name string) EnvoyResource

func (*DiscoveryService) GetResources

func (ds *DiscoveryService) GetResources(resourceNames []string) (map[string]EnvoyResource, string)

func (*DiscoveryService) ProcessRequest

func (ds *DiscoveryService) ProcessRequest(req *v2.DiscoveryRequest, builder ResponseBuilder) (*v2.DiscoveryResponse, error)

func (*DiscoveryService) ProcessStream

func (ds *DiscoveryService) ProcessStream(stream stream, builder ResponseBuilder) error

func (*DiscoveryService) RemoveResource

func (ds *DiscoveryService) RemoveResource(name string)

func (*DiscoveryService) UpdateResource

func (ds *DiscoveryService) UpdateResource(resource EnvoyResource)

type EndpointInfo

type EndpointInfo struct {
	App         string
	Port        uint32
	Assignments map[string]*AssignmentInfo
}

func (*EndpointInfo) Name

func (info *EndpointInfo) Name() string

func (*EndpointInfo) String

func (info *EndpointInfo) String() string

func (*EndpointInfo) Version

func (info *EndpointInfo) Version() string

type EndpointsDiscoveryService

type EndpointsDiscoveryService struct {
	DiscoveryService
}

func NewEndpointsDiscoveryService

func NewEndpointsDiscoveryService() *EndpointsDiscoveryService

func (*EndpointsDiscoveryService) BuildResource

func (ds *EndpointsDiscoveryService) BuildResource(resourceMap map[string]EnvoyResource, version string, node *core.Node) (*v2.DiscoveryResponse, error)

func (*EndpointsDiscoveryService) FetchEndpoints

func (*EndpointsDiscoveryService) PodAdded

func (eds *EndpointsDiscoveryService) PodAdded(pod *kubernetes.PodInfo)

func (*EndpointsDiscoveryService) PodDeleted

func (eds *EndpointsDiscoveryService) PodDeleted(pod *kubernetes.PodInfo)

func (*EndpointsDiscoveryService) PodUpdated

func (eds *EndpointsDiscoveryService) PodUpdated(oldPod, newPod *kubernetes.PodInfo)

func (*EndpointsDiscoveryService) PodValid

func (eds *EndpointsDiscoveryService) PodValid(pod *kubernetes.PodInfo) bool

func (*EndpointsDiscoveryService) StreamEndpoints

type EnvoyResource

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

type InboundClusterInfo

type InboundClusterInfo struct {
	PodIP string
	Port  uint32
}

func (*InboundClusterInfo) Name

func (info *InboundClusterInfo) Name() string

func (*InboundClusterInfo) String

func (info *InboundClusterInfo) String() string

func (*InboundClusterInfo) Version

func (info *InboundClusterInfo) Version() string

type InboundListenerInfo

type InboundListenerInfo struct {
	PodIP   string
	Port    uint32
	PodName string
}

func (*InboundListenerInfo) CreateListener

func (info *InboundListenerInfo) CreateListener() *v2.Listener

func (*InboundListenerInfo) Name

func (info *InboundListenerInfo) Name() string

func (*InboundListenerInfo) String

func (info *InboundListenerInfo) String() string

func (*InboundListenerInfo) Version

func (info *InboundListenerInfo) Version() string

type ListenersDiscoveryService

type ListenersDiscoveryService struct {
	DiscoveryService
}

func NewListenersDiscoveryService

func NewListenersDiscoveryService() *ListenersDiscoveryService

func (*ListenersDiscoveryService) BuildResource

func (lds *ListenersDiscoveryService) BuildResource(resourceMap map[string]EnvoyResource, version string, node *core.Node) (*v2.DiscoveryResponse, error)

func (*ListenersDiscoveryService) CreateVirtualListener

func (lds *ListenersDiscoveryService) CreateVirtualListener() *v2.Listener

func (*ListenersDiscoveryService) FetchListeners

func (*ListenersDiscoveryService) PodAdded

func (lds *ListenersDiscoveryService) PodAdded(pod *kubernetes.PodInfo)

func (*ListenersDiscoveryService) PodDeleted

func (lds *ListenersDiscoveryService) PodDeleted(pod *kubernetes.PodInfo)

func (*ListenersDiscoveryService) PodUpdated

func (lds *ListenersDiscoveryService) PodUpdated(oldPod, newPod *kubernetes.PodInfo)

func (*ListenersDiscoveryService) PodValid

func (lds *ListenersDiscoveryService) PodValid(pod *kubernetes.PodInfo) bool

func (*ListenersDiscoveryService) StreamListeners

type OutboundClusterInfo

type OutboundClusterInfo struct {
	App  string
	Port uint32
}

func (*OutboundClusterInfo) Name

func (info *OutboundClusterInfo) Name() string

func (*OutboundClusterInfo) String

func (info *OutboundClusterInfo) String() string

func (*OutboundClusterInfo) Version

func (info *OutboundClusterInfo) Version() string

type OutboundListenerInfo

type OutboundListenerInfo struct {
	Port uint32
}

func (*OutboundListenerInfo) CreateListener

func (info *OutboundListenerInfo) CreateListener() *v2.Listener

func (*OutboundListenerInfo) Name

func (info *OutboundListenerInfo) Name() string

func (*OutboundListenerInfo) String

func (info *OutboundListenerInfo) String() string

func (*OutboundListenerInfo) Version

func (info *OutboundListenerInfo) Version() string

type ResponseBuilder

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

type RouteInfo

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

func (*RouteInfo) Name

func (info *RouteInfo) Name() string

func (*RouteInfo) String

func (info *RouteInfo) String() string

func (*RouteInfo) Version

func (info *RouteInfo) Version() string

type RoutesDiscoveryService

type RoutesDiscoveryService struct {
	DiscoveryService
	// contains filtered or unexported fields
}

func NewRoutesDiscoveryService

func NewRoutesDiscoveryService(k8sManager *kubernetes.K8sResourceManager) *RoutesDiscoveryService

func (*RoutesDiscoveryService) BuildResource

func (rds *RoutesDiscoveryService) BuildResource(resourceMap map[string]EnvoyResource, version string, node *core.Node) (*v2.DiscoveryResponse, error)

func (*RoutesDiscoveryService) FetchRoutes

func (*RoutesDiscoveryService) StreamRoutes

Jump to

Keyboard shortcuts

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