koolo

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

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

Bot will be in charge of running the run loop: create games, traveling, killing bosses, repairing, picking...

func NewBot

func NewBot(
	logger *zap.Logger,
	hm health.Manager,
	ab action.Builder,
	gr *reader.GameReader,
) *Bot

func (*Bot) Run

func (b *Bot) Run(ctx context.Context, firstRun bool, runs []run.Run) error

func (*Bot) TogglePause

func (b *Bot) TogglePause()

type Companion

type Companion interface {
	JoinGame(gameName, password string)
}

type CompanionGameData

type CompanionGameData struct {
	GameName string
	Password string
}

type CompanionSupervisor

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

CompanionSupervisor is the main bot entrypoint, it will handle all the parallel processes and ensure everything is up and running

func NewCompanionSupervisor

func NewCompanionSupervisor(logger *zap.Logger, bot *Bot, gr *reader.GameReader, gm *helper.GameManager) *CompanionSupervisor

func (*CompanionSupervisor) JoinGame

func (s *CompanionSupervisor) JoinGame(gameName, password string)

func (*CompanionSupervisor) Start

func (s *CompanionSupervisor) Start(ctx context.Context, runs []run.Run) error

Start will stay running during the application lifecycle, it will orchestrate all the required bot pieces

func (*CompanionSupervisor) Stop

func (s *CompanionSupervisor) Stop()

func (*CompanionSupervisor) TogglePause

func (s *CompanionSupervisor) TogglePause()

type SinglePlayerSupervisor

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

SinglePlayerSupervisor is the main bot entrypoint, it will handle all the parallel processes and ensure everything is up and running

func NewSinglePlayerSupervisor

func NewSinglePlayerSupervisor(logger *zap.Logger, bot *Bot, gr *reader.GameReader, gm *helper.GameManager) *SinglePlayerSupervisor

func (*SinglePlayerSupervisor) Start

func (s *SinglePlayerSupervisor) Start(ctx context.Context, runs []run.Run) error

Start will stay running during the application lifecycle, it will orchestrate all the required bot pieces

func (*SinglePlayerSupervisor) Stop

func (s *SinglePlayerSupervisor) Stop()

func (*SinglePlayerSupervisor) TogglePause

func (s *SinglePlayerSupervisor) TogglePause()

type Supervisor

type Supervisor interface {
	Start(ctx context.Context, runs []run.Run) error
	Stop()
	TogglePause()
}

Directories

Path Synopsis
tcp
remote
web

Jump to

Keyboard shortcuts

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