Documentation
¶
Overview ¶
Package grpc provides a gRPC implementation of the Envoy v2 xDS API.
Index ¶
- func NewAPI(log logrus.FieldLogger, t *contour.Translator) *grpc.Server
- type CDS
- type ClusterCache
- type ClusterLoadAssignmentCache
- type EDS
- func (e *EDS) FetchEndpoints(context.Context, *v2.DiscoveryRequest) (*v2.DiscoveryResponse, error)
- func (e *EDS) Resources() ([]types.Any, error)
- func (e *EDS) StreamEndpoints(srv v2.EndpointDiscoveryService_StreamEndpointsServer) error
- func (e *EDS) StreamLoadStats(srv envoy_service_v2.LoadReportingService_StreamLoadStatsServer) error
- func (e *EDS) TypeURL() string
- type LDS
- type ListenerCache
- type RDS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAPI ¶
func NewAPI(log logrus.FieldLogger, t *contour.Translator) *grpc.Server
NewAPI returns a *grpc.Server which responds to the Envoy v2 xDS gRPC API.
Types ¶
type CDS ¶
type CDS struct {
logrus.FieldLogger
ClusterCache
// contains filtered or unexported fields
}
CDS implements the CDS v2 gRPC API.
func (*CDS) FetchClusters ¶
func (*CDS) Resources ¶
Resources returns the contents of CDS"s cache as a []types.Any. TODO(dfc) cache the results of Resources in the ClusterCache so we can avoid the error handling.
func (*CDS) StreamClusters ¶
type ClusterCache ¶
type ClusterCache interface {
// Values returns a copy of the contents of the cache.
// The slice and its contents should be treated as read-only.
Values() []*v2.Cluster
// Register registers ch to receive a value when Notify is called.
Register(chan int, int)
}
ClusterCache holds a set of computed v2.Cluster resources.
type ClusterLoadAssignmentCache ¶
type ClusterLoadAssignmentCache interface {
// Values returns a copy of the contents of the cache.
// The slice and its contents should be treated as read-only.
Values() []*v2.ClusterLoadAssignment
// Register registers ch to receive a value when Notify is called.
Register(chan int, int)
}
ClusterLoadAssignmentCache holds a set of computed v2.ClusterLoadAssignment resources.
type EDS ¶
type EDS struct {
logrus.FieldLogger
ClusterLoadAssignmentCache
// contains filtered or unexported fields
}
EDS implements the EDS v2 gRPC API.
func (*EDS) FetchEndpoints ¶
func (*EDS) Resources ¶
Resources returns the contents of EDS"s cache as a []types.Any. TODO(dfc) cache the results of Resources in the ClusterLoadAssignmentCache so we can avoid the error handling.
func (*EDS) StreamEndpoints ¶
func (*EDS) StreamLoadStats ¶
func (e *EDS) StreamLoadStats(srv envoy_service_v2.LoadReportingService_StreamLoadStatsServer) error
type LDS ¶
type LDS struct {
logrus.FieldLogger
ListenerCache
// contains filtered or unexported fields
}
LDS implements the LDS v2 gRPC API.
func (*LDS) FetchListeners ¶
func (*LDS) Resources ¶
Resources returns the contents of LDS"s cache as a []types.Any. TODO(dfc) cache the results of Resources in the ListenerCache so we can avoid the error handling.
func (*LDS) StreamListeners ¶
type ListenerCache ¶
type ListenerCache interface {
// Values returns a copy of the contents of the cache.
// The slice and its contents should be treated as read-only.
Values() []*v2.Listener
// Register registers ch to receive a value when Notify is called.
Register(chan int, int)
}
ListenerCache holds a set of computed v2.Listener resources.
type RDS ¶
type RDS struct {
logrus.FieldLogger
HTTP, HTTPS interface {
// Values returns a copy of the contents of the cache.
// The slice and its contents should be treated as read-only.
Values() []route.VirtualHost
}
*contour.Cond
// contains filtered or unexported fields
}
RDS implements the RDS v2 gRPC API.
func (*RDS) FetchRoutes ¶
func (*RDS) Resources ¶
Resources returns the contents of RDS"s cache as a []types.Any. TODO(dfc) cache the results of Resources in the VirtualHostCache so we can avoid the error handling.