manager

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager handles incoming events from telegram provider and manages new and existing clients of the bot.

func NewManager

func NewManager(log *zap.Logger, opts *Opts) *Manager

NewManager returns new instance of NewManager.

func (*Manager) Run

func (mgr *Manager) Run(ctx context.Context)

Run method starts the main goroutine of Manager. The call is blocking.

type Opts

type Opts struct {
	// IncomingEvents is a channel to receive events from.
	IncomingEvents chan domain.Event

	// TelegramAPI is a client to interact with telegram API.
	TelegramAPI *tgbotapi.BotAPI
}

Opts represents options to create new instance of Manager.

Jump to

Keyboard shortcuts

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