Documentation ¶
Index ¶
- type NoopPlugin
- func (p *NoopPlugin) AckPodEvent(ctx context.Context, event *scalar.PodEvent)
- func (p *NoopPlugin) KillPod(podID string) error
- func (p *NoopPlugin) LaunchPod(podSpec *pbpod.PodSpec, podID, hostname string) error
- func (p *NoopPlugin) ReconcileHosts() ([]*scalar.HostInfo, error)
- func (p *NoopPlugin) Start() error
- func (p *NoopPlugin) Stop()
- type Plugin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NoopPlugin ¶
type NoopPlugin struct{}
func (*NoopPlugin) AckPodEvent ¶
func (p *NoopPlugin) AckPodEvent(ctx context.Context, event *scalar.PodEvent)
AckPodEvent is only implemented by mesos plugin. For K8s this is a noop.
func (*NoopPlugin) KillPod ¶
func (p *NoopPlugin) KillPod(podID string) error
KillPod kills a pod on a host.
func (*NoopPlugin) LaunchPod ¶
func (p *NoopPlugin) LaunchPod(podSpec *pbpod.PodSpec, podID, hostname string) error
LaunchPod launches a pod on a host.
func (*NoopPlugin) ReconcileHosts ¶
func (p *NoopPlugin) ReconcileHosts() ([]*scalar.HostInfo, error)
ReconcileHosts will return the current state of hosts in the cluster.
type Plugin ¶
type Plugin interface { // Start the plugin. Start() error // Stop the plugin. Stop() // LaunchPod launches a pod on a host. LaunchPod(podSpec *pbpod.PodSpec, podID, hostname string) error // KillPod kills a pod on a host. KillPod(podID string) error // AckPodEvent is only implemented by mesos plugin. For K8s this is a noop. AckPodEvent(ctx context.Context, event *scalar.PodEvent) // ReconcileHosts will return the current state of hosts in the cluster. ReconcileHosts() ([]*scalar.HostInfo, error) }
Plugin interface defines the Northbound API which would be implemented for different underlying cluster management systems.
func NewK8sPlugin ¶
func NewK8sPlugin( configPath string, podEventsCh chan<- *scalar.PodEvent, hostEventCh chan<- *scalar.HostEvent, ) (Plugin, error)
NewK8sPlugin returns a new instance of k8s plugin.
func NewNoopPlugin ¶
func NewNoopPlugin() Plugin
Click to show internal directories.
Click to hide internal directories.