v1

package
v0.0.0-...-ecb463d Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2019 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,
	}
)
View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: Version}

SchemeGroupVersion is group version used to register these objects

Functions

func Factory

func Factory(ctx context.Context, config rest.Config) (context.Context, controller.Starter, error)

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 {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*Client) NetworkPolicies

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

func (*Client) RESTClient

func (c *Client) RESTClient() rest.Interface

func (*Client) Start

func (c *Client) Start(ctx context.Context, threadiness int) error

func (*Client) Sync

func (c *Client) Sync(ctx context.Context) error

type Clients

type Clients struct {
	Interface Interface

	NetworkPolicy NetworkPolicyClient
}

func ClientsFrom

func ClientsFrom(ctx context.Context) *Clients

func NewClients

func NewClients(config rest.Config) (*Clients, error)

func NewClientsFromInterface

func NewClientsFromInterface(iface Interface) *Clients

type Interface

type Interface interface {
	RESTClient() rest.Interface
	controller.Starter

	NetworkPoliciesGetter
}

func From

func From(ctx context.Context) Interface

func NewForConfig

func NewForConfig(config rest.Config) (Interface, error)

type NetworkPoliciesGetter

type NetworkPoliciesGetter interface {
	NetworkPolicies(namespace string) NetworkPolicyInterface
}

type NetworkPolicyChangeHandlerFunc

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

type NetworkPolicyClient

type NetworkPolicyClient interface {
	Create(*v1.NetworkPolicy) (*v1.NetworkPolicy, error)
	Get(namespace, name string, opts metav1.GetOptions) (*v1.NetworkPolicy, error)
	Update(*v1.NetworkPolicy) (*v1.NetworkPolicy, error)
	Delete(namespace, name string, options *metav1.DeleteOptions) error
	List(namespace string, opts metav1.ListOptions) (*NetworkPolicyList, error)
	Watch(opts metav1.ListOptions) (watch.Interface, error)

	Cache() NetworkPolicyClientCache

	OnCreate(ctx context.Context, name string, sync NetworkPolicyChangeHandlerFunc)
	OnChange(ctx context.Context, name string, sync NetworkPolicyChangeHandlerFunc)
	OnRemove(ctx context.Context, name string, sync NetworkPolicyChangeHandlerFunc)
	Enqueue(namespace, name string)

	Generic() controller.GenericController
	ObjectClient() *objectclient.ObjectClient
	Interface() NetworkPolicyInterface
}

type NetworkPolicyClientCache

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

	Index(name string, indexer NetworkPolicyIndexer)
	GetIndexed(name, key string) ([]*v1.NetworkPolicy, error)
}

type NetworkPolicyController

type NetworkPolicyController interface {
	Generic() controller.GenericController
	Informer() cache.SharedIndexInformer
	Lister() NetworkPolicyLister
	AddHandler(ctx context.Context, name string, handler NetworkPolicyHandlerFunc)
	AddClusterScopedHandler(ctx context.Context, name, clusterName string, handler NetworkPolicyHandlerFunc)
	Enqueue(namespace, name string)
	Sync(ctx context.Context) error
	Start(ctx context.Context, threadiness int) error
}

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 NetworkPolicyIndexer

type NetworkPolicyIndexer func(obj *v1.NetworkPolicy) ([]string, error)

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) (*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)
	AddLifecycle(ctx context.Context, name string, lifecycle NetworkPolicyLifecycle)
	AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync NetworkPolicyHandlerFunc)
	AddClusterScopedLifecycle(ctx context.Context, 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 NetworkPolicyList

type NetworkPolicyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []v1.NetworkPolicy `json:"items"`
}

func (*NetworkPolicyList) DeepCopy

func (in *NetworkPolicyList) DeepCopy() *NetworkPolicyList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicyList.

func (*NetworkPolicyList) DeepCopyInto

func (in *NetworkPolicyList) DeepCopyInto(out *NetworkPolicyList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NetworkPolicyList) DeepCopyObject

func (in *NetworkPolicyList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

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