event

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegistEvent

func RegistEvent(key EventID, cb EventCb)

if key == EAll, receive all event

func SendEvent

func SendEvent(key EventID, info string)

Types

type EventCb

type EventCb func(key EventID, info string)

type EventID

type EventID int
const (
	EHistory EventID = iota
	EStartChat
	EFinishChat
	EUserCommit
	EChatError
	EReset
	ERetry
	ESystemPrompt
	ELoadPrompt
	EChatEnable
	EError
	EAll
)

func (EventID) String

func (i EventID) String() string

Jump to

Keyboard shortcuts

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