events

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EVENT_SYS_VERSION     = "3.0"
	PROC_COMMON_BEGIN_STR = "<!--XSUPERVISOR:BEGIN-->"
	PROC_COMMON_END_STR   = "<!--XSUPERVISOR:END-->"
)

Variables

This section is empty.

Functions

func EmitEvent

func EmitEvent(event Event)

func RegisterEventListener

func RegisterEventListener(eventListenerName string,
	events []string,
	listener *EventListener)

Types

type BaseEvent

type BaseEvent struct {
	// contains filtered or unexported fields
}

func (*BaseEvent) GetSerial

func (be *BaseEvent) GetSerial() uint64

func (*BaseEvent) GetType

func (be *BaseEvent) GetType() string

type Event

type Event interface {
	GetSerial() uint64
	GetType() string
	GetBody() string
}

type EventListener

type EventListener struct {
	// contains filtered or unexported fields
}

func NewEventListener

func NewEventListener(pool string,
	server string,
	stdin io.Reader,
	stdout io.Writer,
	buffer_size int) *EventListener

func UnregisterEventListener

func UnregisterEventListener(eventListenerName string) *EventListener

func (*EventListener) HandleEvent

func (el *EventListener) HandleEvent(event Event)

type EventListenerManager

type EventListenerManager struct {
	// contains filtered or unexported fields
}

func NewEventListenerManager

func NewEventListenerManager() *EventListenerManager

func (*EventListenerManager) EmitEvent

func (em *EventListenerManager) EmitEvent(event Event)

type EventPoolSerial

type EventPoolSerial struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewEventPoolSerial

func NewEventPoolSerial() *EventPoolSerial

type ProcCommEvent

type ProcCommEvent struct {
	BaseEvent
	// contains filtered or unexported fields
}

func NewProcCommEvent

func NewProcCommEvent(eventType string,
	procName string,
	groupName string,
	pid int,
	data string) *ProcCommEvent

func (*ProcCommEvent) GetBody

func (p *ProcCommEvent) GetBody() string

type ProcCommEventCapture

type ProcCommEventCapture struct {
	// contains filtered or unexported fields
}

func NewProcCommEventCapture

func NewProcCommEventCapture(reader io.Reader,
	captureMaxBytes int,
	stdType string,
	procName string,
	groupName string) *ProcCommEventCapture

func (*ProcCommEventCapture) SetPid

func (pec *ProcCommEventCapture) SetPid(pid int)

type ProcessGroupEvent

type ProcessGroupEvent struct {
	BaseEvent
	// contains filtered or unexported fields
}

func CreateProcessGroupAddedEvent

func CreateProcessGroupAddedEvent(group_name string) *ProcessGroupEvent

func CreateProcessGroupRemovedEvent

func CreateProcessGroupRemovedEvent(group_name string) *ProcessGroupEvent

func (*ProcessGroupEvent) GetBody

func (pe *ProcessGroupEvent) GetBody() string

type ProcessLogEvent

type ProcessLogEvent struct {
	BaseEvent
	// contains filtered or unexported fields
}

func CreateProcessLogStderrEvent

func CreateProcessLogStderrEvent(process_name string,
	group_name string,
	pid int,
	data string) *ProcessLogEvent

func CreateProcessLogStdoutEvent

func CreateProcessLogStdoutEvent(process_name string,
	group_name string,
	pid int,
	data string) *ProcessLogEvent

func (*ProcessLogEvent) GetBody

func (pe *ProcessLogEvent) GetBody() string

type ProcessStateEvent

type ProcessStateEvent struct {
	BaseEvent
	// contains filtered or unexported fields
}

func CreateProcessBackoffEvent

func CreateProcessBackoffEvent(process string,
	group string,
	from_state string,
	tries int) *ProcessStateEvent

func CreateProcessExitedEvent

func CreateProcessExitedEvent(process string,
	group string,
	from_state string,
	expected int,
	pid int) *ProcessStateEvent

func CreateProcessFatalEvent

func CreateProcessFatalEvent(process string,
	group string,
	from_state string) *ProcessStateEvent

func CreateProcessRunningEvent

func CreateProcessRunningEvent(process string,
	group string,
	from_state string,
	pid int) *ProcessStateEvent

func CreateProcessStartingEvent

func CreateProcessStartingEvent(process string,
	group string,
	from_state string,
	tries int) *ProcessStateEvent

func CreateProcessStoppedEvent

func CreateProcessStoppedEvent(process string,
	group string,
	from_state string,
	pid int) *ProcessStateEvent

func CreateProcessStoppingEvent

func CreateProcessStoppingEvent(process string,
	group string,
	from_state string,
	pid int) *ProcessStateEvent

func CreateProcessUnknownEvent

func CreateProcessUnknownEvent(process string,
	group string,
	from_state string) *ProcessStateEvent

func (*ProcessStateEvent) GetBody

func (pse *ProcessStateEvent) GetBody() string

type RemoteCommunicationEvent

type RemoteCommunicationEvent struct {
	BaseEvent
	// contains filtered or unexported fields
}

func NewRemoteCommunicationEvent

func NewRemoteCommunicationEvent(typ string, data string) *RemoteCommunicationEvent

func (*RemoteCommunicationEvent) GetBody

func (r *RemoteCommunicationEvent) GetBody() string

type SupervisorStateChangeEvent

type SupervisorStateChangeEvent struct {
	BaseEvent
}

func CreateSupervisorStateChangeRunning

func CreateSupervisorStateChangeRunning() *SupervisorStateChangeEvent

func (*SupervisorStateChangeEvent) GetBody

func (s *SupervisorStateChangeEvent) GetBody() string

type TickEvent

type TickEvent struct {
	BaseEvent
	// contains filtered or unexported fields
}

func NewTickEvent

func NewTickEvent(tickType string, when int64) *TickEvent

func (*TickEvent) GetBody

func (te *TickEvent) GetBody() string

Jump to

Keyboard shortcuts

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