poller

package
v2.0.0-alpha3 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigKey = "telegram.poller"

Variables

This section is empty.

Functions

func TelegramPollerActivator

func TelegramPollerActivator() *di.Activator

Types

type Config

type Config struct {
	OnlyOwner      bool          `mapstructure:"only_owner"`
	Buffer         int           `mapstructure:"buffer"`
	Limit          int           `mapstructure:"limit"`
	Timeout        time.Duration `mapstructure:"timeout"`
	AllowedUpdates []string      `mapstructure:"allowed_updates"`
}

func (*Config) Init

func (cfg *Config) Init()

type Key

type Key struct{}

type TelegramPoller

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

func GetTelegramPoller

func GetTelegramPoller(ctx context.Context, c ...di.Container) (*TelegramPoller, error)

func NewTelegramPoller

func NewTelegramPoller(cfg *Config, bot *telegram.Bot, client *task.Client) *TelegramPoller

func (*TelegramPoller) Poll

func (p *TelegramPoller) Poll(ctx context.Context) error

Jump to

Keyboard shortcuts

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