runner

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: GPL-3.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RunnerAssociations

type RunnerAssociations interface {
	Video() video.VideoService
	Thumbnail() image.ThumbnailService
}

func NewRunnerAssociations

func NewRunnerAssociations(
	video video.VideoService,
	thumbnail image.ThumbnailService,
) RunnerAssociations

type RunnerService

type RunnerService interface {
	// Domain
	First(ctx context.Context, arg params.FirstRunnerParams) (*domain.Runner, error)

	ValidateAuth(ctx context.Context, arg params.ValidateAuthRunnerParams) (bool, *claims.RunnerClaims, error)

	// gRPC
	Auth(ctx context.Context, arg *grpc_runner_v1.AuthRequest) (*grpc_runner_v1.AuthResponse, error)
	Operation(ctx context.Context, runner client.Client, operation *grpc_runner_v1.OperationRequest) error
	Stream(ctx context.Context, runner client.Client, stream *grpc_runner_v1.StreamRequest) error

	// Connection + Leader
	Timeout(anime domain.AnimeBase) error
	Interrupt(anime domain.AnimeBase) error
	Assign(anime domain.AnimeBase, sizeInBytes uint64, address string) (client.Client, error)

	// Connection + State
	Info() []client.Info
	Client(runnerClaims *claims.RunnerClaims) client.Client
	Connect(runnerClaims *claims.RunnerClaims) (client.Client, error)
	ToggleState(runnerClaims *claims.RunnerClaims) (client.State, error)
	Disconnect(runnerClaims *claims.RunnerClaims) error
}

func NewRunnerService

func NewRunnerService(
	querier database.QuerierExtended,
	cacher cacher.Cacher,
	fs *fs.FileSystem,
	queue *queue.Queue,
	wshub websocket.Hub,
	associations RunnerAssociations,
) RunnerService

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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