executor

package
v1.21.1 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package mesos_v1_executor is a generated protocol buffer package.

It is generated from these files:

mesos/v1/executor/executor.proto

It has these top-level messages:

Event
Call

Index

Constants

This section is empty.

Variables

View Source
var Call_Type_name = map[int32]string{
	0: "UNKNOWN",
	1: "SUBSCRIBE",
	2: "UPDATE",
	3: "MESSAGE",
}
View Source
var Call_Type_value = map[string]int32{
	"UNKNOWN":   0,
	"SUBSCRIBE": 1,
	"UPDATE":    2,
	"MESSAGE":   3,
}
View Source
var Event_Type_name = map[int32]string{
	0: "UNKNOWN",
	1: "SUBSCRIBED",
	2: "LAUNCH",
	8: "LAUNCH_GROUP",
	3: "KILL",
	4: "ACKNOWLEDGED",
	5: "MESSAGE",
	6: "ERROR",
	7: "SHUTDOWN",
}
View Source
var Event_Type_value = map[string]int32{
	"UNKNOWN":      0,
	"SUBSCRIBED":   1,
	"LAUNCH":       2,
	"LAUNCH_GROUP": 8,
	"KILL":         3,
	"ACKNOWLEDGED": 4,
	"MESSAGE":      5,
	"ERROR":        6,
	"SHUTDOWN":     7,
}

Functions

This section is empty.

Types

type Call

type Call struct {
	// Identifies the executor which generated this call.
	ExecutorId  *mesos_v1.ExecutorID  `protobuf:"bytes,1,req,name=executor_id,json=executorId" json:"executor_id,omitempty"`
	FrameworkId *mesos_v1.FrameworkID `protobuf:"bytes,2,req,name=framework_id,json=frameworkId" json:"framework_id,omitempty"`
	// Type of the call, indicates which optional field below should be
	// present if that type has a nested message definition.
	// In case type is SUBSCRIBED, no message needs to be set.
	// See comments on `Event::Type` above on the reasoning behind this
	// field being optional.
	Type             *Call_Type      `protobuf:"varint,3,opt,name=type,enum=mesos.v1.executor.Call_Type" json:"type,omitempty"`
	Subscribe        *Call_Subscribe `protobuf:"bytes,4,opt,name=subscribe" json:"subscribe,omitempty"`
	Update           *Call_Update    `protobuf:"bytes,5,opt,name=update" json:"update,omitempty"`
	Message          *Call_Message   `protobuf:"bytes,6,opt,name=message" json:"message,omitempty"`
	XXX_unrecognized []byte          `json:"-"`
}

* Executor call API.

Like Event, a Call is described using the standard protocol buffer "union" trick (see above).

func (*Call) Descriptor

func (*Call) Descriptor() ([]byte, []int)

func (*Call) GetExecutorId

func (m *Call) GetExecutorId() *mesos_v1.ExecutorID

func (*Call) GetFrameworkId

func (m *Call) GetFrameworkId() *mesos_v1.FrameworkID

func (*Call) GetMessage

func (m *Call) GetMessage() *Call_Message

func (*Call) GetSubscribe

func (m *Call) GetSubscribe() *Call_Subscribe

func (*Call) GetType

func (m *Call) GetType() Call_Type

func (*Call) GetUpdate

func (m *Call) GetUpdate() *Call_Update

func (*Call) ProtoMessage

func (*Call) ProtoMessage()

func (*Call) Reset

func (m *Call) Reset()

func (*Call) String

func (m *Call) String() string

type Call_Message

type Call_Message struct {
	Data             []byte `protobuf:"bytes,2,req,name=data" json:"data,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

Sends arbitrary binary data to the scheduler. Note that Mesos neither interprets this data nor makes any guarantees about the delivery of this message to the scheduler. See 'Message' in the 'Events' section.

func (*Call_Message) Descriptor

func (*Call_Message) Descriptor() ([]byte, []int)

func (*Call_Message) GetData

func (m *Call_Message) GetData() []byte

func (*Call_Message) ProtoMessage

func (*Call_Message) ProtoMessage()

func (*Call_Message) Reset

func (m *Call_Message) Reset()

func (*Call_Message) String

func (m *Call_Message) String() string

type Call_Subscribe

type Call_Subscribe struct {
	UnacknowledgedTasks   []*mesos_v1.TaskInfo `protobuf:"bytes,1,rep,name=unacknowledged_tasks,json=unacknowledgedTasks" json:"unacknowledged_tasks,omitempty"`
	UnacknowledgedUpdates []*Call_Update       `protobuf:"bytes,2,rep,name=unacknowledged_updates,json=unacknowledgedUpdates" json:"unacknowledged_updates,omitempty"`
	XXX_unrecognized      []byte               `json:"-"`
}

Request to subscribe with the agent. If subscribing after a disconnection, it must include a list of all the tasks and updates which haven't been acknowledged by the scheduler.

func (*Call_Subscribe) Descriptor

func (*Call_Subscribe) Descriptor() ([]byte, []int)

func (*Call_Subscribe) GetUnacknowledgedTasks

func (m *Call_Subscribe) GetUnacknowledgedTasks() []*mesos_v1.TaskInfo

func (*Call_Subscribe) GetUnacknowledgedUpdates

func (m *Call_Subscribe) GetUnacknowledgedUpdates() []*Call_Update

func (*Call_Subscribe) ProtoMessage

func (*Call_Subscribe) ProtoMessage()

func (*Call_Subscribe) Reset

func (m *Call_Subscribe) Reset()

func (*Call_Subscribe) String

func (m *Call_Subscribe) String() string

type Call_Type

type Call_Type int32

Possible call types, followed by message definitions if applicable.

const (
	// See comments above on `Event::Type` for more details on this enum value.
	Call_UNKNOWN   Call_Type = 0
	Call_SUBSCRIBE Call_Type = 1
	Call_UPDATE    Call_Type = 2
	Call_MESSAGE   Call_Type = 3
)

func (Call_Type) Enum

func (x Call_Type) Enum() *Call_Type

func (Call_Type) EnumDescriptor

func (Call_Type) EnumDescriptor() ([]byte, []int)

func (Call_Type) String

func (x Call_Type) String() string

func (*Call_Type) UnmarshalJSON

func (x *Call_Type) UnmarshalJSON(data []byte) error

type Call_Update

type Call_Update struct {
	Status           *mesos_v1.TaskStatus `protobuf:"bytes,1,req,name=status" json:"status,omitempty"`
	XXX_unrecognized []byte               `json:"-"`
}

Notifies the scheduler that a task has transitioned from one state to another. Status updates should be used by executors to reliably communicate the status of the tasks that they manage. It is crucial that a terminal update (see TaskState in v1/mesos.proto) is sent to the scheduler as soon as the task terminates, in order for Mesos to release the resources allocated to the task. It is the responsibility of the scheduler to explicitly acknowledge the receipt of a status update. See 'Acknowledged' in the 'Events' section above for the semantics.

func (*Call_Update) Descriptor

func (*Call_Update) Descriptor() ([]byte, []int)

func (*Call_Update) GetStatus

func (m *Call_Update) GetStatus() *mesos_v1.TaskStatus

func (*Call_Update) ProtoMessage

func (*Call_Update) ProtoMessage()

func (*Call_Update) Reset

func (m *Call_Update) Reset()

func (*Call_Update) String

func (m *Call_Update) String() string

type Event

type Event struct {
	// Type of the event, indicates which optional field below should be
	// present if that type has a nested message definition.
	// Enum fields should be optional, see: MESOS-4997.
	Type             *Event_Type         `protobuf:"varint,1,opt,name=type,enum=mesos.v1.executor.Event_Type" json:"type,omitempty"`
	Subscribed       *Event_Subscribed   `protobuf:"bytes,2,opt,name=subscribed" json:"subscribed,omitempty"`
	Acknowledged     *Event_Acknowledged `protobuf:"bytes,3,opt,name=acknowledged" json:"acknowledged,omitempty"`
	Launch           *Event_Launch       `protobuf:"bytes,4,opt,name=launch" json:"launch,omitempty"`
	LaunchGroup      *Event_LaunchGroup  `protobuf:"bytes,8,opt,name=launch_group,json=launchGroup" json:"launch_group,omitempty"`
	Kill             *Event_Kill         `protobuf:"bytes,5,opt,name=kill" json:"kill,omitempty"`
	Message          *Event_Message      `protobuf:"bytes,6,opt,name=message" json:"message,omitempty"`
	Error            *Event_Error        `protobuf:"bytes,7,opt,name=error" json:"error,omitempty"`
	XXX_unrecognized []byte              `json:"-"`
}

* Executor event API.

An event is described using the standard protocol buffer "union" trick, see https://developers.google.com/protocol-buffers/docs/techniques#union.

func (*Event) Descriptor

func (*Event) Descriptor() ([]byte, []int)

func (*Event) GetAcknowledged

func (m *Event) GetAcknowledged() *Event_Acknowledged

func (*Event) GetError

func (m *Event) GetError() *Event_Error

func (*Event) GetKill

func (m *Event) GetKill() *Event_Kill

func (*Event) GetLaunch

func (m *Event) GetLaunch() *Event_Launch

func (*Event) GetLaunchGroup

func (m *Event) GetLaunchGroup() *Event_LaunchGroup

func (*Event) GetMessage

func (m *Event) GetMessage() *Event_Message

func (*Event) GetSubscribed

func (m *Event) GetSubscribed() *Event_Subscribed

func (*Event) GetType

func (m *Event) GetType() Event_Type

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) Reset

func (m *Event) Reset()

func (*Event) String

func (m *Event) String() string

type Event_Acknowledged

type Event_Acknowledged struct {
	TaskId           *mesos_v1.TaskID `protobuf:"bytes,1,req,name=task_id,json=taskId" json:"task_id,omitempty"`
	Uuid             []byte           `protobuf:"bytes,2,req,name=uuid" json:"uuid,omitempty"`
	XXX_unrecognized []byte           `json:"-"`
}

Received when the agent acknowledges the receipt of status update. Schedulers are responsible for explicitly acknowledging the receipt of status updates that have 'update.status().uuid()' field set. Unacknowledged updates can be retried by the executor. They should also be sent by the executor whenever it re-subscribes.

func (*Event_Acknowledged) Descriptor

func (*Event_Acknowledged) Descriptor() ([]byte, []int)

func (*Event_Acknowledged) GetTaskId

func (m *Event_Acknowledged) GetTaskId() *mesos_v1.TaskID

func (*Event_Acknowledged) GetUuid

func (m *Event_Acknowledged) GetUuid() []byte

func (*Event_Acknowledged) ProtoMessage

func (*Event_Acknowledged) ProtoMessage()

func (*Event_Acknowledged) Reset

func (m *Event_Acknowledged) Reset()

func (*Event_Acknowledged) String

func (m *Event_Acknowledged) String() string

type Event_Error

type Event_Error struct {
	Message          *string `protobuf:"bytes,1,req,name=message" json:"message,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

Received in case the executor sends invalid calls (e.g., required values not set). TODO(arojas): Remove this once the old executor driver is no longer supported. With HTTP API all errors will be signaled via HTTP response codes.

func (*Event_Error) Descriptor

func (*Event_Error) Descriptor() ([]byte, []int)

func (*Event_Error) GetMessage

func (m *Event_Error) GetMessage() string

func (*Event_Error) ProtoMessage

func (*Event_Error) ProtoMessage()

func (*Event_Error) Reset

func (m *Event_Error) Reset()

func (*Event_Error) String

func (m *Event_Error) String() string

type Event_Kill

type Event_Kill struct {
	TaskId *mesos_v1.TaskID `protobuf:"bytes,1,req,name=task_id,json=taskId" json:"task_id,omitempty"`
	// If set, overrides any previously specified kill policy for this task.
	// This includes 'TaskInfo.kill_policy' and 'Executor.kill.kill_policy'.
	// Can be used to forcefully kill a task which is already being killed.
	KillPolicy       *mesos_v1.KillPolicy `protobuf:"bytes,2,opt,name=kill_policy,json=killPolicy" json:"kill_policy,omitempty"`
	XXX_unrecognized []byte               `json:"-"`
}

Received when the scheduler wants to kill a specific task. Once the task is terminated, the executor should send a TASK_KILLED (or TASK_FAILED) update. The terminal update is necessary so Mesos can release the resources associated with the task.

func (*Event_Kill) Descriptor

func (*Event_Kill) Descriptor() ([]byte, []int)

func (*Event_Kill) GetKillPolicy

func (m *Event_Kill) GetKillPolicy() *mesos_v1.KillPolicy

func (*Event_Kill) GetTaskId

func (m *Event_Kill) GetTaskId() *mesos_v1.TaskID

func (*Event_Kill) ProtoMessage

func (*Event_Kill) ProtoMessage()

func (*Event_Kill) Reset

func (m *Event_Kill) Reset()

func (*Event_Kill) String

func (m *Event_Kill) String() string

type Event_Launch

type Event_Launch struct {
	Task             *mesos_v1.TaskInfo `protobuf:"bytes,1,req,name=task" json:"task,omitempty"`
	XXX_unrecognized []byte             `json:"-"`
}

Received when the framework attempts to launch a task. Once the task is successfully launched, the executor must respond with a TASK_RUNNING update (See TaskState in v1/mesos.proto).

func (*Event_Launch) Descriptor

func (*Event_Launch) Descriptor() ([]byte, []int)

func (*Event_Launch) GetTask

func (m *Event_Launch) GetTask() *mesos_v1.TaskInfo

func (*Event_Launch) ProtoMessage

func (*Event_Launch) ProtoMessage()

func (*Event_Launch) Reset

func (m *Event_Launch) Reset()

func (*Event_Launch) String

func (m *Event_Launch) String() string

type Event_LaunchGroup

type Event_LaunchGroup struct {
	TaskGroup        *mesos_v1.TaskGroupInfo `protobuf:"bytes,1,req,name=task_group,json=taskGroup" json:"task_group,omitempty"`
	XXX_unrecognized []byte                  `json:"-"`
}

Received when the framework attempts to launch a group of tasks atomically. Similar to `Launch` above the executor must send TASK_RUNNING updates for tasks that are successfully launched.

func (*Event_LaunchGroup) Descriptor

func (*Event_LaunchGroup) Descriptor() ([]byte, []int)

func (*Event_LaunchGroup) GetTaskGroup

func (m *Event_LaunchGroup) GetTaskGroup() *mesos_v1.TaskGroupInfo

func (*Event_LaunchGroup) ProtoMessage

func (*Event_LaunchGroup) ProtoMessage()

func (*Event_LaunchGroup) Reset

func (m *Event_LaunchGroup) Reset()

func (*Event_LaunchGroup) String

func (m *Event_LaunchGroup) String() string

type Event_Message

type Event_Message struct {
	Data             []byte `protobuf:"bytes,1,req,name=data" json:"data,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

Received when a custom message generated by the scheduler is forwarded by the agent. Note that this message is not interpreted by Mesos and is only forwarded (without reliability guarantees) to the executor. It is up to the scheduler to retry if the message is dropped for any reason.

func (*Event_Message) Descriptor

func (*Event_Message) Descriptor() ([]byte, []int)

func (*Event_Message) GetData

func (m *Event_Message) GetData() []byte

func (*Event_Message) ProtoMessage

func (*Event_Message) ProtoMessage()

func (*Event_Message) Reset

func (m *Event_Message) Reset()

func (*Event_Message) String

func (m *Event_Message) String() string

type Event_Subscribed

type Event_Subscribed struct {
	ExecutorInfo  *mesos_v1.ExecutorInfo  `protobuf:"bytes,1,req,name=executor_info,json=executorInfo" json:"executor_info,omitempty"`
	FrameworkInfo *mesos_v1.FrameworkInfo `protobuf:"bytes,2,req,name=framework_info,json=frameworkInfo" json:"framework_info,omitempty"`
	AgentInfo     *mesos_v1.AgentInfo     `protobuf:"bytes,3,req,name=agent_info,json=agentInfo" json:"agent_info,omitempty"`
	// Uniquely identifies the container of an executor run.
	ContainerId      *mesos_v1.ContainerID `protobuf:"bytes,4,opt,name=container_id,json=containerId" json:"container_id,omitempty"`
	XXX_unrecognized []byte                `json:"-"`
}

First event received when the executor subscribes. The 'id' field in the 'framework_info' will be set.

func (*Event_Subscribed) Descriptor

func (*Event_Subscribed) Descriptor() ([]byte, []int)

func (*Event_Subscribed) GetAgentInfo

func (m *Event_Subscribed) GetAgentInfo() *mesos_v1.AgentInfo

func (*Event_Subscribed) GetContainerId

func (m *Event_Subscribed) GetContainerId() *mesos_v1.ContainerID

func (*Event_Subscribed) GetExecutorInfo

func (m *Event_Subscribed) GetExecutorInfo() *mesos_v1.ExecutorInfo

func (*Event_Subscribed) GetFrameworkInfo

func (m *Event_Subscribed) GetFrameworkInfo() *mesos_v1.FrameworkInfo

func (*Event_Subscribed) ProtoMessage

func (*Event_Subscribed) ProtoMessage()

func (*Event_Subscribed) Reset

func (m *Event_Subscribed) Reset()

func (*Event_Subscribed) String

func (m *Event_Subscribed) String() string

type Event_Type

type Event_Type int32

Possible event types, followed by message definitions if applicable.

const (
	// This must be the first enum value in this list, to
	// ensure that if 'type' is not set, the default value
	// is UNKNOWN. This enables enum values to be added
	// in a backwards-compatible way. See: MESOS-4997.
	Event_UNKNOWN      Event_Type = 0
	Event_SUBSCRIBED   Event_Type = 1
	Event_LAUNCH       Event_Type = 2
	Event_LAUNCH_GROUP Event_Type = 8
	Event_KILL         Event_Type = 3
	Event_ACKNOWLEDGED Event_Type = 4
	Event_MESSAGE      Event_Type = 5
	Event_ERROR        Event_Type = 6
	// Received when the agent asks the executor to shutdown/kill itself.
	// The executor is then required to kill all its active tasks, send
	// `TASK_KILLED` status updates and gracefully exit. The executor
	// should terminate within a `MESOS_EXECUTOR_SHUTDOWN_GRACE_PERIOD`
	// (an environment variable set by the agent upon executor startup);
	// it can be configured via `ExecutorInfo.shutdown_grace_period`. If
	// the executor fails to do so, the agent will forcefully destroy the
	// container where the executor is running. The agent would then send
	// `TASK_LOST` updates for any remaining active tasks of this executor.
	//
	// NOTE: The executor must not assume that it will always be allotted
	// the full grace period, as the agent may decide to allot a shorter
	// period and failures / forcible terminations may occur.
	//
	// TODO(alexr): Consider adding a duration field into the `Shutdown`
	// message so that the agent can communicate when a shorter period
	// has been allotted.
	Event_SHUTDOWN Event_Type = 7
)

func (Event_Type) Enum

func (x Event_Type) Enum() *Event_Type

func (Event_Type) EnumDescriptor

func (Event_Type) EnumDescriptor() ([]byte, []int)

func (Event_Type) String

func (x Event_Type) String() string

func (*Event_Type) UnmarshalJSON

func (x *Event_Type) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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