run

package
v0.0.0-...-3bb7e5b Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: MIT Imports: 18 Imported by: 1 module, 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

This section is empty.

Variables

View Source
var StateVersion = Step{
	Name: "Hello world",
	Callable: func(ctx context.Context, arg *StepArguments) error {
		log.Ctx(ctx).Debug().Msg("Welcome to Saturn!")
		log.Ctx(ctx).Debug().Msgf("Node: %s", os.Getenv("HOSTNAME"))
		log.Ctx(ctx).Debug().Msgf("Revision: %s", os.Getenv("SATURN_REVISION"))
		return nil
	},
}

Functions

func GetArchive

func GetArchive(
	ctx context.Context,
	f saturn.Finisher,
	c StorageClient,
	spec FileSpecification,
	root string,
) error

func PutArchive

func PutArchive(
	ctx context.Context,
	f saturn.Finisher,
	c StorageClient,
	spec FileSpecification,
	root string,
	public bool,
) error

Types

type CompileRequest

type CompileRequest struct {
	Submission `mapstructure:"submission,squash"`
}

type ExecuteRequest

type ExecuteRequest struct {
	A              Submission        `mapstructure:"a"`
	B              Submission        `mapstructure:"b"`
	Maps           []string          `mapstructure:"maps"`
	Replay         FileSpecification `mapstructure:"replay"`
	AlternateOrder bool              `mapstructure:"alternate-order"`
}

type FileSpecification

type FileSpecification struct {
	Bucket string `mapstructure:"bucket"`
	Name   string `mapstructure:"name"`
}

type GCSClient

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

func NewGCSClient

func NewGCSClient(ctx context.Context, onSaturn bool) (*GCSClient, error)

func (*GCSClient) GetFile

func (c *GCSClient) GetFile(ctx context.Context, f FileSpecification, w io.Writer) error

func (*GCSClient) UploadFile

func (c *GCSClient) UploadFile(ctx context.Context, f FileSpecification, r io.Reader, public bool) error

type JavaScaffold

type JavaScaffold struct {
	Scaffold
	// contains filtered or unexported fields
}

func NewJavaScaffold

func NewJavaScaffold(ctx context.Context, episode saturn.Episode, repo *git.Repository, root string, javaPath string, onSaturn bool) (*JavaScaffold, error)

func (*JavaScaffold) CompileSucceeded

func (s *JavaScaffold) CompileSucceeded() *Step

func (*JavaScaffold) DetermineScores

func (s *JavaScaffold) DetermineScores() *Step

func (*JavaScaffold) DownloadBinaries

func (s *JavaScaffold) DownloadBinaries() *Step

func (*JavaScaffold) DownloadSource

func (s *JavaScaffold) DownloadSource() *Step

func (*JavaScaffold) Prepare

func (s *JavaScaffold) Prepare() *Step

func (*JavaScaffold) RunMatch

func (s *JavaScaffold) RunMatch() *Step

func (*JavaScaffold) UploadBinary

func (s *JavaScaffold) UploadBinary() *Step

func (*JavaScaffold) UploadReplay

func (s *JavaScaffold) UploadReplay() *Step

func (*JavaScaffold) VerifySubmission

func (s *JavaScaffold) VerifySubmission() *Step

type Python3Scaffold

type Python3Scaffold struct {
	Scaffold
	// contains filtered or unexported fields
}

func NewPython3Scaffold

func NewPython3Scaffold(ctx context.Context, episode saturn.Episode, repo *git.Repository, root string, pyVersion string, onSaturn bool) (*Python3Scaffold, error)

func (*Python3Scaffold) CompileSucceeded

func (s *Python3Scaffold) CompileSucceeded() *Step

func (*Python3Scaffold) DetermineScores

func (s *Python3Scaffold) DetermineScores() *Step

func (*Python3Scaffold) DownloadBinaries

func (s *Python3Scaffold) DownloadBinaries() *Step

func (*Python3Scaffold) DownloadSource

func (s *Python3Scaffold) DownloadSource() *Step

func (*Python3Scaffold) Prepare

func (s *Python3Scaffold) Prepare() *Step

func (*Python3Scaffold) RunMatch

func (s *Python3Scaffold) RunMatch() *Step

func (*Python3Scaffold) UploadReplay

func (s *Python3Scaffold) UploadReplay() *Step

func (*Python3Scaffold) VerifySubmission

func (s *Python3Scaffold) VerifySubmission() *Step

type Recipe

type Recipe []*Step

func (Recipe) Run

func (r Recipe) Run(ctx context.Context, arg *StepArguments) error

type Scaffold

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

func NewScaffold

func NewScaffold(ctx context.Context, episode saturn.Episode, repo *git.Repository, root string, onSaturn bool) (*Scaffold, error)

func (*Scaffold) Refresh

func (s *Scaffold) Refresh(ctx context.Context) error

func (*Scaffold) RunCommand

func (s *Scaffold) RunCommand(ctx context.Context, extra_env []string, name string, arg ...string) (string, error)

type ScaffoldMultiplexer

type ScaffoldMultiplexer struct {
	Root string
	// contains filtered or unexported fields
}

func NewScaffoldMultiplexer

func NewScaffoldMultiplexer(root string, secret *saturn.Secret, onSaturn bool) (*ScaffoldMultiplexer, error)

func (*ScaffoldMultiplexer) Compile

func (m *ScaffoldMultiplexer) Compile(
	ctx context.Context,
	f saturn.Finisher,
	payload saturn.TaskPayload,
) error

func (*ScaffoldMultiplexer) Execute

func (m *ScaffoldMultiplexer) Execute(
	ctx context.Context,
	f saturn.Finisher,
	payload saturn.TaskPayload,
) error

type Step

type Step struct {
	Name     string
	Callable func(ctx context.Context, arg *StepArguments) error
}

func (*Step) Run

func (s *Step) Run(ctx context.Context, desc string, arg *StepArguments) error

type StepArguments

type StepArguments struct {
	Details interface{}
	StorageClient
	saturn.Finisher
}

type StorageClient

type StorageClient interface {
	GetFile(ctx context.Context, spec FileSpecification, w io.Writer) error
	UploadFile(ctx context.Context, spec FileSpecification, r io.Reader, public bool) error
}

type Submission

type Submission struct {
	Source   FileSpecification `mapstructure:"source"`
	Binary   FileSpecification `mapstructure:"binary"`
	TeamName string            `mapstructure:"team-name"`
	Package  string            `mapstructure:"package"`
}

Jump to

Keyboard shortcuts

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