Documentation
¶
Index ¶
- type DeltaStream
- type Stream
- type Subscription
- func (s Subscription) IsWildcard() bool
- func (s Subscription) ReturnedResources() map[string]string
- func (s *Subscription) SetResourceSubscription(subscribed []string)
- func (s *Subscription) SetReturnedResources(resourceVersions map[string]string)
- func (s Subscription) SubscribedResources() map[string]struct{}
- func (s *Subscription) UpdateResourceSubscriptions(subscribed, unsubscribed []string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeltaStream ¶
type DeltaStream interface {
grpc.ServerStream
Send(*discovery.DeltaDiscoveryResponse) error
Recv() (*discovery.DeltaDiscoveryRequest, error)
}
Generic RPC Stream for the delta based xDS protocol.
type Stream ¶
type Stream interface {
grpc.ServerStream
Send(*discovery.DiscoveryResponse) error
Recv() (*discovery.DiscoveryRequest, error)
}
Generic RPC stream for state of the world.
type Subscription ¶ added in v0.14.0
type Subscription struct {
// contains filtered or unexported fields
}
Subscription stores the server view of a given type subscription in a stream.
func NewDeltaSubscription ¶ added in v0.14.0
func NewDeltaSubscription(subscribed, unsubscribed []string, initialResourceVersions map[string]string, allowLegacyWildcard bool) Subscription
func NewSotwSubscription ¶ added in v0.14.0
func NewSotwSubscription(subscribed []string, allowLegacyWildcard bool) Subscription
func (Subscription) IsWildcard ¶ added in v0.14.0
func (s Subscription) IsWildcard() bool
IsWildcard returns whether or not the subscription currently has a wildcard watch
func (Subscription) ReturnedResources ¶ added in v0.14.0
func (s Subscription) ReturnedResources() map[string]string
ReturnedResources returns the list of resources returned to the client and their version
func (*Subscription) SetResourceSubscription ¶ added in v0.14.0
func (s *Subscription) SetResourceSubscription(subscribed []string)
SetResourceSubscription updates the subscribed resources (including the wildcard state) based on the full state of subscribed resources provided in the request Used in sotw subscriptions Behavior is based on https://www.envoyproxy.io/docs/envoy/latest/api-docs/xds_protocol#how-the-client-specifies-what-resources-to-return
func (*Subscription) SetReturnedResources ¶ added in v0.14.0
func (s *Subscription) SetReturnedResources(resourceVersions map[string]string)
SetReturnedResources sets a list of resource versions currently known by the client The cache can use this state to compute resources added/updated/deleted
func (Subscription) SubscribedResources ¶ added in v0.14.0
func (s Subscription) SubscribedResources() map[string]struct{}
SubscribedResources returns the list of resources currently explicitly subscribed to If the request is set to wildcard it may be empty
func (*Subscription) UpdateResourceSubscriptions ¶ added in v0.14.0
func (s *Subscription) UpdateResourceSubscriptions(subscribed, unsubscribed []string)
UpdateResourceSubscriptions updates the subscribed resources (including the wildcard state) based on newly subscribed or unsubscribed resources Used in delta subscriptions