bot

package
v0.8.11 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DelayBetweenDispatchAssignment = 35 * time.Second
	MinUnitCountForDelay           = 3
	PerUnitDelaySeconds            = 6
	MaxDelayCap                    = 80 * time.Second
)

Variables

View Source
var Module = fx.Module("centrum_bot_manager", fx.Provide(
	NewManager,
))

Functions

This section is empty.

Types

type Bot

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

func NewBot

func NewBot(logger *zap.Logger, job string, state *manager.Manager) *Bot

func (*Bot) Run

func (b *Bot) Run(ctx context.Context) error

type Manager

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

func NewManager

func NewManager(p Params) *Manager

func (*Manager) Run

func (s *Manager) Run()

func (*Manager) Start

func (b *Manager) Start(job string) error

func (*Manager) Stop

func (b *Manager) Stop(job string) error

type Params

type Params struct {
	fx.In

	LC fx.Lifecycle

	Logger  *zap.Logger
	TP      *tracesdk.TracerProvider
	State   *manager.Manager
	Eventus *events.Eventus
}

Jump to

Keyboard shortcuts

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