runtime

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BotRunner

type BotRunner interface {
	StartContainer(ctx context.Context, image string, botID string, env []string) (string, error)
	StopContainer(ctx context.Context, containerID string) error
	CountActiveContainers(ctx context.Context) (int, error)
}

type QueuedBot

type QueuedBot struct {
	ID    string
	Image string
	Env   []string
	Match string
}

type RuntimeService

type RuntimeService struct {
	pb.UnimplementedRuntimeServiceServer
	// contains filtered or unexported fields
}

func NewRuntimeService

func NewRuntimeService(maxBots int) (*RuntimeService, error)

func NewRuntimeServiceWithRunner

func NewRuntimeServiceWithRunner(runner BotRunner, maxBots int) *RuntimeService

func (*RuntimeService) GetRuntimeStats

func (s *RuntimeService) GetRuntimeStats(ctx context.Context, req *pb.Empty) (*pb.RuntimeStats, error)

func (*RuntimeService) StartBot

func (*RuntimeService) StopBot

type Scheduler

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

func NewScheduler

func NewScheduler(runner BotRunner, maxBots int) *Scheduler

func (*Scheduler) GetActiveCount

func (s *Scheduler) GetActiveCount() int

func (*Scheduler) GetQueueSize

func (s *Scheduler) GetQueueSize() int

func (*Scheduler) NotifyStop

func (s *Scheduler) NotifyStop(botID string)

func (*Scheduler) StartBot

func (s *Scheduler) StartBot(ctx context.Context, botID, image, matchID string, env []string) (string, bool, int, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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