v1

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GroupName = "networking.k8s.io"
	Version   = "v1"
)

Variables

View Source
var (
	NetworkPolicyGroupVersionKind = schema.GroupVersionKind{
		Version: Version,
		Group:   GroupName,
		Kind:    "NetworkPolicy",
	}
	NetworkPolicyResource = metav1.APIResource{
		Name:         "networkpolicies",
		SingularName: "networkpolicy",
		Namespaced:   true,

		Kind: NetworkPolicyGroupVersionKind.Kind,
	}

	NetworkPolicyGroupVersionResource = schema.GroupVersionResource{
		Group:    GroupName,
		Version:  Version,
		Resource: "networkpolicies",
	}
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: Version}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns a Group qualified GroupKind

func NewNetworkPolicy

func NewNetworkPolicy(namespace, name string, obj v1.NetworkPolicy) *v1.NetworkPolicy

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type Client

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

func (*Client) NetworkPolicies

func (c *Client) NetworkPolicies(namespace string) NetworkPolicyInterface

type Interface

type Interface interface {
	NetworkPoliciesGetter
}

func NewFromControllerFactory added in v0.0.2

func NewFromControllerFactory(factory controller.SharedControllerFactory) (Interface, error)

type NetworkPoliciesGetter

type NetworkPoliciesGetter interface {
	NetworkPolicies(namespace string) NetworkPolicyInterface
}

type NetworkPolicyChangeHandlerFunc

type NetworkPolicyChangeHandlerFunc func(obj *v1.NetworkPolicy) (runtime.Object, error)

type NetworkPolicyController

type NetworkPolicyController interface {
	Generic() controller.GenericController
	Informer() cache.SharedIndexInformer
	Lister() NetworkPolicyLister
	AddHandler(ctx context.Context, name string, handler NetworkPolicyHandlerFunc)
	AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync NetworkPolicyHandlerFunc)
	AddClusterScopedHandler(ctx context.Context, name, clusterName string, handler NetworkPolicyHandlerFunc)
	AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler NetworkPolicyHandlerFunc)
	Enqueue(namespace, name string)
	EnqueueAfter(namespace, name string, after time.Duration)
}

type NetworkPolicyHandlerFunc

type NetworkPolicyHandlerFunc func(key string, obj *v1.NetworkPolicy) (runtime.Object, error)

func NewNetworkPolicyLifecycleAdapter

func NewNetworkPolicyLifecycleAdapter(name string, clusterScoped bool, client NetworkPolicyInterface, l NetworkPolicyLifecycle) NetworkPolicyHandlerFunc

type NetworkPolicyInterface

type NetworkPolicyInterface interface {
	ObjectClient() *objectclient.ObjectClient
	Create(*v1.NetworkPolicy) (*v1.NetworkPolicy, error)
	GetNamespaced(namespace, name string, opts metav1.GetOptions) (*v1.NetworkPolicy, error)
	Get(name string, opts metav1.GetOptions) (*v1.NetworkPolicy, error)
	Update(*v1.NetworkPolicy) (*v1.NetworkPolicy, error)
	Delete(name string, options *metav1.DeleteOptions) error
	DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
	List(opts metav1.ListOptions) (*v1.NetworkPolicyList, error)
	ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.NetworkPolicyList, error)
	Watch(opts metav1.ListOptions) (watch.Interface, error)
	DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
	Controller() NetworkPolicyController
	AddHandler(ctx context.Context, name string, sync NetworkPolicyHandlerFunc)
	AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync NetworkPolicyHandlerFunc)
	AddLifecycle(ctx context.Context, name string, lifecycle NetworkPolicyLifecycle)
	AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle NetworkPolicyLifecycle)
	AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync NetworkPolicyHandlerFunc)
	AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync NetworkPolicyHandlerFunc)
	AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle NetworkPolicyLifecycle)
	AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle NetworkPolicyLifecycle)
}

type NetworkPolicyLifecycle

type NetworkPolicyLifecycle interface {
	Create(obj *v1.NetworkPolicy) (runtime.Object, error)
	Remove(obj *v1.NetworkPolicy) (runtime.Object, error)
	Updated(obj *v1.NetworkPolicy) (runtime.Object, error)
}

type NetworkPolicyLister

type NetworkPolicyLister interface {
	List(namespace string, selector labels.Selector) (ret []*v1.NetworkPolicy, err error)
	Get(namespace, name string) (*v1.NetworkPolicy, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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