Documentation ¶
Index ¶
- func InitGlobalSettings(stateDriver core.StateDriver, inst *core.InstanceInfo) error
- type Config
- type Drivers
- type NetPlugin
- func (p *NetPlugin) AddBgp(id string) error
- func (p *NetPlugin) AddMaster(node core.ServiceInfo) error
- func (p *NetPlugin) AddPeerHost(node core.ServiceInfo) error
- func (p *NetPlugin) AddPolicyRule(id string) error
- func (p *NetPlugin) AddServiceLB(servicename string, spec *core.ServiceSpec) error
- func (p *NetPlugin) AddSvcSpec(svcName string, spec *core.ServiceSpec)
- func (p *NetPlugin) CreateEndpoint(id string) error
- func (p *NetPlugin) CreateHostAccPort(portName, globalIP string) (string, error)
- func (p *NetPlugin) CreateNetwork(id string) error
- func (p *NetPlugin) CreateRemoteEndpoint(id string) error
- func (p *NetPlugin) Deinit()
- func (p *NetPlugin) DelPolicyRule(id string) error
- func (p *NetPlugin) DelSvcSpec(svcName string, spec *core.ServiceSpec)
- func (p *NetPlugin) DeleteBgp(id string) error
- func (p *NetPlugin) DeleteEndpoint(id string) error
- func (p *NetPlugin) DeleteHostAccPort(portName string) error
- func (p *NetPlugin) DeleteMaster(node core.ServiceInfo) error
- func (p *NetPlugin) DeleteNetwork(id, subnet, nwType, encap string, pktTag, extPktTag int, Gw string, ...) error
- func (p *NetPlugin) DeletePeerHost(node core.ServiceInfo) error
- func (p *NetPlugin) DeleteRemoteEndpoint(id string) error
- func (p *NetPlugin) DeleteServiceLB(servicename string, spec *core.ServiceSpec) error
- func (p *NetPlugin) FetchEndpoint(id string) (core.State, error)
- func (p *NetPlugin) FetchNetwork(id string) (core.State, error)
- func (p *NetPlugin) GetEndpointStats() ([]byte, error)
- func (p *NetPlugin) GlobalConfigUpdate(cfg Config) error
- func (p *NetPlugin) Init(pluginConfig Config) error
- func (p *NetPlugin) InspectBgp() ([]byte, error)
- func (p *NetPlugin) InspectNameserver() ([]byte, error)
- func (p *NetPlugin) InspectState() ([]byte, error)
- func (p *NetPlugin) Reinit(cfg Config)
- func (p *NetPlugin) SvcProviderUpdate(servicename string, providers []string)
- func (p *NetPlugin) UpdateEndpointGroup(id string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitGlobalSettings ¶
func InitGlobalSettings(stateDriver core.StateDriver, inst *core.InstanceInfo) error
InitGlobalSettings initializes cluster-wide settings (e.g. fwd-mode)
Types ¶
type Config ¶
type Config struct { Drivers Drivers `json:"drivers"` Instance core.InstanceInfo `json:"plugin-instance"` }
Config has the configuration for the plugin
type Drivers ¶
type Drivers struct { Network string `json:"network"` Endpoint string `json:"endpoint"` State string `json:"state"` }
Drivers has driver config
type NetPlugin ¶
type NetPlugin struct { sync.Mutex ConfigFile string NetworkDriver core.NetworkDriver StateDriver core.StateDriver PluginConfig Config }
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) AddPolicyRule ¶
AddPolicyRule creates a policy rule
func (*NetPlugin) AddServiceLB ¶
func (p *NetPlugin) AddServiceLB(servicename string, spec *core.ServiceSpec) error
AddServiceLB adds service
func (*NetPlugin) AddSvcSpec ¶
func (p *NetPlugin) AddSvcSpec(svcName string, spec *core.ServiceSpec)
AddSvcSpec adds k8 service spec
func (*NetPlugin) CreateEndpoint ¶
CreateEndpoint creates an endpoint for a given ID.
func (*NetPlugin) CreateHostAccPort ¶
CreateHostAccPort creates a host access port
func (*NetPlugin) CreateNetwork ¶
CreateNetwork creates a network for a given ID.
func (*NetPlugin) CreateRemoteEndpoint ¶
CreateRemoteEndpoint creates an endpoint for a given ID.
func (*NetPlugin) Deinit ¶
func (p *NetPlugin) Deinit()
Deinit is a destructor for the NetPlugin configuration.
func (*NetPlugin) DelPolicyRule ¶
DelPolicyRule creates a policy rule
func (*NetPlugin) DelSvcSpec ¶
func (p *NetPlugin) DelSvcSpec(svcName string, spec *core.ServiceSpec)
DelSvcSpec deletes k8 service spec
func (*NetPlugin) DeleteEndpoint ¶
DeleteEndpoint destroys an endpoint for an ID.
func (*NetPlugin) DeleteHostAccPort ¶
DeleteHostAccPort creates a host access port
func (*NetPlugin) DeleteMaster ¶
func (p *NetPlugin) DeleteMaster(node core.ServiceInfo) error
DeleteMaster removes a master node
func (*NetPlugin) DeleteNetwork ¶
func (p *NetPlugin) DeleteNetwork(id, subnet, nwType, encap string, pktTag, extPktTag int, Gw string, tenant string) 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) DeleteRemoteEndpoint ¶
DeleteRemoteEndpoint destroys an endpoint for an ID.
func (*NetPlugin) DeleteServiceLB ¶
func (p *NetPlugin) DeleteServiceLB(servicename string, spec *core.ServiceSpec) error
DeleteServiceLB deletes service
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.
func (*NetPlugin) GetEndpointStats ¶
GetEndpointStats returns all endpoint stats
func (*NetPlugin) GlobalConfigUpdate ¶
GlobalConfigUpdate update global config
func (*NetPlugin) Init ¶
Init initializes the NetPlugin instance via the configuration string passed.
func (*NetPlugin) InspectBgp ¶
InspectBgp returns current state of the plugin
func (*NetPlugin) InspectNameserver ¶
InspectNameserver returns current state of the nameserver
func (*NetPlugin) InspectState ¶
InspectState returns current state of the plugin
func (*NetPlugin) SvcProviderUpdate ¶
SvcProviderUpdate function
func (*NetPlugin) UpdateEndpointGroup ¶
UpdateEndpointGroup updates the endpoint with the new endpointgroup specification for the given ID.