runner

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2021 License: MPL-2.0-no-copyleft-exception Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	C              fwConfig.Config `yaml:"c,inline"`
	KubeConfig     string          `yaml:"kubeconfig"`
	Namespace      string          `yaml:"namespace"`
	MaxConcurrency uint            `yaml:"max_concurrency"`
	Resources      types.Resources `yaml:"max_resources"`
	// contains filtered or unexported fields
}

Config encapsulates the full managed and specified configuration

func (*Config) Client

func (c *Config) Client() (*kubernetes.Clientset, error)

Client retrieves a pre-built kubernetes client ready for use, or error.

func (*Config) Config

func (c *Config) Config() *fwConfig.Config

Config returns the underlying framework configuration, and matches the Configurator interface.

func (*Config) ExtraLoad

func (c *Config) ExtraLoad() error

ExtraLoad also conforms to the underlying framework configurator interface. It is used to import the kubeconfig. If the kubeconfig is not specified, it assumes it is running inside of kubernetes and attempts to get the associated client credential.

func (*Config) SchemeClient

func (c *Config) SchemeClient() (client.Client, error)

SchemeClient returns a client prepped with the tinyCI API.

type Run

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

Run is the encapsulation of a single run.

func (*Run) AfterRun

func (r *Run) AfterRun() error

AfterRun is executed before the next run is started.

func (*Run) BeforeRun

func (r *Run) BeforeRun() error

BeforeRun is executed before the next run is started.

func (*Run) Name

func (r *Run) Name() string

Name is the name of the run

func (*Run) Run

func (r *Run) Run() (bool, error)

Run runs the CI job.

func (*Run) RunContext

func (r *Run) RunContext() *fwcontext.RunContext

RunContext returns the assigned *context.RunContext for this run.

func (*Run) String

func (r *Run) String() string

type Runner

type Runner struct {
	Config *Config

	sync.Mutex
	// contains filtered or unexported fields
}

Runner encapsulates an infinite lifecycle overlay-runner.

func (*Runner) AfterRun

func (r *Runner) AfterRun(name string, runCtx *fwcontext.RunContext)

AfterRun decrements the run count

func (*Runner) Hostname

func (r *Runner) Hostname() string

Hostname is the reported hostname of the machine; an identifier. Not necessary for anything and insecure, just ornamental.

func (*Runner) Init

func (r *Runner) Init(ctx *fwcontext.Context) error

Init is the bootstrap of the runner.

func (*Runner) LogsvcClient

func (r *Runner) LogsvcClient(ctx *fwcontext.RunContext) *log.SubLogger

LogsvcClient returns the system log client. Must be called after configuration is initialized

func (*Runner) MakeRun

func (r *Runner) MakeRun(name string, runCtx *fwcontext.RunContext) (fw.Run, error)

MakeRun makes a new run with a new context and name.

func (*Runner) QueueClient

func (r *Runner) QueueClient() *queue.Client

QueueClient returns the queue client

func (*Runner) QueueName

func (r *Runner) QueueName() string

QueueName is the name of the queue this runner should be processing.

func (*Runner) Ready

func (r *Runner) Ready() bool

Ready returns true if the runner is ready to accept more work.

Jump to

Keyboard shortcuts

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