executor

package
v0.15.1-0...-2e68002 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2015 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Package executor includes a mesos executor, which contains a kubelet as its member to manage containers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Kubelet              KubeletInterface
	Updates              chan<- interface{} // to send pod config updates to the kubelet
	SourceName           string
	APIClient            *client.Client
	Watch                watch.Interface
	Docker               dockertools.DockerInterface
	ShutdownAlert        func()
	SuicideTimeout       time.Duration
	KubeletFinished      <-chan struct{} // signals that kubelet Run() died
	ExitFunc             func(int)
	PodStatusFunc        func(KubeletInterface, *api.Pod) (*api.PodStatus, error)
	StaticPodsConfigPath string
}

type KubeletInterface

type KubeletInterface interface {
	GetHostIP() (net.IP, error)
}

KubeletInterface consists of the kubelet.Kubelet API's that we actually use

type KubernetesExecutor

type KubernetesExecutor struct {
	// contains filtered or unexported fields
}

KubernetesExecutor is an mesos executor that runs pods in a minion machine.

func New

func New(config Config) *KubernetesExecutor

New creates a new kubernetes executor.

func (*KubernetesExecutor) Disconnected

func (k *KubernetesExecutor) Disconnected(driver bindings.ExecutorDriver)

Disconnected is called when the executor is disconnected from the slave.

func (*KubernetesExecutor) Done

func (k *KubernetesExecutor) Done() <-chan struct{}

func (*KubernetesExecutor) Error

func (k *KubernetesExecutor) Error(driver bindings.ExecutorDriver, message string)

Error is called when some error happens.

func (*KubernetesExecutor) FrameworkMessage

func (k *KubernetesExecutor) FrameworkMessage(driver bindings.ExecutorDriver, message string)

FrameworkMessage is called when the framework sends some message to the executor

func (*KubernetesExecutor) Init

func (k *KubernetesExecutor) Init(driver bindings.ExecutorDriver)

func (*KubernetesExecutor) InitializeStaticPodsSource

func (k *KubernetesExecutor) InitializeStaticPodsSource(sourceFactory func())

InitializeStaticPodsSource blocks until initial regstration is complete and then creates a static pod source using the given factory func.

func (*KubernetesExecutor) KillTask

func (k *KubernetesExecutor) KillTask(driver bindings.ExecutorDriver, taskId *mesos.TaskID)

KillTask is called when the executor receives a request to kill a task.

func (*KubernetesExecutor) LaunchTask

func (k *KubernetesExecutor) LaunchTask(driver bindings.ExecutorDriver, taskInfo *mesos.TaskInfo)

LaunchTask is called when the executor receives a request to launch a task. The happens when the k8sm scheduler has decided to schedule the pod (which corresponds to a Mesos Task) onto the node where this executor is running, but the binding is not recorded in the Kubernetes store yet. This function is invoked to tell the executor to record the binding in the Kubernetes store and start the pod via the Kubelet.

func (*KubernetesExecutor) Registered

func (k *KubernetesExecutor) Registered(driver bindings.ExecutorDriver,
	executorInfo *mesos.ExecutorInfo, frameworkInfo *mesos.FrameworkInfo, slaveInfo *mesos.SlaveInfo)

Registered is called when the executor is successfully registered with the slave.

func (*KubernetesExecutor) Reregistered

func (k *KubernetesExecutor) Reregistered(driver bindings.ExecutorDriver, slaveInfo *mesos.SlaveInfo)

Reregistered is called when the executor is successfully re-registered with the slave. This can happen when the slave fails over.

func (*KubernetesExecutor) Shutdown

func (k *KubernetesExecutor) Shutdown(driver bindings.ExecutorDriver)

Shutdown is called when the executor receives a shutdown request.

Directories

Path Synopsis
Package config contains executor configuration constants.
Package config contains executor configuration constants.
Package messages exposes executor event/message names as constants.
Package messages exposes executor event/message names as constants.
Package service contains the cmd/k8sm-executor glue code.
Package service contains the cmd/k8sm-executor glue code.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL