event

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2024 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event interface {
	Name() string
	Before() error
	Action() error
	After() error
	// contains filtered or unexported methods
}

Event event interface

type Event2

type Event2[T any] interface {
	Name() string
	Before() error
	Handle() (T, error)
	After() error
	// contains filtered or unexported methods
}

Event2[T] event2 interface

type EventManager

type EventManager interface {
	Start()
	Stop()
	OnEvent(event Event)
}

EventManger event manager

func NewEventManager

func NewEventManager(respFn pool.RespFn[Event], opts ...pool.Option) (res EventManager)

NewEventManager create new event manager instance

type EventManager2

type EventManager2[T any] interface {
	Start()
	Stop()
	OnEvent(event Event2[T])
}

EventManger2[T] event manager

func NewEventManager2

func NewEventManager2[T any](respFn pool.ResponseFn[Event2[T], T], opts ...pool.Option) (res EventManager2[T])

NewEventManager2[T] create new event manager2 instance

type UnimplementedEvent

type UnimplementedEvent struct{}

UnimplementedEvent unimplemented Event

func (UnimplementedEvent) After

func (UnimplementedEvent) After() error

func (UnimplementedEvent) Before

func (UnimplementedEvent) Before() error

func (UnimplementedEvent) Name

func (UnimplementedEvent) Name() string

type UnimplementedEvent2

type UnimplementedEvent2 struct{}

UnimplementedEvent unimplemented Event2

func (UnimplementedEvent2) After

func (UnimplementedEvent2) After() error

func (UnimplementedEvent2) Before

func (UnimplementedEvent2) Before() error

func (UnimplementedEvent2) Name

func (UnimplementedEvent2) Name() string

Jump to

Keyboard shortcuts

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