event

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Events = make(chan Message, 10)

Functions

This section is empty.

Types

type Event

type Event string
const (
	Kill        Event = "kill"
	Death       Event = "death"
	Chicken     Event = "chicken"
	MercChicken Event = "merc chicken"
	Error       Event = "error"
)

type Handler

type Handler func(ctx context.Context, m Message) error

type Listener

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

func NewListener

func NewListener(logger *zap.Logger) Listener

func (*Listener) Listen

func (l *Listener) Listen(ctx context.Context) error

func (*Listener) Register

func (l *Listener) Register(h Handler)

type Message

type Message struct {
	Message string
	Image   image.Image
}

func Text

func Text(message string) Message

func WithScreenshot

func WithScreenshot(message string) Message

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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