event

package
v1.0.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSNS

func CreateSNS(region string) *sns.SNS

func NewFailingSNSClient

func NewFailingSNSClient() *fakeSNSClient

func NewNonFailingSNSClient

func NewNonFailingSNSClient() *fakeSNSClient

func StringAddr

func StringAddr(str string) *string

Types

type Bus

type Bus struct {
	EventC    chan interface{}
	StopC     chan bool
	NumEvents uint64
	// contains filtered or unexported fields
}

func NewEventBus

func NewEventBus() *Bus

func (*Bus) RegisterListener

func (b *Bus) RegisterListener(listener Listener)

func (*Bus) Stop

func (b *Bus) Stop()

type HeartbeatEvent

type HeartbeatEvent struct {
	Name     string            `json:"name"`
	Metadata map[string]string `json:"metadata,omitempty"`
}

func NewHeartbeatEvent

func NewHeartbeatEvent() *HeartbeatEvent

func (*HeartbeatEvent) String

func (e *HeartbeatEvent) String() string

type HttpEventNotifier

type HttpEventNotifier struct {
	ConfigMap map[string]string
}

func NewHTTPNotifier

func NewHTTPNotifier(configMap map[string]string) *HttpEventNotifier

func (*HttpEventNotifier) Event

func (h *HttpEventNotifier) Event(event interface{})

type Listener

type Listener interface {
	Event(event interface{})
}

type ListenerFunc

type ListenerFunc func(event interface{})

func (ListenerFunc) Event

func (l ListenerFunc) Event(event interface{})

type MinimalHttpServer

type MinimalHttpServer struct {
	Mux    *http.ServeMux
	Server *http.Server
	URL    string
}

func NewMinimalHttpServer

func NewMinimalHttpServer() *MinimalHttpServer

type SNSEventNotifier

type SNSEventNotifier struct {
	ConfigMap map[string]string
	// contains filtered or unexported fields
}

func NewSNSEventNotifier

func NewSNSEventNotifier(sns snsiface.SNSAPI, configMap map[string]string) *SNSEventNotifier

func (*SNSEventNotifier) Event

func (h *SNSEventNotifier) Event(event interface{})

type TaskAbortedEvent

type TaskAbortedEvent struct {
	Name     string            `json:"name"`
	TaskId   string            `json:"taskId"`
	Metadata map[string]string `json:"metadata,omitempty"`
}

func NewTaskAbortedEvent

func NewTaskAbortedEvent(taskId string) *TaskAbortedEvent

func (*TaskAbortedEvent) String

func (e *TaskAbortedEvent) String() string

type TaskCompletedEvent

type TaskCompletedEvent struct {
	Name     string            `json:"name"`
	TaskId   string            `json:"taskId"`
	Ok       bool              `json:"ok"`
	Metadata map[string]string `json:"metadata,omitempty"`
}

func NewTaskCompletedEvent

func NewTaskCompletedEvent(taskId string, ok bool) *TaskCompletedEvent

func (*TaskCompletedEvent) String

func (e *TaskCompletedEvent) String() string

type TaskStartedEvent

type TaskStartedEvent struct {
	Name     string            `json:"name"`
	TaskId   string            `json:"taskId"`
	Metadata map[string]string `json:"metadata,omitempty"`
}

func NewTaskStartedEvent

func NewTaskStartedEvent(taskId string) *TaskStartedEvent

func (*TaskStartedEvent) String

func (e *TaskStartedEvent) String() string

type TaskSubmittedEvent

type TaskSubmittedEvent struct {
	Name     string            `json:"name"`
	Metadata map[string]string `json:"metadata,omitempty"`
}

func NewTaskSubmittedEvent

func NewTaskSubmittedEvent() *TaskSubmittedEvent

func (*TaskSubmittedEvent) String

func (e *TaskSubmittedEvent) String() string

Jump to

Keyboard shortcuts

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