datastore

package
v0.6.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Datastore

type Datastore interface {
	// This gets all endpoints for the given cluster ID
	GetEndpoints(clusterID string) ([]types.SubmarinerEndpoint, error)

	// Watches all clusters and calls the passed in function on cluster change
	WatchClusters(ctx context.Context, selfClusterID string, colorCodes []string, onClusterChange OnClusterChange) error

	// Performs a watch of all endpoints and calls the passed in function based on information
	WatchEndpoints(ctx context.Context, selfClusterID string, colorCodes []string, onEndpointChange OnEndpointChange) error

	// This should be called to set the local cluster information.
	SetCluster(cluster *types.SubmarinerCluster) error

	// This should only ever be called to set the endpoint of the local node.
	SetEndpoint(endpoint *types.SubmarinerEndpoint) error

	// This should be called to remove an endpoint from use
	RemoveEndpoint(clusterID, cableName string) error
}

type OnClusterChange added in v0.2.0

type OnClusterChange func(cluster *types.SubmarinerCluster, deleted bool) error

type OnEndpointChange added in v0.2.0

type OnEndpointChange func(endpoint *types.SubmarinerEndpoint, deleted bool) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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