simulator

package
v0.27.6 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RunnerGroup

type RunnerGroup struct {
	Scope RunnerGroupScope
	Kind  RunnerGroupKind
	Name  string
}

func NewRunnerGroupFromGitHub

func NewRunnerGroupFromGitHub(g *github.RunnerGroup) RunnerGroup

func NewRunnerGroupFromProperties

func NewRunnerGroupFromProperties(enterprise, organization, group string) RunnerGroup

func (RunnerGroup) String

func (r RunnerGroup) String() string

type RunnerGroupKind

type RunnerGroupKind int
const (
	Default RunnerGroupKind = iota
	Custom
)

func (RunnerGroupKind) String

func (s RunnerGroupKind) String() string

type RunnerGroupScope

type RunnerGroupScope int
const (
	Organization RunnerGroupScope = iota
	Enterprise
)

func (RunnerGroupScope) String

func (s RunnerGroupScope) String() string

type Simulator

type Simulator struct {
	Client *github.Client
	Log    logr.Logger
}

func (*Simulator) GetRunnerGroupsVisibleToRepository

func (c *Simulator) GetRunnerGroupsVisibleToRepository(ctx context.Context, org, repo string, managed *VisibleRunnerGroups) (*VisibleRunnerGroups, error)

type VisibleRunnerGroups

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

VisibleRunnerGroups is a set of enterprise and organization runner groups that are visible to a GitHub repository. GitHub Actions chooses one of such visible group on which the workflow job is scheduled. ARC chooses the same group as Actions as the scale target.

func NewVisibleRunnerGroups

func NewVisibleRunnerGroups() *VisibleRunnerGroups

func (*VisibleRunnerGroups) Add

Add adds a runner group into VisibleRunnerGroups at a certain position in the list so that Traverse can return runner groups in order of higher precedence to lower precedence.

func (*VisibleRunnerGroups) Includes

func (r *VisibleRunnerGroups) Includes(ref RunnerGroup) bool

func (*VisibleRunnerGroups) IsEmpty

func (g *VisibleRunnerGroups) IsEmpty() bool

func (*VisibleRunnerGroups) String

func (g *VisibleRunnerGroups) String() string

func (*VisibleRunnerGroups) Traverse

func (g *VisibleRunnerGroups) Traverse(f func(RunnerGroup) (bool, error)) error

Traverse traverses all the runner groups visible to a repository in order of higher precedence to lower precedence.

Jump to

Keyboard shortcuts

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