sched

package
v1.20.6 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package mesos_scheduler is a generated protocol buffer package.

It is generated from these files:

scheduler.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:  "TEARDOWN",
	3:  "ACCEPT",
	4:  "DECLINE",
	13: "ACCEPT_INVERSE_OFFERS",
	14: "DECLINE_INVERSE_OFFERS",
	5:  "REVIVE",
	6:  "KILL",
	7:  "SHUTDOWN",
	8:  "ACKNOWLEDGE",
	9:  "RECONCILE",
	10: "MESSAGE",
	11: "REQUEST",
	12: "SUPPRESS",
}
View Source
var Call_Type_value = map[string]int32{
	"UNKNOWN":                0,
	"SUBSCRIBE":              1,
	"TEARDOWN":               2,
	"ACCEPT":                 3,
	"DECLINE":                4,
	"ACCEPT_INVERSE_OFFERS":  13,
	"DECLINE_INVERSE_OFFERS": 14,
	"REVIVE":                 5,
	"KILL":                   6,
	"SHUTDOWN":               7,
	"ACKNOWLEDGE":            8,
	"RECONCILE":              9,
	"MESSAGE":                10,
	"REQUEST":                11,
	"SUPPRESS":               12,
}
View Source
var Event_Type_name = map[int32]string{
	0:  "UNKNOWN",
	1:  "SUBSCRIBED",
	2:  "OFFERS",
	9:  "INVERSE_OFFERS",
	3:  "RESCIND",
	10: "RESCIND_INVERSE_OFFER",
	4:  "UPDATE",
	5:  "MESSAGE",
	6:  "FAILURE",
	7:  "ERROR",
	8:  "HEARTBEAT",
}
View Source
var Event_Type_value = map[string]int32{
	"UNKNOWN":               0,
	"SUBSCRIBED":            1,
	"OFFERS":                2,
	"INVERSE_OFFERS":        9,
	"RESCIND":               3,
	"RESCIND_INVERSE_OFFER": 10,
	"UPDATE":                4,
	"MESSAGE":               5,
	"FAILURE":               6,
	"ERROR":                 7,
	"HEARTBEAT":             8,
}

Functions

This section is empty.

Types

type Call

type Call struct {
	// Identifies who generated this call. Master assigns a framework id
	// when a new scheduler subscribes for the first time. Once assigned,
	// the scheduler must set the 'framework_id' here and within its
	// FrameworkInfo (in any further 'Subscribe' calls). This allows the
	// master to identify a scheduler correctly across disconnections,
	// failovers, etc.
	FrameworkId *mesos.FrameworkID `protobuf:"bytes,1,opt,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.
	// See comments on `Event::Type` above on the reasoning behind this field being optional.
	Type                 *Call_Type                 `protobuf:"varint,2,opt,name=type,enum=mesos.v1.scheduler.Call_Type" json:"type,omitempty"`
	Subscribe            *Call_Subscribe            `protobuf:"bytes,3,opt,name=subscribe" json:"subscribe,omitempty"`
	Accept               *Call_Accept               `protobuf:"bytes,4,opt,name=accept" json:"accept,omitempty"`
	Decline              *Call_Decline              `protobuf:"bytes,5,opt,name=decline" json:"decline,omitempty"`
	AcceptInverseOffers  *Call_AcceptInverseOffers  `protobuf:"bytes,13,opt,name=accept_inverse_offers,json=acceptInverseOffers" json:"accept_inverse_offers,omitempty"`
	DeclineInverseOffers *Call_DeclineInverseOffers `protobuf:"bytes,14,opt,name=decline_inverse_offers,json=declineInverseOffers" json:"decline_inverse_offers,omitempty"`
	Kill                 *Call_Kill                 `protobuf:"bytes,6,opt,name=kill" json:"kill,omitempty"`
	Shutdown             *Call_Shutdown             `protobuf:"bytes,7,opt,name=shutdown" json:"shutdown,omitempty"`
	Acknowledge          *Call_Acknowledge          `protobuf:"bytes,8,opt,name=acknowledge" json:"acknowledge,omitempty"`
	Reconcile            *Call_Reconcile            `protobuf:"bytes,9,opt,name=reconcile" json:"reconcile,omitempty"`
	Message              *Call_Message              `protobuf:"bytes,10,opt,name=message" json:"message,omitempty"`
	Request              *Call_Request              `protobuf:"bytes,11,opt,name=request" json:"request,omitempty"`
	XXX_unrecognized     []byte                     `json:"-"`
}

* Scheduler 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) GetAccept

func (m *Call) GetAccept() *Call_Accept

func (*Call) GetAcceptInverseOffers

func (m *Call) GetAcceptInverseOffers() *Call_AcceptInverseOffers

func (*Call) GetAcknowledge

func (m *Call) GetAcknowledge() *Call_Acknowledge

func (*Call) GetDecline

func (m *Call) GetDecline() *Call_Decline

func (*Call) GetDeclineInverseOffers

func (m *Call) GetDeclineInverseOffers() *Call_DeclineInverseOffers

func (*Call) GetFrameworkId

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

func (*Call) GetKill

func (m *Call) GetKill() *Call_Kill

func (*Call) GetMessage

func (m *Call) GetMessage() *Call_Message

func (*Call) GetReconcile

func (m *Call) GetReconcile() *Call_Reconcile

func (*Call) GetRequest

func (m *Call) GetRequest() *Call_Request

func (*Call) GetShutdown

func (m *Call) GetShutdown() *Call_Shutdown

func (*Call) GetSubscribe

func (m *Call) GetSubscribe() *Call_Subscribe

func (*Call) GetType

func (m *Call) GetType() Call_Type

func (*Call) ProtoMessage

func (*Call) ProtoMessage()

func (*Call) Reset

func (m *Call) Reset()

func (*Call) String

func (m *Call) String() string

type Call_Accept

type Call_Accept struct {
	OfferIds         []*mesos.OfferID         `protobuf:"bytes,1,rep,name=offer_ids,json=offerIds" json:"offer_ids,omitempty"`
	Operations       []*mesos.Offer_Operation `protobuf:"bytes,2,rep,name=operations" json:"operations,omitempty"`
	Filters          *mesos.Filters           `protobuf:"bytes,3,opt,name=filters" json:"filters,omitempty"`
	XXX_unrecognized []byte                   `json:"-"`
}

Accepts an offer, performing the specified operations in a sequential manner.

E.g. Launch a task with a newly reserved persistent volume:

Accept {
  offer_ids: [ ... ]
  operations: [
    { type: RESERVE,
      reserve: { resources: [ disk(role):2 ] } }
    { type: CREATE,
      create: { volumes: [ disk(role):1+persistence ] } }
    { type: LAUNCH,
      launch: { task_infos ... disk(role):1;disk(role):1+persistence } }
  ]
}

Note that any of the offer’s resources not used in the 'Accept' call (e.g., to launch a task) are considered unused and might be reoffered to other frameworks. In other words, the same OfferID cannot be used in more than one 'Accept' call.

func (*Call_Accept) Descriptor

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

func (*Call_Accept) GetFilters

func (m *Call_Accept) GetFilters() *mesos.Filters

func (*Call_Accept) GetOfferIds

func (m *Call_Accept) GetOfferIds() []*mesos.OfferID

func (*Call_Accept) GetOperations

func (m *Call_Accept) GetOperations() []*mesos.Offer_Operation

func (*Call_Accept) ProtoMessage

func (*Call_Accept) ProtoMessage()

func (*Call_Accept) Reset

func (m *Call_Accept) Reset()

func (*Call_Accept) String

func (m *Call_Accept) String() string

type Call_AcceptInverseOffers

type Call_AcceptInverseOffers struct {
	InverseOfferIds  []*mesos.OfferID `protobuf:"bytes,1,rep,name=inverse_offer_ids,json=inverseOfferIds" json:"inverse_offer_ids,omitempty"`
	Filters          *mesos.Filters   `protobuf:"bytes,2,opt,name=filters" json:"filters,omitempty"`
	XXX_unrecognized []byte           `json:"-"`
}

Accepts an inverse offer. Inverse offers should only be accepted if the resources in the offer can be safely evacuated before the provided unavailability.

func (*Call_AcceptInverseOffers) Descriptor

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

func (*Call_AcceptInverseOffers) GetFilters

func (m *Call_AcceptInverseOffers) GetFilters() *mesos.Filters

func (*Call_AcceptInverseOffers) GetInverseOfferIds

func (m *Call_AcceptInverseOffers) GetInverseOfferIds() []*mesos.OfferID

func (*Call_AcceptInverseOffers) ProtoMessage

func (*Call_AcceptInverseOffers) ProtoMessage()

func (*Call_AcceptInverseOffers) Reset

func (m *Call_AcceptInverseOffers) Reset()

func (*Call_AcceptInverseOffers) String

func (m *Call_AcceptInverseOffers) String() string

type Call_Acknowledge

type Call_Acknowledge struct {
	AgentId          *mesos.AgentID `protobuf:"bytes,1,req,name=agent_id,json=agentId" json:"agent_id,omitempty"`
	TaskId           *mesos.TaskID  `protobuf:"bytes,2,req,name=task_id,json=taskId" json:"task_id,omitempty"`
	Uuid             []byte         `protobuf:"bytes,3,req,name=uuid" json:"uuid,omitempty"`
	XXX_unrecognized []byte         `json:"-"`
}

Acknowledges the receipt of status update. Schedulers are responsible for explicitly acknowledging the receipt of status updates that have 'Update.status().uuid()' field set. Such status updates are retried by the agent until they are acknowledged by the scheduler.

func (*Call_Acknowledge) Descriptor

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

func (*Call_Acknowledge) GetAgentId

func (m *Call_Acknowledge) GetAgentId() *mesos.AgentID

func (*Call_Acknowledge) GetTaskId

func (m *Call_Acknowledge) GetTaskId() *mesos.TaskID

func (*Call_Acknowledge) GetUuid

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

func (*Call_Acknowledge) ProtoMessage

func (*Call_Acknowledge) ProtoMessage()

func (*Call_Acknowledge) Reset

func (m *Call_Acknowledge) Reset()

func (*Call_Acknowledge) String

func (m *Call_Acknowledge) String() string

type Call_Decline

type Call_Decline struct {
	OfferIds         []*mesos.OfferID `protobuf:"bytes,1,rep,name=offer_ids,json=offerIds" json:"offer_ids,omitempty"`
	Filters          *mesos.Filters   `protobuf:"bytes,2,opt,name=filters" json:"filters,omitempty"`
	XXX_unrecognized []byte           `json:"-"`
}

Declines an offer, signaling the master to potentially reoffer the resources to a different framework. Note that this is same as sending an Accept call with no operations. See comments on top of 'Accept' for semantics.

func (*Call_Decline) Descriptor

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

func (*Call_Decline) GetFilters

func (m *Call_Decline) GetFilters() *mesos.Filters

func (*Call_Decline) GetOfferIds

func (m *Call_Decline) GetOfferIds() []*mesos.OfferID

func (*Call_Decline) ProtoMessage

func (*Call_Decline) ProtoMessage()

func (*Call_Decline) Reset

func (m *Call_Decline) Reset()

func (*Call_Decline) String

func (m *Call_Decline) String() string

type Call_DeclineInverseOffers

type Call_DeclineInverseOffers struct {
	InverseOfferIds  []*mesos.OfferID `protobuf:"bytes,1,rep,name=inverse_offer_ids,json=inverseOfferIds" json:"inverse_offer_ids,omitempty"`
	Filters          *mesos.Filters   `protobuf:"bytes,2,opt,name=filters" json:"filters,omitempty"`
	XXX_unrecognized []byte           `json:"-"`
}

Declines an inverse offer. Inverse offers should be declined if the resources in the offer might not be safely evacuated before the provided unavailability.

func (*Call_DeclineInverseOffers) Descriptor

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

func (*Call_DeclineInverseOffers) GetFilters

func (m *Call_DeclineInverseOffers) GetFilters() *mesos.Filters

func (*Call_DeclineInverseOffers) GetInverseOfferIds

func (m *Call_DeclineInverseOffers) GetInverseOfferIds() []*mesos.OfferID

func (*Call_DeclineInverseOffers) ProtoMessage

func (*Call_DeclineInverseOffers) ProtoMessage()

func (*Call_DeclineInverseOffers) Reset

func (m *Call_DeclineInverseOffers) Reset()

func (*Call_DeclineInverseOffers) String

func (m *Call_DeclineInverseOffers) String() string

type Call_Kill

type Call_Kill struct {
	TaskId  *mesos.TaskID  `protobuf:"bytes,1,req,name=task_id,json=taskId" json:"task_id,omitempty"`
	AgentId *mesos.AgentID `protobuf:"bytes,2,opt,name=agent_id,json=agentId" json:"agent_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.KillPolicy `protobuf:"bytes,3,opt,name=kill_policy,json=killPolicy" json:"kill_policy,omitempty"`
	XXX_unrecognized []byte            `json:"-"`
}

Kills a specific task. If the scheduler has a custom executor, the kill is forwarded to the executor and it is up to the executor to kill the task and send a TASK_KILLED (or TASK_FAILED) update. Note that Mesos releases the resources for a task once it receives a terminal update (See TaskState in v1/mesos.proto) for it. If the task is unknown to the master, a TASK_LOST update is generated.

If a task within a task group is killed before the group is delivered to the executor, all tasks in the task group are killed. When a task group has been delivered to the executor, it is up to the executor to decide how to deal with the kill. Note The default Mesos executor will currently kill all the tasks in the task group if it gets a kill for any task.

func (*Call_Kill) Descriptor

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

func (*Call_Kill) GetAgentId

func (m *Call_Kill) GetAgentId() *mesos.AgentID

func (*Call_Kill) GetKillPolicy

func (m *Call_Kill) GetKillPolicy() *mesos.KillPolicy

func (*Call_Kill) GetTaskId

func (m *Call_Kill) GetTaskId() *mesos.TaskID

func (*Call_Kill) ProtoMessage

func (*Call_Kill) ProtoMessage()

func (*Call_Kill) Reset

func (m *Call_Kill) Reset()

func (*Call_Kill) String

func (m *Call_Kill) String() string

type Call_Message

type Call_Message struct {
	AgentId          *mesos.AgentID    `protobuf:"bytes,1,req,name=agent_id,json=agentId" json:"agent_id,omitempty"`
	ExecutorId       *mesos.ExecutorID `protobuf:"bytes,2,req,name=executor_id,json=executorId" json:"executor_id,omitempty"`
	Data             []byte            `protobuf:"bytes,3,req,name=data" json:"data,omitempty"`
	XXX_unrecognized []byte            `json:"-"`
}

Sends arbitrary binary data to the executor. Note that Mesos neither interprets this data nor makes any guarantees about the delivery of this message to the executor.

func (*Call_Message) Descriptor

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

func (*Call_Message) GetAgentId

func (m *Call_Message) GetAgentId() *mesos.AgentID

func (*Call_Message) GetData

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

func (*Call_Message) GetExecutorId

func (m *Call_Message) GetExecutorId() *mesos.ExecutorID

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_Reconcile

type Call_Reconcile struct {
	Tasks            []*Call_Reconcile_Task `protobuf:"bytes,1,rep,name=tasks" json:"tasks,omitempty"`
	XXX_unrecognized []byte                 `json:"-"`
}

Allows the scheduler to query the status for non-terminal tasks. This causes the master to send back the latest task status for each task in 'tasks', if possible. Tasks that are no longer known will result in a TASK_LOST update. If 'statuses' is empty, then the master will send the latest status for each task currently known.

func (*Call_Reconcile) Descriptor

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

func (*Call_Reconcile) GetTasks

func (m *Call_Reconcile) GetTasks() []*Call_Reconcile_Task

func (*Call_Reconcile) ProtoMessage

func (*Call_Reconcile) ProtoMessage()

func (*Call_Reconcile) Reset

func (m *Call_Reconcile) Reset()

func (*Call_Reconcile) String

func (m *Call_Reconcile) String() string

type Call_Reconcile_Task

type Call_Reconcile_Task struct {
	TaskId           *mesos.TaskID  `protobuf:"bytes,1,req,name=task_id,json=taskId" json:"task_id,omitempty"`
	AgentId          *mesos.AgentID `protobuf:"bytes,2,opt,name=agent_id,json=agentId" json:"agent_id,omitempty"`
	XXX_unrecognized []byte         `json:"-"`
}

TODO(vinod): Support arbitrary queries than just state of tasks.

func (*Call_Reconcile_Task) Descriptor

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

func (*Call_Reconcile_Task) GetAgentId

func (m *Call_Reconcile_Task) GetAgentId() *mesos.AgentID

func (*Call_Reconcile_Task) GetTaskId

func (m *Call_Reconcile_Task) GetTaskId() *mesos.TaskID

func (*Call_Reconcile_Task) ProtoMessage

func (*Call_Reconcile_Task) ProtoMessage()

func (*Call_Reconcile_Task) Reset

func (m *Call_Reconcile_Task) Reset()

func (*Call_Reconcile_Task) String

func (m *Call_Reconcile_Task) String() string

type Call_Request

type Call_Request struct {
	Requests         []*mesos.Request `protobuf:"bytes,1,rep,name=requests" json:"requests,omitempty"`
	XXX_unrecognized []byte           `json:"-"`
}

Requests a specific set of resources from Mesos's allocator. If the allocator has support for this, corresponding offers will be sent asynchronously via the OFFERS event(s).

NOTE: The built-in hierarchical allocator doesn't have support for this call and hence simply ignores it.

func (*Call_Request) Descriptor

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

func (*Call_Request) GetRequests

func (m *Call_Request) GetRequests() []*mesos.Request

func (*Call_Request) ProtoMessage

func (*Call_Request) ProtoMessage()

func (*Call_Request) Reset

func (m *Call_Request) Reset()

func (*Call_Request) String

func (m *Call_Request) String() string

type Call_Shutdown

type Call_Shutdown struct {
	ExecutorId       *mesos.ExecutorID `protobuf:"bytes,1,req,name=executor_id,json=executorId" json:"executor_id,omitempty"`
	AgentId          *mesos.AgentID    `protobuf:"bytes,2,req,name=agent_id,json=agentId" json:"agent_id,omitempty"`
	XXX_unrecognized []byte            `json:"-"`
}

Shuts down a custom executor. When the executor gets a shutdown event, it is expected to kill all its tasks (and send TASK_KILLED updates) and terminate. If the executor doesn’t terminate within a certain timeout (configurable via '--executor_shutdown_grace_period' agent flag), the agent will forcefully destroy the container (executor and its tasks) and transition its active tasks to TASK_LOST.

func (*Call_Shutdown) Descriptor

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

func (*Call_Shutdown) GetAgentId

func (m *Call_Shutdown) GetAgentId() *mesos.AgentID

func (*Call_Shutdown) GetExecutorId

func (m *Call_Shutdown) GetExecutorId() *mesos.ExecutorID

func (*Call_Shutdown) ProtoMessage

func (*Call_Shutdown) ProtoMessage()

func (*Call_Shutdown) Reset

func (m *Call_Shutdown) Reset()

func (*Call_Shutdown) String

func (m *Call_Shutdown) String() string

type Call_Subscribe

type Call_Subscribe struct {
	// See the comments below on 'framework_id' on the semantics for
	// 'framework_info.id'.
	FrameworkInfo    *mesos.FrameworkInfo `protobuf:"bytes,1,req,name=framework_info,json=frameworkInfo" json:"framework_info,omitempty"`
	XXX_unrecognized []byte               `json:"-"`
}

Subscribes the scheduler with the master to receive events. A scheduler must send other calls only after it has received the SUBCRIBED event.

func (*Call_Subscribe) Descriptor

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

func (*Call_Subscribe) GetFrameworkInfo

func (m *Call_Subscribe) GetFrameworkInfo() *mesos.FrameworkInfo

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_TEARDOWN               Call_Type = 2
	Call_ACCEPT                 Call_Type = 3
	Call_DECLINE                Call_Type = 4
	Call_ACCEPT_INVERSE_OFFERS  Call_Type = 13
	Call_DECLINE_INVERSE_OFFERS Call_Type = 14
	Call_REVIVE                 Call_Type = 5
	Call_KILL                   Call_Type = 6
	Call_SHUTDOWN               Call_Type = 7
	Call_ACKNOWLEDGE            Call_Type = 8
	Call_RECONCILE              Call_Type = 9
	Call_MESSAGE                Call_Type = 10
	Call_REQUEST                Call_Type = 11
	Call_SUPPRESS               Call_Type = 12
)

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 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.scheduler.Event_Type" json:"type,omitempty"`
	Subscribed          *Event_Subscribed          `protobuf:"bytes,2,opt,name=subscribed" json:"subscribed,omitempty"`
	Offers              *Event_Offers              `protobuf:"bytes,3,opt,name=offers" json:"offers,omitempty"`
	InverseOffers       *Event_InverseOffers       `protobuf:"bytes,9,opt,name=inverse_offers,json=inverseOffers" json:"inverse_offers,omitempty"`
	Rescind             *Event_Rescind             `protobuf:"bytes,4,opt,name=rescind" json:"rescind,omitempty"`
	RescindInverseOffer *Event_RescindInverseOffer `protobuf:"bytes,10,opt,name=rescind_inverse_offer,json=rescindInverseOffer" json:"rescind_inverse_offer,omitempty"`
	Update              *Event_Update              `protobuf:"bytes,5,opt,name=update" json:"update,omitempty"`
	Message             *Event_Message             `protobuf:"bytes,6,opt,name=message" json:"message,omitempty"`
	Failure             *Event_Failure             `protobuf:"bytes,7,opt,name=failure" json:"failure,omitempty"`
	Error               *Event_Error               `protobuf:"bytes,8,opt,name=error" json:"error,omitempty"`
	XXX_unrecognized    []byte                     `json:"-"`
}

* Scheduler 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) GetError

func (m *Event) GetError() *Event_Error

func (*Event) GetFailure

func (m *Event) GetFailure() *Event_Failure

func (*Event) GetInverseOffers

func (m *Event) GetInverseOffers() *Event_InverseOffers

func (*Event) GetMessage

func (m *Event) GetMessage() *Event_Message

func (*Event) GetOffers

func (m *Event) GetOffers() *Event_Offers

func (*Event) GetRescind

func (m *Event) GetRescind() *Event_Rescind

func (*Event) GetRescindInverseOffer

func (m *Event) GetRescindInverseOffer() *Event_RescindInverseOffer

func (*Event) GetSubscribed

func (m *Event) GetSubscribed() *Event_Subscribed

func (*Event) GetType

func (m *Event) GetType() Event_Type

func (*Event) GetUpdate

func (m *Event) GetUpdate() *Event_Update

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) Reset

func (m *Event) Reset()

func (*Event) String

func (m *Event) 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 when there is an unrecoverable error in the scheduler (e.g., scheduler failed over, rate limiting, authorization errors etc.). The scheduler should abort on receiving this event.

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_Failure

type Event_Failure struct {
	AgentId *mesos.AgentID `protobuf:"bytes,1,opt,name=agent_id,json=agentId" json:"agent_id,omitempty"`
	// If this was just a failure of an executor on an agent then
	// 'executor_id' will be set and possibly 'status' (if we were
	// able to determine the exit status).
	ExecutorId       *mesos.ExecutorID `protobuf:"bytes,2,opt,name=executor_id,json=executorId" json:"executor_id,omitempty"`
	Status           *int32            `protobuf:"varint,3,opt,name=status" json:"status,omitempty"`
	XXX_unrecognized []byte            `json:"-"`
}

Received when an agent is removed from the cluster (e.g., failed health checks) or when an executor is terminated. Note that, this event coincides with receipt of terminal UPDATE events for any active tasks belonging to the agent or executor and receipt of 'Rescind' events for any outstanding offers belonging to the agent. Note that there is no guaranteed order between the 'Failure', 'Update' and 'Rescind' events when an agent or executor is removed. TODO(vinod): Consider splitting the lost agent and terminated executor into separate events and ensure it's reliably generated.

func (*Event_Failure) Descriptor

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

func (*Event_Failure) GetAgentId

func (m *Event_Failure) GetAgentId() *mesos.AgentID

func (*Event_Failure) GetExecutorId

func (m *Event_Failure) GetExecutorId() *mesos.ExecutorID

func (*Event_Failure) GetStatus

func (m *Event_Failure) GetStatus() int32

func (*Event_Failure) ProtoMessage

func (*Event_Failure) ProtoMessage()

func (*Event_Failure) Reset

func (m *Event_Failure) Reset()

func (*Event_Failure) String

func (m *Event_Failure) String() string

type Event_InverseOffers

type Event_InverseOffers struct {
	InverseOffers    []*mesos.InverseOffer `protobuf:"bytes,1,rep,name=inverse_offers,json=inverseOffers" json:"inverse_offers,omitempty"`
	XXX_unrecognized []byte                `json:"-"`
}

Received whenever there are resources requested back from the scheduler. Each inverse offer specifies the agent, and optionally specific resources. Accepting or Declining an inverse offer informs the allocator of the scheduler's ability to release the specified resources without violating an SLA. If no resources are specified then all resources on the agent are requested to be released.

func (*Event_InverseOffers) Descriptor

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

func (*Event_InverseOffers) GetInverseOffers

func (m *Event_InverseOffers) GetInverseOffers() []*mesos.InverseOffer

func (*Event_InverseOffers) ProtoMessage

func (*Event_InverseOffers) ProtoMessage()

func (*Event_InverseOffers) Reset

func (m *Event_InverseOffers) Reset()

func (*Event_InverseOffers) String

func (m *Event_InverseOffers) String() string

type Event_Message

type Event_Message struct {
	AgentId          *mesos.AgentID    `protobuf:"bytes,1,req,name=agent_id,json=agentId" json:"agent_id,omitempty"`
	ExecutorId       *mesos.ExecutorID `protobuf:"bytes,2,req,name=executor_id,json=executorId" json:"executor_id,omitempty"`
	Data             []byte            `protobuf:"bytes,3,req,name=data" json:"data,omitempty"`
	XXX_unrecognized []byte            `json:"-"`
}

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

func (*Event_Message) Descriptor

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

func (*Event_Message) GetAgentId

func (m *Event_Message) GetAgentId() *mesos.AgentID

func (*Event_Message) GetData

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

func (*Event_Message) GetExecutorId

func (m *Event_Message) GetExecutorId() *mesos.ExecutorID

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_Offers

type Event_Offers struct {
	Offers           []*mesos.Offer `protobuf:"bytes,1,rep,name=offers" json:"offers,omitempty"`
	XXX_unrecognized []byte         `json:"-"`
}

Received whenever there are new resources that are offered to the scheduler. Each offer corresponds to a set of resources on an agent. Until the scheduler accepts or declines an offer the resources are considered allocated to the scheduler.

func (*Event_Offers) Descriptor

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

func (*Event_Offers) GetOffers

func (m *Event_Offers) GetOffers() []*mesos.Offer

func (*Event_Offers) ProtoMessage

func (*Event_Offers) ProtoMessage()

func (*Event_Offers) Reset

func (m *Event_Offers) Reset()

func (*Event_Offers) String

func (m *Event_Offers) String() string

type Event_Rescind

type Event_Rescind struct {
	OfferId          *mesos.OfferID `protobuf:"bytes,1,req,name=offer_id,json=offerId" json:"offer_id,omitempty"`
	XXX_unrecognized []byte         `json:"-"`
}

Received when a particular offer is no longer valid (e.g., the agent corresponding to the offer has been removed) and hence needs to be rescinded. Any future calls ('Accept' / 'Decline') made by the scheduler regarding this offer will be invalid.

func (*Event_Rescind) Descriptor

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

func (*Event_Rescind) GetOfferId

func (m *Event_Rescind) GetOfferId() *mesos.OfferID

func (*Event_Rescind) ProtoMessage

func (*Event_Rescind) ProtoMessage()

func (*Event_Rescind) Reset

func (m *Event_Rescind) Reset()

func (*Event_Rescind) String

func (m *Event_Rescind) String() string

type Event_RescindInverseOffer

type Event_RescindInverseOffer struct {
	InverseOfferId   *mesos.OfferID `protobuf:"bytes,1,req,name=inverse_offer_id,json=inverseOfferId" json:"inverse_offer_id,omitempty"`
	XXX_unrecognized []byte         `json:"-"`
}

Received when a particular inverse offer is no longer valid (e.g., the agent corresponding to the offer has been removed) and hence needs to be rescinded. Any future calls ('Accept' / 'Decline') made by the scheduler regarding this inverse offer will be invalid.

func (*Event_RescindInverseOffer) Descriptor

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

func (*Event_RescindInverseOffer) GetInverseOfferId

func (m *Event_RescindInverseOffer) GetInverseOfferId() *mesos.OfferID

func (*Event_RescindInverseOffer) ProtoMessage

func (*Event_RescindInverseOffer) ProtoMessage()

func (*Event_RescindInverseOffer) Reset

func (m *Event_RescindInverseOffer) Reset()

func (*Event_RescindInverseOffer) String

func (m *Event_RescindInverseOffer) String() string

type Event_Subscribed

type Event_Subscribed struct {
	FrameworkId *mesos.FrameworkID `protobuf:"bytes,1,req,name=framework_id,json=frameworkId" json:"framework_id,omitempty"`
	// This value will be set if the master is sending heartbeats. See
	// the comment above on 'HEARTBEAT' for more details.
	HeartbeatIntervalSeconds *float64 `` /* 130-byte string literal not displayed */
	// Since Mesos 1.1.
	MasterInfo       *mesos.MasterInfo `protobuf:"bytes,3,opt,name=master_info,json=masterInfo" json:"master_info,omitempty"`
	XXX_unrecognized []byte            `json:"-"`
}

First event received when the scheduler subscribes.

func (*Event_Subscribed) Descriptor

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

func (*Event_Subscribed) GetFrameworkId

func (m *Event_Subscribed) GetFrameworkId() *mesos.FrameworkID

func (*Event_Subscribed) GetHeartbeatIntervalSeconds

func (m *Event_Subscribed) GetHeartbeatIntervalSeconds() float64

func (*Event_Subscribed) GetMasterInfo

func (m *Event_Subscribed) GetMasterInfo() *mesos.MasterInfo

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_OFFERS                Event_Type = 2
	Event_INVERSE_OFFERS        Event_Type = 9
	Event_RESCIND               Event_Type = 3
	Event_RESCIND_INVERSE_OFFER Event_Type = 10
	Event_UPDATE                Event_Type = 4
	Event_MESSAGE               Event_Type = 5
	Event_FAILURE               Event_Type = 6
	Event_ERROR                 Event_Type = 7
	// Periodic message sent by the Mesos master according to
	// 'Subscribed.heartbeat_interval_seconds'. If the scheduler does
	// not receive any events (including heartbeats) for an extended
	// period of time (e.g., 5 x heartbeat_interval_seconds), there is
	// likely a network partition. In such a case the scheduler should
	// close the existing subscription connection and resubscribe
	// using a backoff strategy.
	Event_HEARTBEAT Event_Type = 8
)

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

type Event_Update

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

Received whenever there is a status update that is generated by the executor or agent or master. 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 by the executor as soon as the task terminates, in order for Mesos to release the resources allocated to the task. It is also the responsibility of the scheduler to explicitly acknowledge the receipt of a status update. See 'Acknowledge' in the 'Call' section below for the semantics.

func (*Event_Update) Descriptor

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

func (*Event_Update) GetStatus

func (m *Event_Update) GetStatus() *mesos.TaskStatus

func (*Event_Update) ProtoMessage

func (*Event_Update) ProtoMessage()

func (*Event_Update) Reset

func (m *Event_Update) Reset()

func (*Event_Update) String

func (m *Event_Update) String() string

Jump to

Keyboard shortcuts

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