Documentation ¶
Index ¶
- type Event
- type Updater
- func (fx *Updater) AssertEmpty(t test.Failer, dur time.Duration)
- func (fx *Updater) Clear()
- func (fx *Updater) ConfigUpdate(req *model.PushRequest)
- func (fx *Updater) EDSCacheUpdate(c model.ShardKey, hostname, ns string, entry []*model.IstioEndpoint)
- func (fx *Updater) EDSUpdate(c model.ShardKey, hostname string, ns string, entry []*model.IstioEndpoint)
- func (fx *Updater) MatchOrFail(t test.Failer, events ...Event)
- func (fx *Updater) ProxyUpdate(c cluster.ID, ip string)
- func (fx *Updater) RemoveShard(shardKey model.ShardKey)
- func (fx *Updater) StrictMatchOrFail(t test.Failer, events ...Event)
- func (fx *Updater) SvcUpdate(c model.ShardKey, hostname string, ns string, ev model.Event)
- func (fx *Updater) WaitOrFail(t test.Failer, et string) *Event
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { // Type of the event Type string // The id of the event ID string Reason model.ReasonStats Namespace string // The endpoints associated with an EDS push if any Endpoints []*model.IstioEndpoint // EndpointCount, used in matches only EndpointCount int }
Event is used to watch XdsEvents
type Updater ¶
type Updater struct { // Events tracks notifications received by the updater Events chan Event Delegate model.XDSUpdater // If SplitEvents is true, updates changing multiple objects will be split into multiple events with 1 item each // otherwise they are joined as a CSV SplitEvents bool }
Updater is used to test the registry.
func NewFakeXDS ¶
func NewFakeXDS() *Updater
NewFakeXDS creates a XdsUpdater reporting events via a channel.
func NewWithDelegate ¶
func NewWithDelegate(delegate model.XDSUpdater) *Updater
NewWithDelegate creates a XdsUpdater reporting events via a channel.
func (*Updater) AssertEmpty ¶
AssertEmpty ensures there are no events in the channel
func (*Updater) ConfigUpdate ¶
func (fx *Updater) ConfigUpdate(req *model.PushRequest)
func (*Updater) EDSCacheUpdate ¶
func (*Updater) MatchOrFail ¶
MatchOrFail expects the provided events to arrive, skipping unmatched events
func (*Updater) RemoveShard ¶
func (*Updater) StrictMatchOrFail ¶
StrictMatchOrFail expects the provided events to arrive, and nothing else
Click to show internal directories.
Click to hide internal directories.