executor

package
v0.0.0-...-28e5ed5 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2017 License: MIT Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AgentEndpoint string
	ContainerName string
	ExecutorID    string
	FrameworkID   string
}

Config represents an executor config, containing arguments passed by the agent and used to initialize a new executor

type Executor

type Executor struct {
	AgentInfo      mesos.AgentInfo                 // AgentInfo contains agent info returned by the agent
	Cli            *httpcli.Client                 // Cli is the mesos HTTP cli
	ContainerID    string                          // Running container ID
	Containerizer  container.Containerizer         // Containerize to use to manage containers
	ContainerName  string                          // Container named generated by mesos
	ExecutorID     string                          // Executor ID returned by the agent when running the executor
	ExecutorInfo   mesos.ExecutorInfo              // Executor info returned by the agent after registration
	FrameworkID    string                          // Framework ID returned by the agent when running the executor
	FrameworkInfo  mesos.FrameworkInfo             // Framework info returned by the agent after registration
	Handler        events.Handler                  // Handler to use to handle events
	HealthChecker  *healthcheck.Checker            // Health checker for Mesos native health checks
	HookManager    *hook.Manager                   // Hooks manager
	Shutdown       bool                            // Shutdown the executor (used to stop loop event and gently kill the executor)
	StopSignals    chan os.Signal                  // Channel receiving stopping signals (SIGINT, SIGTERM, ...)
	TaskInfo       mesos.TaskInfo                  // Task info sent by the agent on launch event
	UnackedMutex   *sync.RWMutex                   // Mutex used to protect unacked tasks and updates maps
	UnackedUpdates map[string]executor.Call_Update // Unacked updates (waiting for an acknowledgment from the agent)
}

Executor represents an executor

func NewExecutor

func NewExecutor(config Config, containerizer container.Containerizer, hookManager *hook.Manager) *Executor

NewExecutor initializes a new executor with the given executor and framework ID

func (*Executor) Execute

func (e *Executor) Execute() error

Execute runs the executor workflow

Jump to

Keyboard shortcuts

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