network

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2016 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package network provides Registry interface and it's REST implementation for storing Network api objects.

Index

Constants

This section is empty.

Variables

View Source
var StatusStrategy = networkStatusStrategy{Strategy}
View Source
var Strategy = networkStrategy{api.Scheme, api.SimpleNameGenerator}

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

Functions

func MatchNetwork

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

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

func NetworkToSelectableFields

func NetworkToSelectableFields(network *api.Network) labels.Set

NetworkToSelectableFields returns a label set that represents the object

Types

type Registry

type Registry interface {
	// ListNetworks obtains a list of Networks having labels which match selector.
	ListNetworks(ctx api.Context, options *api.ListOptions) (*api.NetworkList, error)
	// Watch for new/changed/deleted Networks
	WatchNetworks(ctx api.Context, options *api.ListOptions) (watch.Interface, error)
	// Get a specific Network
	GetNetwork(ctx api.Context, NetworkID string) (*api.Network, error)
	// Create a Network based on a specification.
	CreateNetwork(ctx api.Context, Network *api.Network) error
	// Update an existing Network
	UpdateNetwork(ctx api.Context, Network *api.Network) error
	// Delete an existing Network
	DeleteNetwork(ctx api.Context, NetworkID string) error
}

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

func NewRegistry

func NewRegistry(s rest.StandardStorage) Registry

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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