mesosdriver

package
v0.0.0-...-4e9adeb Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: GPL-3.0 Imports: 21 Imported by: 0

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()

func (*ExecutorDriver) ThrowError

func (driver *ExecutorDriver) ThrowError(taskID mesos.TaskID, err error)

ThrowError will create a error object and send state update to mesos

type TaskDelegate

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

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