memory

package
v0.0.0-...-bfb2e02 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadDir

func LoadDir(dir string)

Read all resources. If any changes (updates, new files - delete is an update), will generate pushes. TODO: The resources can be merged on existing resources (patches/kustomization) !

Types

type FakeXdsUpdater

type FakeXdsUpdater struct {
	// Events tracks notifications received by the updater
	Events chan XdsEvent
}

FakeXdsUpdater is used to test the registry.

func NewFakeXDS

func NewFakeXDS() *FakeXdsUpdater

NewFakeXDS creates a XdsUpdater reporting events via a channel.

func (*FakeXdsUpdater) Clear

func (fx *FakeXdsUpdater) Clear()

Clear any pending event

func (*FakeXdsUpdater) ConfigUpdate

func (*FakeXdsUpdater) ConfigUpdate(bool)

func (*FakeXdsUpdater) EDSUpdate

func (fx *FakeXdsUpdater) EDSUpdate(shard, hostname string, entry []*model.IstioEndpoint) error

func (*FakeXdsUpdater) SvcUpdate

func (fx *FakeXdsUpdater) SvcUpdate(shard, hostname string, ports map[string]uint32, rports map[uint32]string)

SvcUpdate is called when a service port mapping definition is updated. This interface is WIP - labels, annotations and other changes to service may be updated to force a EDS and CDS recomputation and incremental push, as it doesn't affect LDS/RDS.

func (*FakeXdsUpdater) Wait

func (fx *FakeXdsUpdater) Wait(et string) *XdsEvent

func (*FakeXdsUpdater) WorkloadUpdate

func (fx *FakeXdsUpdater) WorkloadUpdate(id string, labels map[string]string, annotations map[string]string)

type XdsEvent

type XdsEvent struct {
	// Type of the event
	Type string

	// The id of the event
	ID string
}

XdsEvent is used to watch XdsEvents

Jump to

Keyboard shortcuts

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