utils

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RegisteredChannel = make(map[EventType]chan Event)

Functions

func EmitEvent

func EmitEvent(receiver Receiver, data EventData)

func RegisterEvent

func RegisterEvent(eventType EventType, ch chan Event)

func Unmarshal

func Unmarshal(jsonOrYaml string, obj interface{}) error

Types

type Event

type Event struct {
	Receiver  Receiver
	EventData EventData
}

type EventData

type EventData interface {
	GetEventType() EventType
}

type EventType

type EventType string

type Receiver

type Receiver struct {
	TargetId string
}

Jump to

Keyboard shortcuts

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