policy

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package policy is a generated GoMock package.

Package policy implements the Kubernetes client for the resources in the policy.openservicemesh.io API group

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectIngressBackendConflicts added in v0.10.0

func DetectIngressBackendConflicts(x policyv1alpha1.IngressBackend, y policyv1alpha1.IngressBackend) []error

DetectIngressBackendConflicts detects conflicts between the given IngressBackend resources

Types

type Client added in v1.2.0

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

Client is the type used to represent the Kubernetes Client for the policy.openservicemesh.io API group

func NewPolicyController

func NewPolicyController(informerCollection *informers.InformerCollection, kubeController k8s.Controller, msgBroker *messaging.Broker) *Client

NewPolicyController returns a policy.Controller interface related to functionality provided by the resources in the policy.openservicemesh.io API group

func (*Client) GetIngressBackendPolicy added in v1.2.0

func (c *Client) GetIngressBackendPolicy(svc service.MeshService) *policyV1alpha1.IngressBackend

GetIngressBackendPolicy returns the IngressBackend policy for the given backend MeshService

func (*Client) GetUpstreamTrafficSetting added in v1.2.0

func (c *Client) GetUpstreamTrafficSetting(options UpstreamTrafficSettingGetOpt) *policyV1alpha1.UpstreamTrafficSetting

GetUpstreamTrafficSetting returns the UpstreamTrafficSetting resource that matches the given options

func (*Client) ListEgressPoliciesForSourceIdentity added in v1.2.0

func (c *Client) ListEgressPoliciesForSourceIdentity(source identity.K8sServiceAccount) []*policyV1alpha1.Egress

ListEgressPoliciesForSourceIdentity lists the Egress policies for the given source identity based on service accounts

func (*Client) ListRetryPolicies added in v1.2.0

func (c *Client) ListRetryPolicies(source identity.K8sServiceAccount) []*policyV1alpha1.Retry

ListRetryPolicies returns the retry policies for the given source identity based on service accounts.

type Controller

type Controller interface {
	// ListEgressPoliciesForSourceIdentity lists the Egress policies for the given source identity
	ListEgressPoliciesForSourceIdentity(identity.K8sServiceAccount) []*policyv1alpha1.Egress

	// GetIngressBackendPolicy returns the IngressBackend policy for the given backend MeshService
	GetIngressBackendPolicy(service.MeshService) *policyv1alpha1.IngressBackend

	// ListRetryPolicies returns the Retry policies for the given source identity
	ListRetryPolicies(identity.K8sServiceAccount) []*policyv1alpha1.Retry

	// GetUpstreamTrafficSetting returns the UpstreamTrafficSetting resource that matches the given options
	GetUpstreamTrafficSetting(UpstreamTrafficSettingGetOpt) *policyv1alpha1.UpstreamTrafficSetting
}

Controller is the interface for the functionality provided by the resources part of the policy.openservicemesh.io API group

type MockController

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

MockController is a mock of Controller interface.

func NewMockController

func NewMockController(ctrl *gomock.Controller) *MockController

NewMockController creates a new mock instance.

func (*MockController) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockController) GetIngressBackendPolicy added in v0.10.0

func (m *MockController) GetIngressBackendPolicy(arg0 service.MeshService) *v1alpha1.IngressBackend

GetIngressBackendPolicy mocks base method.

func (*MockController) GetUpstreamTrafficSetting added in v1.1.0

func (m *MockController) GetUpstreamTrafficSetting(arg0 UpstreamTrafficSettingGetOpt) *v1alpha1.UpstreamTrafficSetting

GetUpstreamTrafficSetting mocks base method.

func (*MockController) ListEgressPoliciesForSourceIdentity

func (m *MockController) ListEgressPoliciesForSourceIdentity(arg0 identity.K8sServiceAccount) []*v1alpha1.Egress

ListEgressPoliciesForSourceIdentity mocks base method.

func (*MockController) ListRetryPolicies added in v1.1.0

func (m *MockController) ListRetryPolicies(arg0 identity.K8sServiceAccount) []*v1alpha1.Retry

ListRetryPolicies mocks base method.

type MockControllerMockRecorder

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

MockControllerMockRecorder is the mock recorder for MockController.

func (*MockControllerMockRecorder) GetIngressBackendPolicy added in v0.10.0

func (mr *MockControllerMockRecorder) GetIngressBackendPolicy(arg0 interface{}) *gomock.Call

GetIngressBackendPolicy indicates an expected call of GetIngressBackendPolicy.

func (*MockControllerMockRecorder) GetUpstreamTrafficSetting added in v1.1.0

func (mr *MockControllerMockRecorder) GetUpstreamTrafficSetting(arg0 interface{}) *gomock.Call

GetUpstreamTrafficSetting indicates an expected call of GetUpstreamTrafficSetting.

func (*MockControllerMockRecorder) ListEgressPoliciesForSourceIdentity

func (mr *MockControllerMockRecorder) ListEgressPoliciesForSourceIdentity(arg0 interface{}) *gomock.Call

ListEgressPoliciesForSourceIdentity indicates an expected call of ListEgressPoliciesForSourceIdentity.

func (*MockControllerMockRecorder) ListRetryPolicies added in v1.1.0

func (mr *MockControllerMockRecorder) ListRetryPolicies(arg0 interface{}) *gomock.Call

ListRetryPolicies indicates an expected call of ListRetryPolicies.

type UpstreamTrafficSettingGetOpt added in v1.1.0

type UpstreamTrafficSettingGetOpt struct {
	// MeshService specifies the mesh service known within the cluster
	// Must be specified when retrieving a resource matching the upstream
	// mesh service.
	MeshService *service.MeshService

	// NamespacedName specifies the name and namespace of the resource
	NamespacedName *types.NamespacedName

	// Host specifies the host field of matching UpstreamTrafficSettings
	// This field is not qualified by namespace because, by definition,
	// a properly formatted Host includes a namespace and UpstreamTrafficSetting
	// resources should not target services in different namespaces.
	Host string
}

UpstreamTrafficSettingGetOpt specifies the options used to filter UpstreamTrafficSetting objects as a part of its getter

Jump to

Keyboard shortcuts

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