events

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEvent

func NewEvent(eventType EventType, message string)

NewEvent is used to publish new event

Types

type Event

type Event struct {
	Type    EventType `json:"type"`
	Message string    `json:"message"`
}

Event is struct for events

func GetEvent

func GetEvent(data string) (*Event, error)

GetEvent is used to read published event

type EventType

type EventType string

EventType is type for further parsing

const (
	Error  EventType = "error"
	Status EventType = "status"
	Result EventType = "result"
)

available event types

Jump to

Keyboard shortcuts

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