v0.0.0-...-adc8916 Latest Latest

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

Go to latest
Published: Jul 12, 2024 License: AGPL-3.0, Apache-2.0, CC-BY-SA-3.0 Imports: 51 Imported by: 0




This section is empty.


View Source
var Command cmd.Handler = bootCommand{}


This section is empty.


type Supervisor

type Supervisor struct {
	// Config file location like "/etc/arvados/config.yml", or "-"
	// to read from Stdin (see below).
	ConfigPath string
	// Literal config file (useful for test suites). If non-empty,
	// this is used instead of ConfigPath.
	ConfigYAML string
	// Path to arvados source tree. Only used for dev/test
	// clusters.
	SourcePath string
	// Version number to build into binaries. Only used for
	// dev/test clusters.
	SourceVersion string
	// "production", "development", or "test".
	ClusterType string
	// Listening address for external services, and internal
	// services whose InternalURLs are not explicitly configured.
	// If blank, listen on the configured controller ExternalURL
	// host; if that is also blank, listen on all addresses
	// (
	ListenHost string
	// Default host:port for controller ExternalURL if not
	// explicitly configured in config file. If blank, use a
	// random port on ListenHost.
	ControllerAddr string

	NoWorkbench1         bool
	NoWorkbench2         bool
	OwnTemporaryDatabase bool
	Stdin                io.Reader
	Stderr               io.Writer
	// contains filtered or unexported fields

func (*Supervisor) AnonymousClients

func (super *Supervisor) AnonymousClients(clusterID string) (context.Context, *arvados.Client, *keepclient.KeepClient)

AnonymousClients returns Context, arvados.Client and keepclient structs initialized to communicate with the cluster as the anonymous user.

func (*Supervisor) ClientsWithToken

func (super *Supervisor) ClientsWithToken(clusterID, token string) (context.Context, *arvados.Client, *keepclient.KeepClient)

ClientsWithToken returns Context, Arvados.Client and keepclient structs initialized to connect to the cluster with the supplied Arvados token.

func (*Supervisor) Cluster

func (super *Supervisor) Cluster(id string) *arvados.Cluster

func (*Supervisor) Clusters

func (super *Supervisor) Clusters() map[string]*arvados.Cluster

func (*Supervisor) Conn

func (super *Supervisor) Conn(clusterID string) *rpc.Conn

Conn gets rpc connection struct initialized to communicate with the specified cluster.

func (*Supervisor) RootClients

func (super *Supervisor) RootClients(clusterID string) (context.Context, *arvados.Client, *keepclient.KeepClient)

RootClients returns Context, arvados.Client and keepclient structs initialized to communicate with the cluster as the system root user.

func (*Supervisor) RunProgram

func (super *Supervisor) RunProgram(ctx context.Context, dir string, opts runOptions, prog string, args ...string) error

RunProgram runs prog with args, using dir as working directory. If ctx is cancelled while the child is running, RunProgram terminates the child, waits for it to exit, then returns.

Child's environment will have our env vars, plus any given in env.

Child's stdout will be written to output if non-nil, otherwise the boot command's stderr.

func (*Supervisor) Start

func (super *Supervisor) Start(ctx context.Context)

func (*Supervisor) Stop

func (super *Supervisor) Stop()

Stop shuts down all child processes and goroutines, and returns when all of them have exited.

func (*Supervisor) UserClients

func (super *Supervisor) UserClients(clusterID string, rootctx context.Context, c *check.C, conn *rpc.Conn, authEmail string, activate bool) (context.Context, *arvados.Client, *keepclient.KeepClient, arvados.User)

UserClients logs in as a user called "example", get the user's API token, initialize clients with the API token, set up the user and optionally activate the user. Return client structs for communicating with the cluster on behalf of the 'example' user.

func (*Supervisor) Wait

func (super *Supervisor) Wait() error

Wait returns when all child processes and goroutines have exited.

func (*Supervisor) WaitReady

func (super *Supervisor) WaitReady() bool

WaitReady waits for the cluster(s) to be ready to handle requests, then returns true. If startup fails, it returns false.

Jump to

Keyboard shortcuts

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