{"modulePath":"github.com/stackpointcloud/kubernetes","version":"v1.3.4","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package executor\n\nPackage executor includes a mesos executor, which contains a kubelet as its member to manage containers.\n\n## Constants\n\n```go\nconst (\n\tPodEventBound podEventType = iota\n\tPodEventUpdated\n\tPodEventDeleted\n\tPodEventIncompatibleUpdate\n)\n```\n\n## Functions\n\n```go\nfunc IsUnsupportedUpdate(err error) bool\n```\n\n## Types\n\n```go\ntype Config struct {\n\tAPIClient         *clientset.Clientset\n\tDocker            dockertools.DockerInterface\n\tShutdownAlert     func()\n\tSuicideTimeout    time.Duration\n\tKubeletFinished   \u003c-chan struct{} // signals that kubelet Run() died\n\tExitFunc          func(int)\n\tLaunchGracePeriod time.Duration\n\tNodeInfos         chan\u003c- NodeInfo\n\tRegistry          Registry\n\tOptions           []Option // functional options\n}\n```\n\n```go\ntype Executor struct {\n\t// contains filtered or unexported fields\n}\n```\nKubernetesExecutor is an mesos executor that runs pods in a minion machine.\n\n```go\nfunc New(config Config) *Executor\n```\nNew creates a new kubernetes executor.\n\n```go\nfunc (k *Executor) Disconnected(driver bindings.ExecutorDriver)\n```\nDisconnected is called when the executor is disconnected from the slave.\n\n```go\nfunc (k *Executor) Done() \u003c-chan struct{}\n```\nDone returns a chan that closes when the executor is shutting down\n\n```go\nfunc (k *Executor) Error(driver bindings.ExecutorDriver, message string)\n```\nError is called when some error happens.\n\n```go\nfunc (k *Executor) FrameworkMessage(driver bindings.ExecutorDriver, message string)\n```\nFrameworkMessage is called when the framework sends some message to the executor\n\n```go\nfunc (k *Executor) Init(driver bindings.ExecutorDriver)\n```\n\n```go\nfunc (k *Executor) KillTask(driver bindings.ExecutorDriver, taskId *mesos.TaskID)\n```\nKillTask is called when the executor receives a request to kill a task.\n\n```go\nfunc (k *Executor) LaunchTask(driver bindings.ExecutorDriver, taskInfo *mesos.TaskInfo)\n```\nLaunchTask 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.\n\n```go\nfunc (k *Executor) Registered(\n\tdriver bindings.ExecutorDriver,\n\texecutorInfo *mesos.ExecutorInfo,\n\tframeworkInfo *mesos.FrameworkInfo,\n\tslaveInfo *mesos.SlaveInfo,\n)\n```\nRegistered is called when the executor is successfully registered with the slave.\n\n```go\nfunc (k *Executor) Reregistered(driver bindings.ExecutorDriver, slaveInfo *mesos.SlaveInfo)\n```\nReregistered is called when the executor is successfully re-registered with the slave. This can happen when the slave fails over.\n\n```go\nfunc (k *Executor) Shutdown(driver bindings.ExecutorDriver)\n```\nShutdown is called when the executor receives a shutdown request.\n\n```go\ntype NodeInfo struct {\n\tCores int\n\tMem   uint64 // in bytes\n}\n```\n\n```go\ntype Option func(*Executor)\n```\nOption is a functional option type for Executor\n\n```go\nfunc StaticPods(configPath string, f podutil.Filters) Option\n```\nStaticPods creates a static pods Option for an Executor\n\n```go\ntype PodEvent struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (rp *PodEvent) FormatShort() string\n```\n\n```go\nfunc (rp *PodEvent) Pod() *api.Pod\n```\n\n```go\nfunc (rp *PodEvent) Task() string\n```\n\n```go\ntype Registry interface {\n\t// Update modifies the registry's iternal representation of the pod; it may also\n\t// modify the pod argument itself. An update may fail because either a pod isn't\n\t// labeled with a task ID, the task ID is unknown, or the nature of the update may\n\t// be incompatible with what's supported in kubernetes-mesos.\n\tUpdate(pod *api.Pod) (*PodEvent, error)\n\n\t// Remove the task from this registry, returns an error if the taskID is unknown.\n\tRemove(taskID string) error\n\t// contains filtered or unexported methods\n}\n```\nRegistry is a state store for pod task metadata. Clients are expected to watch() the event stream to observe changes over time.\n\n```go\nfunc NewRegistry(client *clientset.Clientset) Registry\n```\n\n","path":"github.com/stackpointcloud/kubernetes/contrib/mesos/pkg/executor","name":"executor","synopsis":"Package executor includes a mesos executor, which contains a kubelet as its member to manage containers.","isRedistributable":true}
