Documentation
¶
Index ¶
- Constants
- Variables
- func ProbeNetworkProviders()
- type ActivateResponse
- type CheckTenantIDRequest
- type CheckTenantIDResponse
- type CreateLoadBalancerRequest
- type CreateLoadBalancerResponse
- type CreateLoadBalancerResult
- type CreateNetworkRequest
- type CreateNetworkResponse
- type DeleteLoadBalancerRequest
- type DeleteLoadBalancerResponse
- type DeleteNetworkRequest
- type DeleteNetworkResponse
- type GetLoadBalancerRequest
- type GetLoadBalancerResponse
- type GetNetworkRequest
- type GetNetworkResponse
- type LocalRegistry
- type Plugin
- func (p *Plugin) CheckTenantID(tenantID string) (bool, error)
- func (p *Plugin) CreateLoadBalancer(loadBalancer *networkprovider.LoadBalancer, affinity api.ServiceAffinity) (string, error)
- func (p *Plugin) CreateNetwork(network *networkprovider.Network) error
- func (p *Plugin) DeleteLoadBalancer(name string) error
- func (p *Plugin) DeleteNetwork(networkName string) error
- func (p *Plugin) GetLoadBalancer(name string) (*networkprovider.LoadBalancer, error)
- func (p *Plugin) GetNetwork(networkName string) (*networkprovider.Network, error)
- func (p *Plugin) GetNetworkByID(networkID string) (*networkprovider.Network, error)
- func (p *Plugin) LoadBalancers() networkprovider.LoadBalancers
- func (p *Plugin) Networks() networkprovider.Networks
- func (p *Plugin) PodStatus(podName, namespace, podInfraContainerID string, ...) (string, error)
- func (p *Plugin) Pods() networkprovider.Pods
- func (p *Plugin) ProviderName() string
- func (p *Plugin) SetupPod(podName, namespace, podInfraContainerID string, ...) error
- func (p *Plugin) TeardownPod(podName, namespace, podInfraContainerID string, ...) error
- func (p *Plugin) UpdateLoadBalancer(name string, hosts []*networkprovider.HostPort, externalIPs []string) (string, error)
- func (p *Plugin) UpdateNetwork(network *networkprovider.Network) error
- type Plugins
- type PodStatusRequest
- type PodStatusResponse
- type PodStatusResult
- type Registry
- type Response
- type SetupPodRequest
- type SetupPodResponse
- type TeardownPodRequest
- type TeardownPodResponse
- type UpdateLoadBalancerRequest
- type UpdateLoadBalancerResponse
- type UpdateLoadBalancerResult
- type UpdateNetworkRequest
- type UpdateNetworkResponse
Constants ¶
View Source
const ( // NetworkController methods ActivateMethod = "Activate" GetNetworkMethod = "GetNetwork" CreateNetworkMethod = "CreateNetwork" UpdateNetworkMethod = "UpdateNetwork" CheckTenantIDMethod = "CheckTenantID" DeleteNetworkMethod = "DeleteNetwork" GetLoadBalancerMethod = "GetLoadBalancer" CreateLoadBalancerMethod = "CreateLoadBalancer" UpdateLoadBalancerMethod = "UpdateLoadBalancer" DeleteLoadBalancerMethod = "DeleteLoadBalancer" // Kubelet methods SetupPodMethod = "SetupPod" TeardownPodMethod = "TeardownPod" PodStatudMethod = "PodStatus" )
Variables ¶
View Source
var ( // ErrNotFound plugin not found ErrNotFound = errors.New("Plugin not found") PluginsPath = "/usr/lib/kubernetes/plugins" )
Functions ¶
func ProbeNetworkProviders ¶
func ProbeNetworkProviders()
Types ¶
type ActivateResponse ¶
type CheckTenantIDRequest ¶
type CheckTenantIDRequest struct {
TenantID string `json:"tenantID,omitempty"`
}
type CheckTenantIDResponse ¶
type CreateLoadBalancerRequest ¶
type CreateLoadBalancerRequest struct { LoadBalancer *networkprovider.LoadBalancer `json:"loadBalancer"` Affinity api.ServiceAffinity `json:"affinity"` }
type CreateLoadBalancerResponse ¶
type CreateLoadBalancerResponse struct { Result *CreateLoadBalancerResult `json:"Result"` Response }
type CreateLoadBalancerResult ¶
type CreateLoadBalancerResult struct {
VIP string `json:"VIP"`
}
type CreateNetworkRequest ¶
type CreateNetworkRequest struct {
Network *networkprovider.Network `json:"Network,omitempty"`
}
type CreateNetworkResponse ¶
type CreateNetworkResponse struct {
Response
}
type DeleteLoadBalancerRequest ¶
type DeleteLoadBalancerRequest struct {
Name string `json:"name"`
}
type DeleteLoadBalancerResponse ¶
type DeleteLoadBalancerResponse struct {
Response
}
type DeleteNetworkRequest ¶
type DeleteNetworkRequest struct {
Name string `json:"name"`
}
type DeleteNetworkResponse ¶
type DeleteNetworkResponse struct {
Response
}
type GetLoadBalancerRequest ¶
type GetLoadBalancerRequest struct {
Name string `json:"name"`
}
type GetLoadBalancerResponse ¶
type GetLoadBalancerResponse struct { Response Result *networkprovider.LoadBalancer `json:"Result"` }
type GetNetworkRequest ¶
type GetNetworkResponse ¶
type GetNetworkResponse struct { Response Result *networkprovider.Network `json:"Result"` }
type LocalRegistry ¶
type LocalRegistry struct{}
LocalRegistry defines a registry that is local (using unix socket).
type Plugin ¶
type Plugin struct { // Name of the plugin Name string `json:"-"` // Address of the plugin Addr string // TLS configuration of the plugin TLSConfig tlsconfig.Options // Client attached to the plugin Client *sock.Client `json:"-"` // contains filtered or unexported fields }
Plugin is the definition of a docker plugin.
func (*Plugin) CreateLoadBalancer ¶
func (p *Plugin) CreateLoadBalancer(loadBalancer *networkprovider.LoadBalancer, affinity api.ServiceAffinity) (string, error)
Create load balancer, return ip and externalIP
func (*Plugin) CreateNetwork ¶
func (p *Plugin) CreateNetwork(network *networkprovider.Network) error
Create network
func (*Plugin) DeleteLoadBalancer ¶
Delete load balancer
func (*Plugin) DeleteNetwork ¶
Delete network by networkName
func (*Plugin) GetLoadBalancer ¶
func (p *Plugin) GetLoadBalancer(name string) (*networkprovider.LoadBalancer, error)
Get load balancer by name
func (*Plugin) GetNetwork ¶
func (p *Plugin) GetNetwork(networkName string) (*networkprovider.Network, error)
Get network by networkName
func (*Plugin) GetNetworkByID ¶
func (p *Plugin) GetNetworkByID(networkID string) (*networkprovider.Network, error)
Get network by networkID
func (*Plugin) LoadBalancers ¶
func (p *Plugin) LoadBalancers() networkprovider.LoadBalancers
LoadBalancer interface is self
func (*Plugin) Networks ¶
func (p *Plugin) Networks() networkprovider.Networks
Network interface is self
func (*Plugin) PodStatus ¶
func (p *Plugin) PodStatus(podName, namespace, podInfraContainerID string, network *networkprovider.Network, containerRuntime string) (string, error)
Status of pod
func (*Plugin) ProviderName ¶
func (*Plugin) SetupPod ¶
func (p *Plugin) SetupPod(podName, namespace, podInfraContainerID string, network *networkprovider.Network, containerRuntime string) error
Setup pod
func (*Plugin) TeardownPod ¶
func (p *Plugin) TeardownPod(podName, namespace, podInfraContainerID string, network *networkprovider.Network, containerRuntime string) error
Teardown pod
func (*Plugin) UpdateLoadBalancer ¶
func (p *Plugin) UpdateLoadBalancer(name string, hosts []*networkprovider.HostPort, externalIPs []string) (string, error)
Update load balancer, return externalIP
func (*Plugin) UpdateNetwork ¶
func (p *Plugin) UpdateNetwork(network *networkprovider.Network) error
Update network
type PodStatusRequest ¶
type PodStatusResponse ¶
type PodStatusResponse struct { Result *PodStatusResult `json:"Result"` Response }
type PodStatusResult ¶
type PodStatusResult struct {
IP string `json:"IP,omitempty"`
}
type Registry ¶
type Registry interface { // Plugins lists all plugins. Plugins() ([]*Plugin, error) // Plugin returns the plugin registered with the given name (or returns an error). Plugin(name string) (*Plugin, error) }
Registry defines behavior of a registry of plugins.
type SetupPodRequest ¶
type SetupPodResponse ¶
type SetupPodResponse struct {
Response
}
type TeardownPodRequest ¶
type TeardownPodResponse ¶
type TeardownPodResponse struct {
Response
}
type UpdateLoadBalancerRequest ¶
type UpdateLoadBalancerRequest struct { Name string `json:"name"` Hosts []*networkprovider.HostPort `json:"hosts"` ExternalIPs []string `json:"externalIPs"` }
type UpdateLoadBalancerResponse ¶
type UpdateLoadBalancerResponse struct { Result *UpdateLoadBalancerResult `json:"Result"` Response }
type UpdateLoadBalancerResult ¶
type UpdateLoadBalancerResult struct {
VIP string `json:"VIP,omitempty"`
}
type UpdateNetworkRequest ¶
type UpdateNetworkRequest struct {
Network *networkprovider.Network `json:"Network,omitempty"`
}
type UpdateNetworkResponse ¶
type UpdateNetworkResponse struct {
Response
}
Click to show internal directories.
Click to hide internal directories.