eventdaemon

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CommandStop stops the daemon
	CommandStop = Command(1)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command int16

Command defines commands the daemon can handle

type Daemon

type Daemon struct {
	Database types.Database
	// contains filtered or unexported fields
}

Daemon is the event daemon collecting events from a messenger

func Create

func Create(database types.Database, syncer Syncer) *Daemon

Create returns a new event daemon

func (*Daemon) Start

func (d *Daemon) Start() error

Start starts the daemon

func (*Daemon) Stop

func (d *Daemon) Stop()

Stop stops the daemon

type Syncer

type Syncer interface {
	Start(daemon *Daemon) error
	Stop()
}

Syncer is responsible for receiving messages from a messenger

Jump to

Keyboard shortcuts

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