mesosdriver

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: MIT Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecutorDriver

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

The ExecutorDriver does all the work of interacting with Mesos and the Agent and calls back to the TaskDelegate to handle starting and stopping tasks.

func NewExecutorDriver

func NewExecutorDriver(mesosConfig *config.Config, delegate TaskDelegate) *ExecutorDriver

NewExecutorDriver returns a properly configured ExecutorDriver

func (*ExecutorDriver) NewStatus

func (driver *ExecutorDriver) NewStatus(id mesos.TaskID) mesos.TaskStatus

NewStatus returns a properly configured Mesos.TaskStatus

func (*ExecutorDriver) Run

func (driver *ExecutorDriver) Run() error

Run makes sure we're subscribed to events, and restarts the event loop until we're told to stop.

func (*ExecutorDriver) SendStatusUpdate

func (driver *ExecutorDriver) SendStatusUpdate(status mesos.TaskStatus) error

SendStatusUpdate takes a new Mesos status and relays it to the agent

func (*ExecutorDriver) Stop

func (driver *ExecutorDriver) Stop()

type TaskDelegate

type TaskDelegate interface {
	LaunchTask(taskInfo *mesos.TaskInfo)
	KillTask(taskID *mesos.TaskID)
}

A TaskDelegate is responsible for launching and killing tasks

Jump to

Keyboard shortcuts

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