runner

package
v1.15.2 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: MIT Imports: 17 Imported by: 4

Documentation

Index

Constants

View Source
const (
	// ErrDescriptionRunnerForQueueingIsNotFound is error message for datastore.StatusDescription "runner for queueing is not found"
	ErrDescriptionRunnerForQueueingIsNotFound = "runner for queueing is not found"
)

Variables

View Source
var (
	// GoalCheckerInterval is interval time of check deleting runner
	GoalCheckerInterval = 1 * time.Minute
	// MustGoalTime is hard limit for idle runner.
	// So it is same as the limit of GitHub Actions
	MustGoalTime = 6 * time.Hour
	// MustRunningTime is set time of instance create + download binaries + etc
	MustRunningTime = 5 * time.Minute
	// TargetTokenInterval is interval time of checking target token
	TargetTokenInterval = 5 * time.Minute
	//NeedRefreshToken is time of token expired
	NeedRefreshToken = 10 * time.Minute
)
View Source
var (
	// StatusWillDelete will delete target in GitHub runners
	StatusWillDelete = "offline"
	// StatusSleep is sleeping runners
	StatusSleep = "online"
)
View Source
var (
	// ConcurrencyDeleting is value of concurrency
	ConcurrencyDeleting int64 = 0
)
View Source
var (
	// ErrNotWillDeleteRunner is error message for "not will delete runner"
	ErrNotWillDeleteRunner = fmt.Errorf("not will delete runner")
)

Functions

func ToName

func ToName(u string) string

ToName convert uuid to runner name

func ToReason added in v1.3.0

func ToReason(status string) datastore.RunnerStatus

ToReason convert status from GitHub to datastore.RunnerStatus

func ToUUID

func ToUUID(name string) (uuid.UUID, error)

ToUUID convert runner name to uuid

Types

type Manager

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

Manager is runner management

func New

func New(ds datastore.Datastore, runnerVersion string) *Manager

New create a Manager

func (*Manager) Loop

func (m *Manager) Loop(ctx context.Context) error

Loop check

type Runner

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

Runner is a runner implement

type TemporaryMode added in v1.13.0

type TemporaryMode int

TemporaryMode is mode of temporary runner

const (
	TemporaryUnknown TemporaryMode = iota
	TemporaryOnce
	TemporaryEphemeral
)

RunnerEphemeralModes variable

func GetRunnerTemporaryMode added in v1.13.0

func GetRunnerTemporaryMode(runnerVersion string) (string, TemporaryMode, error)

GetRunnerTemporaryMode get runner version and RunnerTemporaryMode

func (TemporaryMode) StringFlag added in v1.13.0

func (rtm TemporaryMode) StringFlag() string

StringFlag return flag

Jump to

Keyboard shortcuts

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