policy

package
v1.1.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: 16 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 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

func NewPolicyController

func NewPolicyController(kubeController k8s.Controller, policyClient policyClientset.Interface, stop chan struct{}, msgBroker *messaging.Broker) (Controller, error)

NewPolicyController returns a policy.Controller interface related to functionality provided by the resources in 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
}

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