Documentation
¶
Overview ¶
Copyright 2023 The Chromium Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
Copyright 2023 The Chromium Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var StartServodCmd = &subcommands.Command{ UsageLine: "start -host <hostname> [options ...]", ShortDesc: "starts servod container", LongDesc: "Starts servod container", CommandRun: func() subcommands.CommandRun { c := &startServodRun{} c.Flags.StringVar(&c.host, "host", "", "Hostname of DUT") c.Flags.StringVar(&c.board, "board", "", "Board of DUT") c.Flags.StringVar(&c.model, "model", "", "Model of DUT") c.Flags.StringVar(&c.servoSerial, "servo-serial", "", "Servo Serial of DUT") c.Flags.StringVar(&c.servodContainerName, "servod-container-name", "", "Container name to run servod in; likely <host>-docker_servod") c.Flags.StringVar(&c.subrailConfig, "subrail-config", "", "power subrail config file") c.Flags.BoolVar(&c.noServodProcess, "no-servod", false, "Start container without the servod process running") c.Flags.StringVar(&c.servoSetup, "servo-setup", "", "Servo setup of DUT; Should not have 'SERVO_SETUP' prefix (ex. use 'dual_v4' rather than 'SERVO_SETUP_DUAL_V4'") c.Flags.BoolVar(&c.useRecMode, "rec-mode", false, "Start servod with REC_MODE=1 which allowed to sart servod without CCD/OCD.") c.Flags.StringVar(&c.dockerTag, "docker-tag", "", "Specify custom servod tag when start container. Default read from SERVOD_CONTAINER_LABEL env or use 'release'.") c.authFlags.Register(&c.Flags, site.DefaultAuthOptions) c.envFlags.Register(&c.Flags) c.commonFlags.Register(&c.Flags) return c }, }
StartServodCmd is the command that will start a servod container
View Source
var StopServodCmd = &subcommands.Command{ UsageLine: "stop -host <hostname> [options ...]", ShortDesc: "starts servod container", LongDesc: "Starts servod container", CommandRun: func() subcommands.CommandRun { c := &stopServodRun{} c.commonFlags.Register(&c.Flags) c.envFlags.Register(&c.Flags) c.authFlags.Register(&c.Flags, site.DefaultAuthOptions) c.Flags.StringVar(&c.host, "host", "", "Hostname of DUT") c.Flags.StringVar(&c.servodContainerName, "servod-container-name", "", "Optional: name of servod container; will be fetched from UFS if not provided") return c }, }
StartServodCmd is the command that will start a servod container
Functions ¶
This section is empty.
Types ¶
type DockerClient ¶
type DockerClient interface { Start(ctx context.Context, containerName string, req *docker.ContainerArgs, timeout time.Duration) (*docker.StartResponse, error) IsUp(ctx context.Context, containerName string) (bool, error) Remove(ctx context.Context, containerName string, force bool) error }
DockerClient is an interface fulfilled by the recovery docker lib Used here to facilitate testing
type ServodContainerOptions ¶
type ServodContainerOptions struct {
// contains filtered or unexported fields
}
func (*ServodContainerOptions) Validate ¶
func (opts *ServodContainerOptions) Validate() error
Click to show internal directories.
Click to hide internal directories.