scalesets

package
v0.2.3-alpha1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 21 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	HeaderActionsActivityID = "ActivityId"
	HeaderGitHubRequestID   = "X-GitHub-Request-Id"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageSession

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

func (*MessageSession) Close

func (m *MessageSession) Close() error

func (*MessageSession) DeleteMessage

func (m *MessageSession) DeleteMessage(ctx context.Context, messageID int64) (err error)

func (*MessageSession) GetMessage

func (m *MessageSession) GetMessage(ctx context.Context, lastMessageID int64, maxCapacity uint) (_ params.RunnerScaleSetMessage, err error)

func (*MessageSession) LastError

func (m *MessageSession) LastError() error

func (*MessageSession) MessageQueueAccessToken

func (m *MessageSession) MessageQueueAccessToken() string

func (*MessageSession) Refresh

func (m *MessageSession) Refresh(ctx context.Context) (err error)

func (*MessageSession) SessionsRelativeURL

func (m *MessageSession) SessionsRelativeURL() (string, error)

type ScaleSetClient

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

func NewClient

func NewClient(cli common.GithubClient) (*ScaleSetClient, error)

func (*ScaleSetClient) AcquireJobs

func (s *ScaleSetClient) AcquireJobs(ctx context.Context, runnerScaleSetID int, messageQueueAccessToken string, requestIDs []int64) (_ []int64, err error)

func (*ScaleSetClient) CreateMessageSession

func (s *ScaleSetClient) CreateMessageSession(ctx context.Context, runnerScaleSetID int, owner string) (_ *MessageSession, err error)

func (*ScaleSetClient) CreateRunnerScaleSet

func (s *ScaleSetClient) CreateRunnerScaleSet(ctx context.Context, runnerScaleSet *params.RunnerScaleSet) (_ params.RunnerScaleSet, err error)

CreateRunnerScaleSet creates a new runner scale set in the target GitHub entity.

func (*ScaleSetClient) DeleteMessageSession

func (s *ScaleSetClient) DeleteMessageSession(ctx context.Context, session *MessageSession) (err error)

func (*ScaleSetClient) DeleteRunnerScaleSet

func (s *ScaleSetClient) DeleteRunnerScaleSet(ctx context.Context, runnerScaleSetID int) (err error)

func (*ScaleSetClient) Do

func (s *ScaleSetClient) Do(req *http.Request) (*http.Response, error)

func (*ScaleSetClient) DoLongPoll added in v0.2.2

func (s *ScaleSetClient) DoLongPoll(req *http.Request) (*http.Response, error)

DoLongPoll dispatches a request through the long poll client, whose timeout accommodates the broker holding the request open for up to ~50 seconds. Use it only for requests that legitimately block server side (the message queue long poll).

func (*ScaleSetClient) GenerateJitRunnerConfig

func (s *ScaleSetClient) GenerateJitRunnerConfig(ctx context.Context, runnerName string, scaleSetID int) (_ params.RunnerScaleSetJitRunnerConfig, err error)

func (*ScaleSetClient) GetAcquirableJobs

func (s *ScaleSetClient) GetAcquirableJobs(ctx context.Context, runnerScaleSetID int) (_ params.AcquirableJobList, err error)

func (*ScaleSetClient) GetGithubClient

func (s *ScaleSetClient) GetGithubClient() (common.GithubClient, error)

func (*ScaleSetClient) GetRunner

func (s *ScaleSetClient) GetRunner(ctx context.Context, runnerID int64) (_ params.RunnerReference, err error)

func (*ScaleSetClient) GetRunnerByName

func (s *ScaleSetClient) GetRunnerByName(ctx context.Context, runnerName string) (_ params.RunnerReference, err error)

func (*ScaleSetClient) GetRunnerGroupByName

func (s *ScaleSetClient) GetRunnerGroupByName(ctx context.Context, runnerGroup string) (_ params.RunnerGroup, err error)

func (*ScaleSetClient) GetRunnerScaleSetByID

func (s *ScaleSetClient) GetRunnerScaleSetByID(ctx context.Context, runnerScaleSetID int) (_ params.RunnerScaleSet, err error)

func (*ScaleSetClient) GetRunnerScaleSetByNameAndRunnerGroup

func (s *ScaleSetClient) GetRunnerScaleSetByNameAndRunnerGroup(ctx context.Context, runnerGroupID int, name string) (_ params.RunnerScaleSet, err error)

func (*ScaleSetClient) ListAllRunners

func (s *ScaleSetClient) ListAllRunners(ctx context.Context) (_ params.RunnerReferenceList, err error)

func (*ScaleSetClient) ListRunnerScaleSets

func (s *ScaleSetClient) ListRunnerScaleSets(ctx context.Context) (_ *params.RunnerScaleSetsResponse, err error)

ListRunnerScaleSets lists all runner scale sets in a github entity.

func (*ScaleSetClient) RemoveRunner

func (s *ScaleSetClient) RemoveRunner(ctx context.Context, runnerID int64) (err error)

func (*ScaleSetClient) UpdateRunnerScaleSet

func (s *ScaleSetClient) UpdateRunnerScaleSet(ctx context.Context, runnerScaleSetID int, runnerScaleSet params.RunnerScaleSet) (_ params.RunnerScaleSet, err error)

Jump to

Keyboard shortcuts

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