store

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("resource not found")
)

Functions

func FilterClustersByLabels

func FilterClustersByLabels(clusters []*api.Cluster, labels map[string]string) []*api.Cluster

func FilterEndpointsByLabels

func FilterEndpointsByLabels(endpoints []*api.Endpoint, labels map[string]string) []*api.Endpoint

func FilterListenersByLabels

func FilterListenersByLabels(listeners []*api.Listener, labels map[string]string) []*api.Listener

func FilterRoutesByLabels

func FilterRoutesByLabels(routes []*api.Route, labels map[string]string) []*api.Route

func ToNamespacedName

func ToNamespacedName(node string) (string, string)

func ToNodeName

func ToNodeName(name, namespace string) string

Types

type ListOption

type ListOption func(*listOption)

func WithLabelFilter

func WithLabelFilter(labels map[string]string) ListOption

type Store

type Store interface {
	GetCluster(ctx context.Context, name, namespace string) (*api.Cluster, error)
	ListClustersByNamespace(ctx context.Context, namespace string) (*api.ClusterList, error)
	GetListener(ctx context.Context, name, namespace string) (*api.Listener, error)
	ListListenersByNamespace(ctx context.Context, namespace string) (*api.ListenerList, error)
	GetRoute(ctx context.Context, name, namespace string) (*api.Route, error)
	ListRoutesByNamespace(ctx context.Context, namespace string) (*api.RouteList, error)
	GetEndpoint(ctx context.Context, name, namespace string) (*api.Endpoint, error)
	ListEndpointsByNamespace(ctx context.Context, namespace string) (*api.EndpointList, error)
	GetPod(ctx context.Context, name, namespace string) (*corev1.Pod, error)
	ListPodsByNamespace(ctx context.Context, namespace string, options ...ListOption) (*corev1.PodList, error)
}

func New

func New(c client.Client, reader client.Reader) Store

Jump to

Keyboard shortcuts

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