Documentation
¶
Overview ¶
Package smi is a generated GoMock package.
Index ¶
- type CacheCollection
- type Client
- func (c *Client) GetAnnouncementsChannel() <-chan a.Announcement
- func (c *Client) GetBackpressurePolicy(svc service.MeshService) *osmPolicy.Backpressure
- func (c *Client) GetTCPRoute(namespacedName string) *smiSpecs.TCPRoute
- func (c *Client) ListHTTPTrafficSpecs() []*smiSpecs.HTTPRouteGroup
- func (c *Client) ListServiceAccounts() []service.K8sServiceAccount
- func (c *Client) ListTCPTrafficSpecs() []*smiSpecs.TCPRoute
- func (c *Client) ListTrafficSplitServices() []service.WeightedService
- func (c *Client) ListTrafficSplits() []*smiSplit.TrafficSplit
- func (c *Client) ListTrafficTargets() []*smiAccess.TrafficTarget
- type InformerCollection
- type MeshSpec
- type MockMeshSpec
- func (m *MockMeshSpec) EXPECT() *MockMeshSpecMockRecorder
- func (m *MockMeshSpec) GetBackpressurePolicy(arg0 service.MeshService) *v1alpha1.Backpressure
- func (m *MockMeshSpec) GetTCPRoute(arg0 string) *v1alpha4.TCPRoute
- func (m *MockMeshSpec) ListHTTPTrafficSpecs() []*v1alpha4.HTTPRouteGroup
- func (m *MockMeshSpec) ListServiceAccounts() []service.K8sServiceAccount
- func (m *MockMeshSpec) ListTCPTrafficSpecs() []*v1alpha4.TCPRoute
- func (m *MockMeshSpec) ListTrafficSplitServices() []service.WeightedService
- func (m *MockMeshSpec) ListTrafficSplits() []*v1alpha2.TrafficSplit
- func (m *MockMeshSpec) ListTrafficTargets() []*v1alpha3.TrafficTarget
- type MockMeshSpecMockRecorder
- func (mr *MockMeshSpecMockRecorder) GetBackpressurePolicy(arg0 interface{}) *gomock.Call
- func (mr *MockMeshSpecMockRecorder) GetTCPRoute(arg0 interface{}) *gomock.Call
- func (mr *MockMeshSpecMockRecorder) ListHTTPTrafficSpecs() *gomock.Call
- func (mr *MockMeshSpecMockRecorder) ListServiceAccounts() *gomock.Call
- func (mr *MockMeshSpecMockRecorder) ListTCPTrafficSpecs() *gomock.Call
- func (mr *MockMeshSpecMockRecorder) ListTrafficSplitServices() *gomock.Call
- func (mr *MockMeshSpecMockRecorder) ListTrafficSplits() *gomock.Call
- func (mr *MockMeshSpecMockRecorder) ListTrafficTargets() *gomock.Call
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 a.Announcement
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) GetTCPRoute ¶ added in v0.7.0
GetTCPRoute returns an SMI TCPRoute resource given its name of the form <namespace>/<name>
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
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
// GetTCPRoute returns an SMI TCPRoute resource given its name of the form <namespace>/<name>
GetTCPRoute(string) *spec.TCPRoute
// ListTrafficTargets lists SMI TrafficTarget resources
ListTrafficTargets() []*access.TrafficTarget
// GetBackpressurePolicy fetches the Backpressure policy for the MeshService
GetBackpressurePolicy(service.MeshService) *backpressure.Backpressure
}
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.
type MockMeshSpec ¶ added in v0.6.0
type MockMeshSpec struct {
// contains filtered or unexported fields
}
MockMeshSpec is a mock of MeshSpec interface
func NewMockMeshSpec ¶ added in v0.6.0
func NewMockMeshSpec(ctrl *gomock.Controller) *MockMeshSpec
NewMockMeshSpec creates a new mock instance
func (*MockMeshSpec) EXPECT ¶ added in v0.6.0
func (m *MockMeshSpec) EXPECT() *MockMeshSpecMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockMeshSpec) GetBackpressurePolicy ¶ added in v0.6.0
func (m *MockMeshSpec) GetBackpressurePolicy(arg0 service.MeshService) *v1alpha1.Backpressure
GetBackpressurePolicy mocks base method
func (*MockMeshSpec) GetTCPRoute ¶ added in v0.7.0
func (m *MockMeshSpec) GetTCPRoute(arg0 string) *v1alpha4.TCPRoute
GetTCPRoute mocks base method
func (*MockMeshSpec) ListHTTPTrafficSpecs ¶ added in v0.6.0
func (m *MockMeshSpec) ListHTTPTrafficSpecs() []*v1alpha4.HTTPRouteGroup
ListHTTPTrafficSpecs mocks base method
func (*MockMeshSpec) ListServiceAccounts ¶ added in v0.6.0
func (m *MockMeshSpec) ListServiceAccounts() []service.K8sServiceAccount
ListServiceAccounts mocks base method
func (*MockMeshSpec) ListTCPTrafficSpecs ¶ added in v0.6.0
func (m *MockMeshSpec) ListTCPTrafficSpecs() []*v1alpha4.TCPRoute
ListTCPTrafficSpecs mocks base method
func (*MockMeshSpec) ListTrafficSplitServices ¶ added in v0.6.0
func (m *MockMeshSpec) ListTrafficSplitServices() []service.WeightedService
ListTrafficSplitServices mocks base method
func (*MockMeshSpec) ListTrafficSplits ¶ added in v0.6.0
func (m *MockMeshSpec) ListTrafficSplits() []*v1alpha2.TrafficSplit
ListTrafficSplits mocks base method
func (*MockMeshSpec) ListTrafficTargets ¶ added in v0.6.0
func (m *MockMeshSpec) ListTrafficTargets() []*v1alpha3.TrafficTarget
ListTrafficTargets mocks base method
type MockMeshSpecMockRecorder ¶ added in v0.6.0
type MockMeshSpecMockRecorder struct {
// contains filtered or unexported fields
}
MockMeshSpecMockRecorder is the mock recorder for MockMeshSpec
func (*MockMeshSpecMockRecorder) GetBackpressurePolicy ¶ added in v0.6.0
func (mr *MockMeshSpecMockRecorder) GetBackpressurePolicy(arg0 interface{}) *gomock.Call
GetBackpressurePolicy indicates an expected call of GetBackpressurePolicy
func (*MockMeshSpecMockRecorder) GetTCPRoute ¶ added in v0.7.0
func (mr *MockMeshSpecMockRecorder) GetTCPRoute(arg0 interface{}) *gomock.Call
GetTCPRoute indicates an expected call of GetTCPRoute
func (*MockMeshSpecMockRecorder) ListHTTPTrafficSpecs ¶ added in v0.6.0
func (mr *MockMeshSpecMockRecorder) ListHTTPTrafficSpecs() *gomock.Call
ListHTTPTrafficSpecs indicates an expected call of ListHTTPTrafficSpecs
func (*MockMeshSpecMockRecorder) ListServiceAccounts ¶ added in v0.6.0
func (mr *MockMeshSpecMockRecorder) ListServiceAccounts() *gomock.Call
ListServiceAccounts indicates an expected call of ListServiceAccounts
func (*MockMeshSpecMockRecorder) ListTCPTrafficSpecs ¶ added in v0.6.0
func (mr *MockMeshSpecMockRecorder) ListTCPTrafficSpecs() *gomock.Call
ListTCPTrafficSpecs indicates an expected call of ListTCPTrafficSpecs
func (*MockMeshSpecMockRecorder) ListTrafficSplitServices ¶ added in v0.6.0
func (mr *MockMeshSpecMockRecorder) ListTrafficSplitServices() *gomock.Call
ListTrafficSplitServices indicates an expected call of ListTrafficSplitServices
func (*MockMeshSpecMockRecorder) ListTrafficSplits ¶ added in v0.6.0
func (mr *MockMeshSpecMockRecorder) ListTrafficSplits() *gomock.Call
ListTrafficSplits indicates an expected call of ListTrafficSplits
func (*MockMeshSpecMockRecorder) ListTrafficTargets ¶ added in v0.6.0
func (mr *MockMeshSpecMockRecorder) ListTrafficTargets() *gomock.Call
ListTrafficTargets indicates an expected call of ListTrafficTargets