smi

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2020 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheCollection

type CacheCollection struct {
	TrafficSplit   cache.Store
	HTTPRouteGroup cache.Store
	TCPRoute       cache.Store
	TrafficTarget  cache.Store
	Backpressure   cache.Store
}

CacheCollection is a struct of the Kubernetes caches used in OSM

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

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

GetAnnouncementsChannel returns the announcement channel for the SMI client.

func (*Client) GetBackpressurePolicy added in v0.3.0

func (c *Client) GetBackpressurePolicy(svc service.MeshService) *osmPolicy.Backpressure

GetBackpressurePolicy gets the Backpressure policy corresponding to the MeshService

func (*Client) ListHTTPTrafficSpecs

func (c *Client) ListHTTPTrafficSpecs() []*smiSpecs.HTTPRouteGroup

ListHTTPTrafficSpecs lists SMI HTTPRouteGroup resources

func (*Client) ListServiceAccounts

func (c *Client) ListServiceAccounts() []service.K8sServiceAccount

ListServiceAccounts lists ServiceAccounts specified in SMI TrafficTarget resources

func (*Client) ListTCPTrafficSpecs added in v0.4.0

func (c *Client) ListTCPTrafficSpecs() []*smiSpecs.TCPRoute

ListTCPTrafficSpecs lists SMI TCPRoute resources

func (*Client) ListTrafficSplitServices

func (c *Client) ListTrafficSplitServices() []service.WeightedService

ListTrafficSplitServices implements mesh.MeshSpec by returning the services observed from the given compute provider

func (*Client) ListTrafficSplits

func (c *Client) ListTrafficSplits() []*smiSplit.TrafficSplit

ListTrafficSplits implements mesh.MeshSpec by returning the list of traffic splits.

func (*Client) ListTrafficTargets

func (c *Client) ListTrafficTargets() []*smiAccess.TrafficTarget

ListTrafficTargets implements mesh.Topology by returning the list of traffic targets.

type InformerCollection

type InformerCollection struct {
	TrafficSplit   cache.SharedIndexInformer
	HTTPRouteGroup cache.SharedIndexInformer
	TCPRoute       cache.SharedIndexInformer
	TrafficTarget  cache.SharedIndexInformer
	Backpressure   cache.SharedIndexInformer
}

InformerCollection is a struct of the Kubernetes informers used in OSM

type MeshSpec

type MeshSpec interface {
	// ListTrafficSplits lists SMI TrafficSplit resources
	ListTrafficSplits() []*split.TrafficSplit

	// ListTrafficSplitServices lists WeightedServices for the services specified in TrafficSplit SMI resources
	ListTrafficSplitServices() []service.WeightedService

	// ListServiceAccounts lists ServiceAccount resources specified in SMI TrafficTarget resources
	ListServiceAccounts() []service.K8sServiceAccount

	// ListHTTPTrafficSpecs lists SMI HTTPRouteGroup resources
	ListHTTPTrafficSpecs() []*spec.HTTPRouteGroup

	// ListTCPTrafficSpecs lists SMI TCPRoute resources
	ListTCPTrafficSpecs() []*spec.TCPRoute

	// ListTrafficTargets lists SMI TrafficTarget resources
	ListTrafficTargets() []*target.TrafficTarget

	// GetBackpressurePolicy fetches the Backpressure policy for the MeshService
	GetBackpressurePolicy(service.MeshService) *backpressure.Backpressure

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

MeshSpec is an interface declaring functions, which provide the specs for a service mesh declared with SMI.

func NewFakeMeshSpecClient

func NewFakeMeshSpecClient() MeshSpec

NewFakeMeshSpecClient creates a fake Mesh Spec used for testing.

func NewMeshSpecClient

func NewMeshSpecClient(smiKubeConfig *rest.Config, kubeClient kubernetes.Interface, osmNamespace string, kubeController k8s.Controller, stop chan struct{}) (MeshSpec, error)

NewMeshSpecClient implements mesh.MeshSpec and creates the Kubernetes client, which retrieves SMI specific CRDs.

Jump to

Keyboard shortcuts

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