cluster

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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NeedServiceToPodAnnotation

func NeedServiceToPodAnnotation(label string) bool

func ServiceClusterName

func ServiceClusterName(svc string, ns string, port uint32) string

func StaticClusterName

func StaticClusterName(ip string, port uint32) string

Types

type ByPassClusterInfo

type ByPassClusterInfo struct {
	ServiceClusterInfo
	ClusterIP string
}

used for kubernetes.default service

func NewByPassClusterInfo

func NewByPassClusterInfo(svc *kubernetes.ServiceInfo, port uint32) *ByPassClusterInfo

func (*ByPassClusterInfo) CreateCluster

func (info *ByPassClusterInfo) CreateCluster() *envoy_api_v2.Cluster

func (*ByPassClusterInfo) String

func (info *ByPassClusterInfo) String() string

type ClusterConfigInfo

type ClusterConfigInfo struct {
	MaxRetries         uint32
	MaxConnections     uint32
	MaxPendingRequests uint32
	MaxRequests        uint32
	ConnectionTimeout  *duration.Duration
}

func (*ClusterConfigInfo) ApplyClusterConfig

func (info *ClusterConfigInfo) ApplyClusterConfig(clusterInfo *envoy_api_v2.Cluster)

func (*ClusterConfigInfo) Config

func (info *ClusterConfigInfo) Config(config map[string]string)

type ClusterInfo

type ClusterInfo interface {
	common.EnvoyResource
	CreateCluster() *envoy_api_v2.Cluster
}

type ClustersControlPlaneService

type ClustersControlPlaneService struct {
	*common.ControlPlaneService
}

func NewClustersControlPlaneService

func NewClustersControlPlaneService(k8sManager *kubernetes.K8sResourceManager) *ClustersControlPlaneService

func (*ClustersControlPlaneService) BuildResource

func (cps *ClustersControlPlaneService) BuildResource(resourceMap map[string]common.EnvoyResource, version string, node *core.Node) (*envoy_api_v2.DiscoveryResponse, error)

func (*ClustersControlPlaneService) PodAdded

func (cps *ClustersControlPlaneService) PodAdded(pod *kubernetes.PodInfo)

func (*ClustersControlPlaneService) PodDeleted

func (cps *ClustersControlPlaneService) PodDeleted(pod *kubernetes.PodInfo)

func (*ClustersControlPlaneService) PodUpdated

func (cps *ClustersControlPlaneService) PodUpdated(oldPod, newPod *kubernetes.PodInfo)

func (*ClustersControlPlaneService) PodValid

func (cps *ClustersControlPlaneService) PodValid(pod *kubernetes.PodInfo) bool

func (*ClustersControlPlaneService) ServiceAdded

func (cps *ClustersControlPlaneService) ServiceAdded(svc *kubernetes.ServiceInfo)

func (*ClustersControlPlaneService) ServiceDeleted

func (cps *ClustersControlPlaneService) ServiceDeleted(svc *kubernetes.ServiceInfo)

func (*ClustersControlPlaneService) ServiceUpdated

func (cps *ClustersControlPlaneService) ServiceUpdated(oldService, newService *kubernetes.ServiceInfo)

func (*ClustersControlPlaneService) ServiceValid

func (cps *ClustersControlPlaneService) ServiceValid(svc *kubernetes.ServiceInfo) bool

type ServiceClusterInfo

type ServiceClusterInfo struct {
	ClusterConfigInfo

	Service   string
	Namespace string
	Port      uint32

	LbPolicy int32
}

func NewServiceClusterInfo

func NewServiceClusterInfo(svc *kubernetes.ServiceInfo, port uint32) *ServiceClusterInfo

func (*ServiceClusterInfo) Config

func (info *ServiceClusterInfo) Config(config map[string]string)

func (*ServiceClusterInfo) CreateCluster

func (info *ServiceClusterInfo) CreateCluster() *envoy_api_v2.Cluster

func (*ServiceClusterInfo) Name

func (info *ServiceClusterInfo) Name() string

func (*ServiceClusterInfo) String

func (info *ServiceClusterInfo) String() string

func (*ServiceClusterInfo) Type

func (info *ServiceClusterInfo) Type() string

type StaticClusterInfo

type StaticClusterInfo struct {
	ClusterConfigInfo

	IP     string
	Port   uint32
	NodeId string
}

func NewStaticClusterInfo

func NewStaticClusterInfo(ip string, port uint32, nodeId string) *StaticClusterInfo

func (*StaticClusterInfo) CreateCluster

func (info *StaticClusterInfo) CreateCluster() *envoy_api_v2.Cluster

func (*StaticClusterInfo) Name

func (info *StaticClusterInfo) Name() string

func (*StaticClusterInfo) String

func (info *StaticClusterInfo) String() string

func (*StaticClusterInfo) Type

func (info *StaticClusterInfo) Type() string

Jump to

Keyboard shortcuts

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