hostsubnet

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2015 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Strategy = sdnStrategy{kapi.Scheme}

Strategy is the default logic that applies when creating and updating HostSubnet objects via the REST API.

Functions

func MatchHostSubnet

func MatchHostSubnet(label labels.Selector, field fields.Selector) generic.Matcher

MatchHostSubnet returns a generic matcher for a given label and field selector.

Types

type Registry

type Registry interface {
	// ListSubnets obtains a list of subnets
	ListSubnets(ctx kapi.Context) (*api.HostSubnetList, error)
	// GetSubnet returns a specific subnet
	GetSubnet(ctx kapi.Context, name string) (*api.HostSubnet, error)
	// CreateSubnet creates a HostSubnet
	CreateSubnet(ctx kapi.Context, hs *api.HostSubnet) (*api.HostSubnet, error)
	// DeleteSubnet deletes a hostsubnet
	DeleteSubnet(ctx kapi.Context, name string) error
}

Registry is an interface implemented by things that know how to store sdn objects.

func NewRegistry

func NewRegistry(s Storage) Registry

NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic.

type Storage

type Storage interface {
	rest.Lister
	rest.Getter

	Create(ctx kapi.Context, obj runtime.Object) (runtime.Object, error)
	Update(ctx kapi.Context, obj runtime.Object) (runtime.Object, bool, error)
	Delete(ctx kapi.Context, name string, opts *kapi.DeleteOptions) (runtime.Object, error)
}

Storage is an interface for a standard REST Storage backend TODO: move me somewhere common

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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