plugin

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 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) 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) CreatePeerHost

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

CreatePeerHost creates an peer host 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) DeleteNetwork

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

DeleteNetwork deletes a network provided by the ID.

func (*NetPlugin) DeletePeerHost

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

DeletePeerHost destroys a peer host for an ID.

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