Documentation ¶
Index ¶
- type Config
- type NetPlugin
- func (p *NetPlugin) CreateEndpoint(id string) error
- func (p *NetPlugin) CreateNetwork(id string) error
- func (p *NetPlugin) CreatePeerHost(id string) error
- func (p *NetPlugin) Deinit()
- func (p *NetPlugin) DeleteEndpoint(id string) error
- func (p *NetPlugin) DeleteNetwork(id string) error
- func (p *NetPlugin) DeletePeerHost(id string) error
- func (p *NetPlugin) FetchEndpoint(id string) (core.State, error)
- func (p *NetPlugin) FetchNetwork(id string) (core.State, error)
- func (p *NetPlugin) Init(pluginConfig Config, configStr string) error
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 ¶
CreateEndpoint creates an endpoint for a given ID.
func (*NetPlugin) CreateNetwork ¶
CreateNetwork creates a network for a given ID.
func (*NetPlugin) CreatePeerHost ¶
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 ¶
DeleteEndpoint destroys an endpoint for an ID.
func (*NetPlugin) DeleteNetwork ¶
DeleteNetwork deletes a network provided by the ID.
func (*NetPlugin) DeletePeerHost ¶
DeletePeerHost destroys a peer host for an ID.
func (*NetPlugin) FetchEndpoint ¶
FetchEndpoint retrieves an endpoint's state for a given ID
func (*NetPlugin) FetchNetwork ¶
FetchNetwork retrieves a network's state given an ID.