policy

package
v1.2.8 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package policy is a generated GoMock package.

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectAccessControlConflicts

func DetectAccessControlConflicts(x policyv1alpha1.AccessControl, y policyv1alpha1.AccessControl) []error

DetectAccessControlConflicts detects conflicts between the given AccessControl resources

func DetectIngressBackendConflicts

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

DetectIngressBackendConflicts detects conflicts between the given IngressBackend resources

Types

type Client

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

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

func NewPolicyController

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

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

func (*Client) GetAccessControlPolicy

func (c *Client) GetAccessControlPolicy(svc service.MeshService) *policyV1alpha1.AccessControl

GetAccessControlPolicy returns the AccessControl policy for the given backend MeshService

func (*Client) GetEgressSourceSecret

func (c *Client) GetEgressSourceSecret(secretReference corev1.SecretReference) (*corev1.Secret, error)

GetEgressSourceSecret returns the secret resource that matches the given options

func (*Client) GetIngressBackendPolicy

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

GetIngressBackendPolicy returns the IngressBackend policy for the given backend MeshService

func (*Client) GetUpstreamTrafficSetting

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

GetUpstreamTrafficSetting returns the UpstreamTrafficSetting resource that matches the given options

func (*Client) ListEgressGateways

func (c *Client) ListEgressGateways() []*policyV1alpha1.EgressGateway

ListEgressGateways lists egress gateways

func (*Client) ListEgressPoliciesForSourceIdentity

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

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 {
	// ListEgressGateways lists Egress gateways
	ListEgressGateways() []*policyv1alpha1.EgressGateway

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

	// GetEgressSourceSecret returns the secret resource that matches the given options
	GetEgressSourceSecret(corev1.SecretReference) (*corev1.Secret, error)

	// 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

	// GetAccessControlPolicy returns the AccessControl policy for the given backend MeshService
	GetAccessControlPolicy(service.MeshService) *policyv1alpha1.AccessControl

	// 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.flomesh.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) GetAccessControlPolicy

func (m *MockController) GetAccessControlPolicy(arg0 service.MeshService) *v1alpha1.AccessControl

GetAccessControlPolicy mocks base method.

func (*MockController) GetEgressSourceSecret

func (m *MockController) GetEgressSourceSecret(arg0 v1.SecretReference) (*v1.Secret, error)

GetEgressSourceSecret mocks base method.

func (*MockController) GetIngressBackendPolicy

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

GetIngressBackendPolicy mocks base method.

func (*MockController) GetUpstreamTrafficSetting

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

GetUpstreamTrafficSetting mocks base method.

func (*MockController) ListEgressGateways

func (m *MockController) ListEgressGateways() []*v1alpha1.EgressGateway

ListEgressGateways mocks base method.

func (*MockController) ListEgressPoliciesForSourceIdentity

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

ListEgressPoliciesForSourceIdentity mocks base method.

func (*MockController) ListRetryPolicies

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) GetAccessControlPolicy

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

GetAccessControlPolicy indicates an expected call of GetAccessControlPolicy.

func (*MockControllerMockRecorder) GetEgressSourceSecret

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

GetEgressSourceSecret indicates an expected call of GetEgressSourceSecret.

func (*MockControllerMockRecorder) GetIngressBackendPolicy

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

GetIngressBackendPolicy indicates an expected call of GetIngressBackendPolicy.

func (*MockControllerMockRecorder) GetUpstreamTrafficSetting

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

GetUpstreamTrafficSetting indicates an expected call of GetUpstreamTrafficSetting.

func (*MockControllerMockRecorder) ListEgressGateways

func (mr *MockControllerMockRecorder) ListEgressGateways() *gomock.Call

ListEgressGateways indicates an expected call of ListEgressGateways.

func (*MockControllerMockRecorder) ListEgressPoliciesForSourceIdentity

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

ListEgressPoliciesForSourceIdentity indicates an expected call of ListEgressPoliciesForSourceIdentity.

func (*MockControllerMockRecorder) ListRetryPolicies

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

ListRetryPolicies indicates an expected call of ListRetryPolicies.

type UpstreamTrafficSettingGetOpt

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