Documentation
¶
Overview ¶
Package cds implements a CDS/EDS server.
Index ¶
- type Server
- func (s *Server) AddClusters(ctx context.Context, cs []*envoy_config_cluster_v3.Cluster) error
- func (s *Server) AddEndpoints(ctx context.Context, es []*envoy_config_endpoint_v3.ClusterLoadAssignment) error
- func (s *Server) DeleteCluster(ctx context.Context, name string)
- func (s *Server) DeleteEndpoints(ctx context.Context, name string)
- func (s *Server) ListClusters() []*envoy_config_cluster_v3.Cluster
- func (s *Server) ListEndpoints() []*envoy_config_endpoint_v3.ClusterLoadAssignment
- func (s *Server) ReplaceClusters(ctx context.Context, cs []*envoy_config_cluster_v3.Cluster) error
- func (s *Server) ReplaceEndpoints(ctx context.Context, es []*envoy_config_endpoint_v3.ClusterLoadAssignment) error
- func (s *Server) StreamClusters(stream clusterservice.ClusterDiscoveryService_StreamClustersServer) error
- func (s *Server) StreamEndpoints(stream endpointservice.EndpointDiscoveryService_StreamEndpointsServer) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { // We do not implement the GRPC_DELTA or REST protocols. We include this to pick up stubs // for those methods, and any future protocols that are added. clusterservice.UnimplementedClusterDiscoveryServiceServer endpointservice.UnimplementedEndpointDiscoveryServiceServer Clusters, Endpoints *xds.Manager }
Server is a CDS and EDS server.
func (*Server) AddClusters ¶
AddClusters adds or updates clusters, and notifies all connected clients of the change.
func (*Server) AddEndpoints ¶
func (s *Server) AddEndpoints(ctx context.Context, es []*envoy_config_endpoint_v3.ClusterLoadAssignment) error
AddEndpoints adds or updates endpoints, and notifies all connected clients of the change.
func (*Server) DeleteCluster ¶
DeleteCluster deletes a cluster by name, and notifies all connected clients of the change.
func (*Server) DeleteEndpoints ¶
DeleteEndpoints deletes a load assignment by name, and notifies all connected clients of the change. A load assignment may contain many endpoints, this deletes them all.
func (*Server) ListClusters ¶
func (s *Server) ListClusters() []*envoy_config_cluster_v3.Cluster
ListClusters returns the clusters that we are managing. Meant to mirror kubernetes's cache.Store API.
func (*Server) ListEndpoints ¶
func (s *Server) ListEndpoints() []*envoy_config_endpoint_v3.ClusterLoadAssignment
ListEndpoints returns the load assignments / endpoints that we are managing.
func (*Server) ReplaceClusters ¶
ReplaceClusters replaces all tracked clusters with a new list of clusters.
func (*Server) ReplaceEndpoints ¶
func (s *Server) ReplaceEndpoints(ctx context.Context, es []*envoy_config_endpoint_v3.ClusterLoadAssignment) error
ReplaceEndpoints replaces all load assignments with a new set of load assignments.
func (*Server) StreamClusters ¶
func (s *Server) StreamClusters(stream clusterservice.ClusterDiscoveryService_StreamClustersServer) error
StreamClusters implements CDS.
func (*Server) StreamEndpoints ¶
func (s *Server) StreamEndpoints(stream endpointservice.EndpointDiscoveryService_StreamEndpointsServer) error
StreamEndpoints implements EDS.