bot

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DelayBetweenDispatchAssignment = 35 * time.Second
	MinUnitCountForDelay           = 3
	PerUnitDelaySeconds            = 5
	MaxDelayCap                    = 60 * 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(ctx context.Context, logger *zap.Logger, job string, state *manager.Manager, tracker tracker.ITracker) *Bot

func (*Bot) Run

func (b *Bot) Run()

func (*Bot) Stop added in v0.8.20

func (b *Bot) Stop()

type Manager

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

func NewManager

func NewManager(p Params) *Manager

func (*Manager) Run

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

func (*Manager) Start

func (b *Manager) Start(ctx context.Context, 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
	JS      *events.JSWrapper
	Tracker tracker.ITracker
}

Jump to

Keyboard shortcuts

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