runner

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: May 26, 2021 License: MIT Imports: 10 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// GoalCheckerInterval is interval time of check deleting runner
	GoalCheckerInterval = 1 * time.Minute
	// MustGoalTime is hard limit for idle runner
	MustGoalTime = 1 * time.Hour
	// MustRunningTime is set time of instance create + download binaries + etc
	MustRunningTime = 5 * time.Minute
	// CheckPermissionInterval is interval time of check permission
	CheckPermissionInterval = 10 * time.Second
)
View Source
var (
	// StatusWillDelete will delete target in GitHub runners
	StatusWillDelete = "offline"
	// StatusSleep is sleeping runners
	StatusSleep = "online"
)
View Source
var (
	ErrNotWillDeleteRunner = fmt.Errorf("not will delete runner")
)

Error values

Functions

func ToName

func ToName(uuid 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) *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

Jump to

Keyboard shortcuts

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