serve

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(n int) (chan<- Payload, <-chan struct{})

New creates new channels for events queue and stopping any handling. A caller must close queue channel and waits stop one closing.

func Run

func Run(c *config.Config, p chan<- Payload, sigint <-chan os.Signal, logInfo, logError *log.Logger)

Run starts main service process.

Types

type Payload

type Payload struct {
	Cfg      *config.Config
	Event    *botgolang.Event
	LogInfo  *log.Logger
	LogError *log.Logger
}

Payload is a struct for events payload.

func (*Payload) ID

func (p *Payload) ID() string

ID returns message ID.

Jump to

Keyboard shortcuts

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