Version: v0.0.0-...-a69e935 Latest Latest

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

Go to latest
Published: Oct 1, 2019 License: Apache-2.0 Imports: 11 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type Event

type Event struct {
	// contains filtered or unexported fields

Event provides a common interface to v0 and v1 event.

func NewV0

func NewV0(event *pbeventstream.Event) (*Event, error)

New an Event from a v0 event.

func NewV1

func NewV1(event *v1pbevent.Event) (*Event, error)

New an Event from a v1 event.

func (*Event) AgentID

func (sue *Event) AgentID() *pbmesos.AgentID

AgentID returns agent ID.

func (*Event) Healthy

func (sue *Event) Healthy() bool

Healthy returns healthy bit.

func (*Event) MesosTaskID

func (sue *Event) MesosTaskID() *pbmesos.TaskID

MesosTaskID returns mesos task ID.

func (*Event) MesosTaskStatus

func (sue *Event) MesosTaskStatus() *pbmesos.TaskStatus

MesosTaskStatus returns mesos task status for v0 event only.

func (*Event) Message

func (sue *Event) Message() string

Message returns message.

func (*Event) Offset

func (sue *Event) Offset() uint64

Offset returns offset.

func (*Event) PodEvent

func (sue *Event) PodEvent() *pbpod.PodEvent

PodEvent returns pod event for v1 event only.

func (*Event) Reason

func (sue *Event) Reason() string

Reason returns reason.

func (*Event) State

func (sue *Event) State() pbtask.TaskState

State returns task state.

func (*Event) StatusMsg

func (sue *Event) StatusMsg() string

StatusMsg returns status message.

func (*Event) TaskID

func (sue *Event) TaskID() string

TaskID returns task ID of the event. It is the peloton task id for v0 event and pod id for v1 event.

func (*Event) Timestamp

func (sue *Event) Timestamp() *float64

Timestamp returns timestamp in second.

func (*Event) V0

func (sue *Event) V0() *pbeventstream.Event

V0 returns underlying v0 event.

func (*Event) V1

func (sue *Event) V1() *v1pbevent.Event

V1 returns the underlying v1 event.

Source Files

Jump to

Keyboard shortcuts

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