pkg

package
v0.0.0-...-247ba60 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

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

func NewEvent

func NewEvent(dsn string, buffer int, handler Handler) *Event

func (*Event) Close

func (e *Event) Close()

*

  • @description: close all connect
  • @param {*}
  • @return {*}

func (*Event) Collect

func (e *Event) Collect(ctx context.Context, msg ...Msg)

func (*Event) StartProcess

func (e *Event) StartProcess()

type Eventer

type Eventer interface {
	Collect(ctx context.Context, msg Msg) // collect events
}

type Handle

type Handle struct {
}

func NewHandle

func NewHandle() *Handle

func (*Handle) Handle

func (h *Handle) Handle(ctx context.Context, msg Msg)

type Handler

type Handler interface {
	Handle(ctx context.Context, msg Msg) // handle events
}

type Msg

type Msg struct {
	Name    string
	Content string
}

Jump to

Keyboard shortcuts

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