namespace

package
v0.1.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MonitorLabel is the annotation label used to indicate whether a namespace should be monitored by OSM.
	MonitorLabel = "openservicemesh.io/monitored-by"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a struct for all components necessary to connect to and maintain state of a Kubernetes cluster.

func (Client) GetAnnouncementsChannel added in v0.1.0

func (c Client) GetAnnouncementsChannel() <-chan interface{}

GetAnnouncementsChannel returns the announcement channel for the SMI client.

func (Client) IsMonitoredNamespace

func (c Client) IsMonitoredNamespace(namespace string) bool

IsMonitoredNamespace returns a boolean indicating if the namespace is among the list of monitored namespaces

func (Client) ListMonitoredNamespaces added in v0.1.0

func (c Client) ListMonitoredNamespaces() ([]string, error)

ListMonitoredNamespaces returns all namespaces that the mesh is monitoring.

type Controller

type Controller interface {
	// IsMonitoredNamespace returns whether a namespace with the given name is being monitored
	// by the mesh
	IsMonitoredNamespace(string) bool

	// ListMonitoredNamespaces returns the namespaces monitored by the mesh
	ListMonitoredNamespaces() ([]string, error)

	// GetAnnouncementsChannel returns the channel on which namespace makes announcements
	GetAnnouncementsChannel() <-chan interface{}
}

Controller is the controller interface for K8s namespaces

func NewNamespaceController

func NewNamespaceController(kubeClient kubernetes.Interface, meshName string, stop chan struct{}) Controller

NewNamespaceController implements namespace.Controller and creates the Kubernetes client to manage namespaces.

type FakeNamespaceController

type FakeNamespaceController struct {
	Controller
	// contains filtered or unexported fields
}

FakeNamespaceController is a fake namespace.Controller used for testing

func NewFakeNamespaceController

func NewFakeNamespaceController(monitoredNamespaces []string) FakeNamespaceController

NewFakeNamespaceController creates a fake namespace.Controler object for testing

func (FakeNamespaceController) GetAnnouncementsChannel added in v0.1.0

func (f FakeNamespaceController) GetAnnouncementsChannel() <-chan interface{}

GetAnnouncementsChannel returns the channel on which namespace makes announcements

func (FakeNamespaceController) IsMonitoredNamespace

func (f FakeNamespaceController) IsMonitoredNamespace(namespace string) bool

IsMonitoredNamespace returns if the namespace is monitored

func (FakeNamespaceController) ListMonitoredNamespaces added in v0.1.0

func (f FakeNamespaceController) ListMonitoredNamespaces() ([]string, error)

ListMonitoredNamespaces returns the namespaces monitored by the mesh

Jump to

Keyboard shortcuts

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