Documentation ¶
Overview ¶
Package runner package
Index ¶
- func RequireViewerAccessToRunnerResource(ctx context.Context, runner *models.Runner) error
- type CreateRunnerInput
- type CreateRunnerSessionInput
- type GetRunnerSessionsInput
- type GetRunnersInput
- type Service
- type SessionEvent
- type SubscribeToRunnerSessionErrorLogInput
- type SubscribeToRunnerSessionsInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateRunnerInput ¶
CreateRunnerInput is the input for creating a new runner
type CreateRunnerSessionInput ¶ added in v0.17.0
CreateRunnerSessionInput is the input for creating a new runner session.
type GetRunnerSessionsInput ¶ added in v0.17.0
type GetRunnerSessionsInput struct { // Sort specifies the field to sort on and direction Sort *db.RunnerSessionSortableField // PaginationOptions supports cursor based pagination PaginationOptions *pagination.Options // RunnerID is the runner to return sessions for RunnerID string }
GetRunnerSessionsInput is the input for querying a list of runner sessions
type GetRunnersInput ¶
type GetRunnersInput struct { // Sort specifies the field to sort on and direction Sort *db.RunnerSortableField // PaginationOptions supports cursor based pagination PaginationOptions *pagination.Options // NamespacePath is the namespace to return runners for NamespacePath *string // RunnerType is the type of runner to return RunnerType *models.RunnerType // IncludeInherited includes inherited runners in the result IncludeInherited bool }
GetRunnersInput is the input for querying a list of runners
type Service ¶
type Service interface { GetRunnerByPath(ctx context.Context, path string) (*models.Runner, error) GetRunnerByID(ctx context.Context, id string) (*models.Runner, error) GetRunners(ctx context.Context, input *GetRunnersInput) (*db.RunnersResult, error) GetRunnersByIDs(ctx context.Context, idList []string) ([]models.Runner, error) CreateRunner(ctx context.Context, input *CreateRunnerInput) (*models.Runner, error) UpdateRunner(ctx context.Context, runner *models.Runner) (*models.Runner, error) DeleteRunner(ctx context.Context, runner *models.Runner) error AssignServiceAccountToRunner(ctx context.Context, serviceAccountID string, runnerID string) error UnassignServiceAccountFromRunner(ctx context.Context, serviceAccountID string, runnerID string) error CreateRunnerSession(ctx context.Context, input *CreateRunnerSessionInput) (*models.RunnerSession, error) GetRunnerSessions(ctx context.Context, input *GetRunnerSessionsInput) (*db.RunnerSessionsResult, error) GetRunnerSessionByID(ctx context.Context, id string) (*models.RunnerSession, error) AcceptRunnerSessionHeartbeat(ctx context.Context, sessionID string) error CreateRunnerSessionError(ctx context.Context, runnerSessionID string, message string) error ReadRunnerSessionErrorLog(ctx context.Context, runnerSessionID string, startOffset int, limit int) ([]byte, error) SubscribeToRunnerSessionErrorLog(ctx context.Context, options *SubscribeToRunnerSessionErrorLogInput) (<-chan *logstream.LogEvent, error) GetLogStreamsByRunnerSessionIDs(ctx context.Context, idList []string) ([]models.LogStream, error) SubscribeToRunnerSessions(ctx context.Context, options *SubscribeToRunnerSessionsInput) (<-chan *SessionEvent, error) }
Service implements all runner related functionality
func NewService ¶
func NewService( logger logger.Logger, dbClient *db.Client, limitChecker limits.LimitChecker, activityService activityevent.Service, logStreamManager logstream.Manager, eventManager *events.EventManager, ) Service
NewService creates an instance of Service
type SessionEvent ¶ added in v0.17.0
type SessionEvent struct { RunnerSession *models.RunnerSession Action string }
SessionEvent is a runner session event
type SubscribeToRunnerSessionErrorLogInput ¶ added in v0.17.0
SubscribeToRunnerSessionErrorLogInput includes options for setting up a log event subscription
type SubscribeToRunnerSessionsInput ¶ added in v0.17.0
type SubscribeToRunnerSessionsInput struct { GroupID *string RunnerID *string RunnerType *models.RunnerType }
SubscribeToRunnerSessionsInput is the input for subscribing to runner sessions
Click to show internal directories.
Click to hide internal directories.