plugin

package
v0.0.0-12-25-2015.10-1... Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2015 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Drivers struct {
		Network  string `json:"network"`
		Endpoint string `json:"endpoint"`
		State    string `json:"state"`
	}
	Instance core.InstanceInfo `json:"plugin-instance"`
}

Config has the configuration for the plugin

type NetPlugin

type NetPlugin struct {
	sync.Mutex
	ConfigFile    string
	NetworkDriver core.NetworkDriver
	StateDriver   core.StateDriver
}

NetPlugin is the configuration struct for the plugin bus. Network and Endpoint drivers are all present in `drivers/` and state drivers are present in `state/`.

func (*NetPlugin) AddMaster

func (p *NetPlugin) AddMaster(node core.ServiceInfo) error

AddMaster adds a master node.

func (*NetPlugin) AddPeerHost

func (p *NetPlugin) AddPeerHost(node core.ServiceInfo) error

AddPeerHost adds an peer host.

func (*NetPlugin) CreateEndpoint

func (p *NetPlugin) CreateEndpoint(id string) error

CreateEndpoint creates an endpoint for a given ID.

func (*NetPlugin) CreateNetwork

func (p *NetPlugin) CreateNetwork(id string) error

CreateNetwork creates a network for a given ID.

func (*NetPlugin) Deinit

func (p *NetPlugin) Deinit()

Deinit is a destructor for the NetPlugin configuration.

func (*NetPlugin) DeleteEndpoint

func (p *NetPlugin) DeleteEndpoint(id string) error

DeleteEndpoint destroys an endpoint for an ID.

func (*NetPlugin) DeleteMaster

func (p *NetPlugin) DeleteMaster(node core.ServiceInfo) error

DeleteMaster removes a master node

func (*NetPlugin) DeleteNetwork

func (p *NetPlugin) DeleteNetwork(id, encap string, pktTag, extPktTag int) error

DeleteNetwork deletes a network provided by the ID.

func (*NetPlugin) DeletePeerHost

func (p *NetPlugin) DeletePeerHost(node core.ServiceInfo) error

DeletePeerHost removes a peer host.

func (*NetPlugin) FetchEndpoint

func (p *NetPlugin) FetchEndpoint(id string) (core.State, error)

FetchEndpoint retrieves an endpoint's state for a given ID

func (*NetPlugin) FetchNetwork

func (p *NetPlugin) FetchNetwork(id string) (core.State, error)

FetchNetwork retrieves a network's state given an ID.

func (*NetPlugin) Init

func (p *NetPlugin) Init(pluginConfig Config, configStr string) error

Init initializes the NetPlugin instance via the configuration string passed.

Jump to

Keyboard shortcuts

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