v1

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Definitions for the Kubernetes types

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNetworkPolicyClient

func NewNetworkPolicyClient(client client.Client) *networkPolicyClient

Types

type Clientset

type Clientset interface {
	// clienset for the networking.k8s.io/v1/v1 APIs
	NetworkPolicies() NetworkPolicyClient
}

clienset for the networking.k8s.io/v1 APIs

func NewClientset

func NewClientset(client client.Client) Clientset

func NewClientsetFromConfig

func NewClientsetFromConfig(cfg *rest.Config) (Clientset, error)

type MulticlusterClientset

type MulticlusterClientset interface {
	// Cluster returns a Clientset for the given cluster
	Cluster(cluster string) (Clientset, error)
}

MulticlusterClientset for the networking.k8s.io/v1 APIs

func NewMulticlusterClientset

func NewMulticlusterClientset(client multicluster.Client) MulticlusterClientset

type MulticlusterNetworkPolicyClient

type MulticlusterNetworkPolicyClient interface {
	// Cluster returns a NetworkPolicyClient for the given cluster
	Cluster(cluster string) (NetworkPolicyClient, error)
}

Provides NetworkPolicyClients for multiple clusters.

func NewMulticlusterNetworkPolicyClient

func NewMulticlusterNetworkPolicyClient(client multicluster.Client) MulticlusterNetworkPolicyClient

type NetworkPolicyClient

type NetworkPolicyClient interface {
	NetworkPolicyReader
	NetworkPolicyWriter
	NetworkPolicyStatusWriter
}

Client knows how to perform CRUD operations on NetworkPolicys.

type NetworkPolicyReader

type NetworkPolicyReader interface {
	// Get retrieves a NetworkPolicy for the given object key
	GetNetworkPolicy(ctx context.Context, key client.ObjectKey) (*networking_k8s_io_v1.NetworkPolicy, error)

	// List retrieves list of NetworkPolicys for a given namespace and list options.
	ListNetworkPolicy(ctx context.Context, opts ...client.ListOption) (*networking_k8s_io_v1.NetworkPolicyList, error)
}

Reader knows how to read and list NetworkPolicys.

type NetworkPolicySlice

type NetworkPolicySlice []*NetworkPolicy

NetworkPolicySlice represents a slice of *NetworkPolicy

type NetworkPolicyStatusWriter

type NetworkPolicyStatusWriter interface {
	// Update updates the fields corresponding to the status subresource for the
	// given NetworkPolicy object.
	UpdateNetworkPolicyStatus(ctx context.Context, obj *networking_k8s_io_v1.NetworkPolicy, opts ...client.SubResourceUpdateOption) error

	// Patch patches the given NetworkPolicy object's subresource.
	PatchNetworkPolicyStatus(ctx context.Context, obj *networking_k8s_io_v1.NetworkPolicy, patch client.Patch, opts ...client.SubResourcePatchOption) error
}

StatusWriter knows how to update status subresource of a NetworkPolicy object.

type NetworkPolicyTransitionFunction

type NetworkPolicyTransitionFunction func(existing, desired *networking_k8s_io_v1.NetworkPolicy) error

NetworkPolicyTransitionFunction instructs the NetworkPolicyWriter how to transition between an existing NetworkPolicy object and a desired on an Upsert

type NetworkPolicyWriter

type NetworkPolicyWriter interface {
	// Create saves the NetworkPolicy object.
	CreateNetworkPolicy(ctx context.Context, obj *networking_k8s_io_v1.NetworkPolicy, opts ...client.CreateOption) error

	// Delete deletes the NetworkPolicy object.
	DeleteNetworkPolicy(ctx context.Context, key client.ObjectKey, opts ...client.DeleteOption) error

	// Update updates the given NetworkPolicy object.
	UpdateNetworkPolicy(ctx context.Context, obj *networking_k8s_io_v1.NetworkPolicy, opts ...client.UpdateOption) error

	// Patch patches the given NetworkPolicy object.
	PatchNetworkPolicy(ctx context.Context, obj *networking_k8s_io_v1.NetworkPolicy, patch client.Patch, opts ...client.PatchOption) error

	// DeleteAllOf deletes all NetworkPolicy objects matching the given options.
	DeleteAllOfNetworkPolicy(ctx context.Context, opts ...client.DeleteAllOfOption) error

	// Create or Update the NetworkPolicy object.
	UpsertNetworkPolicy(ctx context.Context, obj *networking_k8s_io_v1.NetworkPolicy, transitionFuncs ...NetworkPolicyTransitionFunction) error
}

Writer knows how to create, delete, and update NetworkPolicys.

Directories

Path Synopsis
Definitions for the Kubernetes Controllers
Definitions for the Kubernetes Controllers
mocks
Package mock_controller is a generated GoMock package.
Package mock_controller is a generated GoMock package.
Package mock_v1 is a generated GoMock package.
Package mock_v1 is a generated GoMock package.
mocks
Package mock_v1sets is a generated GoMock package.
Package mock_v1sets is a generated GoMock package.

Jump to

Keyboard shortcuts

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