tls

package
Version: v0.0.0-...-e5b054a Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause Imports: 10 Imported by: 7

Documentation

Index

Examples

Constants

This section is empty.

Variables

View Source
var FakeOmaha_Payload_Type_name = map[int32]string{
	0: "TYPE_UNSPECIFIED",
	1: "FULL",
	2: "DELTA",
}
View Source
var FakeOmaha_Payload_Type_value = map[string]int32{
	"TYPE_UNSPECIFIED": 0,
	"FULL":             1,
	"DELTA":            2,
}
View Source
var License_Type_name = map[int32]string{
	0: "TYPE_UNSPECIFIED",
	1: "WINDOWS_10_PRO",
	2: "MS_OFFICE_STANDARD",
}
View Source
var License_Type_value = map[string]int32{
	"TYPE_UNSPECIFIED":   0,
	"WINDOWS_10_PRO":     1,
	"MS_OFFICE_STANDARD": 2,
}
View Source
var Output_name = map[int32]string{
	0: "OUTPUT_PIPE",
	1: "OUTPUT_STDOUT",
}
View Source
var Output_value = map[string]int32{
	"OUTPUT_PIPE":   0,
	"OUTPUT_STDOUT": 1,
}
View Source
var ProvisionAshResponse_Reason_name = map[int32]string{
	0: "REASON_INVALID_REQUEST",
	1: "REASON_DUT_UNREACHABLE_PRE_PROVISION",
	2: "REASON_DOWNLOADING_BUNDLE_FAILED",
	3: "REASON_PROVISIONING_TIMEDOUT",
	4: "REASON_PROVISIONING_FAILED",
}
View Source
var ProvisionAshResponse_Reason_value = map[string]int32{
	"REASON_INVALID_REQUEST":               0,
	"REASON_DUT_UNREACHABLE_PRE_PROVISION": 1,
	"REASON_DOWNLOADING_BUNDLE_FAILED":     2,
	"REASON_PROVISIONING_TIMEDOUT":         3,
	"REASON_PROVISIONING_FAILED":           4,
}
View Source
var ProvisionDutResponse_Reason_name = map[int32]string{
	0: "REASON_INVALID_REQUEST",
	1: "REASON_DUT_UNREACHABLE_PRE_PROVISION",
	2: "REASON_DOWNLOADING_IMAGE_FAILED",
	3: "REASON_PROVISIONING_TIMEDOUT",
	4: "REASON_PROVISIONING_FAILED",
	5: "REASON_DUT_UNREACHABLE_POST_PROVISION",
	6: "REASON_UPDATE_FIRMWARE_FAILED",
	7: "REASON_FIRMWARE_MISMATCH_POST_FIRMWARE_UPDATE",
	8: "REASON_DUT_UNREACHABLE_POST_FIRMWARE_UPDATE",
}
View Source
var ProvisionDutResponse_Reason_value = map[string]int32{
	"REASON_INVALID_REQUEST":                        0,
	"REASON_DUT_UNREACHABLE_PRE_PROVISION":          1,
	"REASON_DOWNLOADING_IMAGE_FAILED":               2,
	"REASON_PROVISIONING_TIMEDOUT":                  3,
	"REASON_PROVISIONING_FAILED":                    4,
	"REASON_DUT_UNREACHABLE_POST_PROVISION":         5,
	"REASON_UPDATE_FIRMWARE_FAILED":                 6,
	"REASON_FIRMWARE_MISMATCH_POST_FIRMWARE_UPDATE": 7,
	"REASON_DUT_UNREACHABLE_POST_FIRMWARE_UPDATE":   8,
}
View Source
var ProvisionLacrosResponse_Reason_name = map[int32]string{
	0: "REASON_INVALID_REQUEST",
	1: "REASON_DUT_UNREACHABLE_PRE_PROVISION",
	2: "REASON_DOWNLOADING_IMAGE_FAILED",
	3: "REASON_PROVISIONING_TIMEDOUT",
	4: "REASON_PROVISIONING_FAILED",
}
View Source
var ProvisionLacrosResponse_Reason_value = map[string]int32{
	"REASON_INVALID_REQUEST":               0,
	"REASON_DUT_UNREACHABLE_PRE_PROVISION": 1,
	"REASON_DOWNLOADING_IMAGE_FAILED":      2,
	"REASON_PROVISIONING_TIMEDOUT":         3,
	"REASON_PROVISIONING_FAILED":           4,
}
View Source
var SetDutPowerSupplyRequest_State_name = map[int32]string{
	0: "STATE_UNKNOWN",
	1: "STATE_ON",
	2: "STATE_OFF",
}
View Source
var SetDutPowerSupplyRequest_State_value = map[string]int32{
	"STATE_UNKNOWN": 0,
	"STATE_ON":      1,
	"STATE_OFF":     2,
}
View Source
var SetDutPowerSupplyResponse_Status_name = map[int32]string{
	0: "STATUS_UNKNOWN",
	1: "STATUS_OK",
	2: "STATUS_BAD_DUT",
	3: "STATUS_BAD_REQUEST",
	4: "STATUS_NO_RPM",
	5: "STATUS_RPM_ERROR",
}
View Source
var SetDutPowerSupplyResponse_Status_value = map[string]int32{
	"STATUS_UNKNOWN":     0,
	"STATUS_OK":          1,
	"STATUS_BAD_DUT":     2,
	"STATUS_BAD_REQUEST": 3,
	"STATUS_NO_RPM":      4,
	"STATUS_RPM_ERROR":   5,
}

Functions

func RegisterCommonServer

func RegisterCommonServer(s *grpc.Server, srv CommonServer)

func RegisterWiringServer

func RegisterWiringServer(s *grpc.Server, srv WiringServer)

Types

type CacheForDutMetadata

type CacheForDutMetadata struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CacheForDutMetadata) Descriptor

func (*CacheForDutMetadata) Descriptor() ([]byte, []int)

func (*CacheForDutMetadata) ProtoMessage

func (*CacheForDutMetadata) ProtoMessage()

func (*CacheForDutMetadata) Reset

func (m *CacheForDutMetadata) Reset()

func (*CacheForDutMetadata) String

func (m *CacheForDutMetadata) String() string

func (*CacheForDutMetadata) XXX_DiscardUnknown

func (m *CacheForDutMetadata) XXX_DiscardUnknown()

func (*CacheForDutMetadata) XXX_Marshal

func (m *CacheForDutMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CacheForDutMetadata) XXX_Merge

func (m *CacheForDutMetadata) XXX_Merge(src proto.Message)

func (*CacheForDutMetadata) XXX_Size

func (m *CacheForDutMetadata) XXX_Size() int

func (*CacheForDutMetadata) XXX_Unmarshal

func (m *CacheForDutMetadata) XXX_Unmarshal(b []byte) error

type CacheForDutRequest

type CacheForDutRequest struct {
	// url identifies the resource to cache.
	// Only http, https, and gs schemes are supported. The resource to cache MUST
	// be accessible from the service. The implementation MAY use
	// implementation-specific credentials to attempt to access resources.
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	// dut_name is the resource name for the DUT.
	// The DUT name is passed to the RTD when the RTD is started.
	// It is not specified whether the name is the DUT hostname.
	// (-- aip.dev/not-precedent: This preceded the AIP standards.
	//     Ordinarily, this field should be either `name` or `dut`,
	//     depending on whether this is a method on Dut resources. --)
	DutName              string   `protobuf:"bytes,2,opt,name=dut_name,json=dutName,proto3" json:"dut_name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}
Example
package main

import (
	"context"
	"fmt"

	"github.com/golang/protobuf/ptypes"
	"github.com/golang/protobuf/ptypes/duration"
	rtd "go.chromium.org/chromiumos/config/go/api/test/rtd/v1"
	"go.chromium.org/chromiumos/config/go/api/test/tls"
	"go.chromium.org/chromiumos/config/go/api/test/tls/dependencies/longrunning"
	"google.golang.org/grpc"
)

func main() {
	var invocation rtd.Invocation

	tlsConfig := invocation.GetTestLabServicesConfig()
	dutName := invocation.GetDuts()[0].GetTlsDutName()
	gsURL := "gs://my-bucket/path/to/file"

	conn, err := grpc.Dial(fmt.Sprintf("%s:%d", tlsConfig.GetTlwAddress(), tlsConfig.GetTlwPort()))
	if err != nil {
		panic(err)
	}
	defer conn.Close()

	c := tls.NewWiringClient(conn)
	opcli := longrunning.NewOperationsClient(conn)
	ctx := context.Background()

	req := tls.CacheForDutRequest{
		Url:     gsURL,
		DutName: dutName,
	}
	op, err := c.CacheForDut(ctx, &req)
	if err != nil {
		panic("RPC error")
	}

	op, err = opcli.WaitOperation(ctx, &longrunning.WaitOperationRequest{
		Name: op.GetName(),
		Timeout: &duration.Duration{
			Seconds: 300,
		},
	})
	if err != nil {
		panic("RPC error")
	}

	if errStatus := op.GetError(); errStatus != nil {
		panic("Operation error")
	}
	resp := &tls.CacheForDutResponse{}
	if err := ptypes.UnmarshalAny(op.GetResponse(), resp); err != nil {
		panic("Unmarshal response error")
	}
	// Handle the response in various ways.
	_ = resp
}
Output:

func (*CacheForDutRequest) Descriptor

func (*CacheForDutRequest) Descriptor() ([]byte, []int)

func (*CacheForDutRequest) GetDutName

func (m *CacheForDutRequest) GetDutName() string

func (*CacheForDutRequest) GetUrl

func (m *CacheForDutRequest) GetUrl() string

func (*CacheForDutRequest) ProtoMessage

func (*CacheForDutRequest) ProtoMessage()

func (*CacheForDutRequest) Reset

func (m *CacheForDutRequest) Reset()

func (*CacheForDutRequest) String

func (m *CacheForDutRequest) String() string

func (*CacheForDutRequest) XXX_DiscardUnknown

func (m *CacheForDutRequest) XXX_DiscardUnknown()

func (*CacheForDutRequest) XXX_Marshal

func (m *CacheForDutRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CacheForDutRequest) XXX_Merge

func (m *CacheForDutRequest) XXX_Merge(src proto.Message)

func (*CacheForDutRequest) XXX_Size

func (m *CacheForDutRequest) XXX_Size() int

func (*CacheForDutRequest) XXX_Unmarshal

func (m *CacheForDutRequest) XXX_Unmarshal(b []byte) error

type CacheForDutResponse

type CacheForDutResponse struct {
	// url is where the resource is cached at.
	// This MUST be accessible to the DUT.
	// If the host part of the url is a name, it MUST be resolvable by the DUT
	// via standard name resolution facilities.
	Url                  string   `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CacheForDutResponse) Descriptor

func (*CacheForDutResponse) Descriptor() ([]byte, []int)

func (*CacheForDutResponse) GetUrl

func (m *CacheForDutResponse) GetUrl() string

func (*CacheForDutResponse) ProtoMessage

func (*CacheForDutResponse) ProtoMessage()

func (*CacheForDutResponse) Reset

func (m *CacheForDutResponse) Reset()

func (*CacheForDutResponse) String

func (m *CacheForDutResponse) String() string

func (*CacheForDutResponse) XXX_DiscardUnknown

func (m *CacheForDutResponse) XXX_DiscardUnknown()

func (*CacheForDutResponse) XXX_Marshal

func (m *CacheForDutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CacheForDutResponse) XXX_Merge

func (m *CacheForDutResponse) XXX_Merge(src proto.Message)

func (*CacheForDutResponse) XXX_Size

func (m *CacheForDutResponse) XXX_Size() int

func (*CacheForDutResponse) XXX_Unmarshal

func (m *CacheForDutResponse) XXX_Unmarshal(b []byte) error

type CallServoRequest

type CallServoRequest struct {
	Dut                  string          `protobuf:"bytes,1,opt,name=dut,proto3" json:"dut,omitempty"`
	Method               string          `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"`
	Args                 []*xmlrpc.Value `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*CallServoRequest) Descriptor

func (*CallServoRequest) Descriptor() ([]byte, []int)

func (*CallServoRequest) GetArgs

func (m *CallServoRequest) GetArgs() []*xmlrpc.Value

func (*CallServoRequest) GetDut

func (m *CallServoRequest) GetDut() string

func (*CallServoRequest) GetMethod

func (m *CallServoRequest) GetMethod() string

func (*CallServoRequest) ProtoMessage

func (*CallServoRequest) ProtoMessage()

func (*CallServoRequest) Reset

func (m *CallServoRequest) Reset()

func (*CallServoRequest) String

func (m *CallServoRequest) String() string

func (*CallServoRequest) XXX_DiscardUnknown

func (m *CallServoRequest) XXX_DiscardUnknown()

func (*CallServoRequest) XXX_Marshal

func (m *CallServoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CallServoRequest) XXX_Merge

func (m *CallServoRequest) XXX_Merge(src proto.Message)

func (*CallServoRequest) XXX_Size

func (m *CallServoRequest) XXX_Size() int

func (*CallServoRequest) XXX_Unmarshal

func (m *CallServoRequest) XXX_Unmarshal(b []byte) error

type CallServoResponse

type CallServoResponse struct {
	Value *xmlrpc.Value `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// fault indicates that the servo XML-RPC returned a fault.
	// The fault value is stored in the value field.
	Fault                bool     `protobuf:"varint,2,opt,name=fault,proto3" json:"fault,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CallServoResponse) Descriptor

func (*CallServoResponse) Descriptor() ([]byte, []int)

func (*CallServoResponse) GetFault

func (m *CallServoResponse) GetFault() bool

func (*CallServoResponse) GetValue

func (m *CallServoResponse) GetValue() *xmlrpc.Value

func (*CallServoResponse) ProtoMessage

func (*CallServoResponse) ProtoMessage()

func (*CallServoResponse) Reset

func (m *CallServoResponse) Reset()

func (*CallServoResponse) String

func (m *CallServoResponse) String() string

func (*CallServoResponse) XXX_DiscardUnknown

func (m *CallServoResponse) XXX_DiscardUnknown()

func (*CallServoResponse) XXX_Marshal

func (m *CallServoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CallServoResponse) XXX_Merge

func (m *CallServoResponse) XXX_Merge(src proto.Message)

func (*CallServoResponse) XXX_Size

func (m *CallServoResponse) XXX_Size() int

func (*CallServoResponse) XXX_Unmarshal

func (m *CallServoResponse) XXX_Unmarshal(b []byte) error

type ChromeOsImage

type ChromeOsImage struct {
	// Types that are valid to be assigned to PathOneof:
	//	*ChromeOsImage_GsPathPrefix
	PathOneof            isChromeOsImage_PathOneof `protobuf_oneof:"path_oneof"`
	XXX_NoUnkeyedLiteral struct{}                  `json:"-"`
	XXX_unrecognized     []byte                    `json:"-"`
	XXX_sizecache        int32                     `json:"-"`
}

func (*ChromeOsImage) Descriptor

func (*ChromeOsImage) Descriptor() ([]byte, []int)

func (*ChromeOsImage) GetGsPathPrefix

func (m *ChromeOsImage) GetGsPathPrefix() string

func (*ChromeOsImage) GetPathOneof

func (m *ChromeOsImage) GetPathOneof() isChromeOsImage_PathOneof

func (*ChromeOsImage) ProtoMessage

func (*ChromeOsImage) ProtoMessage()

func (*ChromeOsImage) Reset

func (m *ChromeOsImage) Reset()

func (*ChromeOsImage) String

func (m *ChromeOsImage) String() string

func (*ChromeOsImage) XXX_DiscardUnknown

func (m *ChromeOsImage) XXX_DiscardUnknown()

func (*ChromeOsImage) XXX_Marshal

func (m *ChromeOsImage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ChromeOsImage) XXX_Merge

func (m *ChromeOsImage) XXX_Merge(src proto.Message)

func (*ChromeOsImage) XXX_OneofWrappers

func (*ChromeOsImage) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*ChromeOsImage) XXX_Size

func (m *ChromeOsImage) XXX_Size() int

func (*ChromeOsImage) XXX_Unmarshal

func (m *ChromeOsImage) XXX_Unmarshal(b []byte) error

type ChromeOsImage_GsPathPrefix

type ChromeOsImage_GsPathPrefix struct {
	GsPathPrefix string `protobuf:"bytes,1,opt,name=gs_path_prefix,json=gsPathPrefix,proto3,oneof"`
}

type CommonClient

type CommonClient interface {
	// ExecDutCommand runs a command on a DUT.
	//
	// The working directory is /.
	// A tty is not spawned for the command.
	// The user and group is root.
	// All signals have their default dispositions and are not masked.
	// The umask is set to 0.
	//
	// The environment contains:
	//
	//   TERM=dumb
	//   PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin
	//   LANG=en_US.UTF-8
	//   USER=root
	//   HOME=/root
	//
	// The environment MAY also contain SSH client variables.
	// The environment SHALL NOT contain variables not mentioned above.
	//
	// If the stream is interrupted, the implementation MAY attempt to
	// stop the command by sending SIGINT, SIGHUP, SIGTERM, or SIGKILL.
	ExecDutCommand(ctx context.Context, in *ExecDutCommandRequest, opts ...grpc.CallOption) (Common_ExecDutCommandClient, error)
	// ProvisionDut installs a specified version of Chrome OS on the DUT, along
	// with any specified DLCs.
	//
	// If the DUT is already on the specified version of Chrome OS, the OS will
	// not be provisioned.
	//
	// If the DUT already has the specified list of DLCs, only the missing DLCs
	// will be provisioned.
	ProvisionDut(ctx context.Context, in *ProvisionDutRequest, opts ...grpc.CallOption) (*longrunning.Operation, error)
	// ProvisionLacros installs a specified version of Lacros on the DUT.
	//
	// If the DUT already has the specified version of Lacros, Lacros will not be
	// provisioned.
	ProvisionLacros(ctx context.Context, in *ProvisionLacrosRequest, opts ...grpc.CallOption) (*longrunning.Operation, error)
	// ProvisionAsh installs a specific version of AshChrome on the DUT.
	//
	ProvisionAsh(ctx context.Context, in *ProvisionAshRequest, opts ...grpc.CallOption) (*longrunning.Operation, error)
	// FetchCrashes gets a stream of all crash reports currently on the DUT.
	//
	// The stream returned may split up a crash over multiple
	// `FetchCrashesResponse` protos. See the definition of that proto for
	// details.
	//
	// This call is read-only: it doesn't delete the crashes that it reads.
	FetchCrashes(ctx context.Context, in *FetchCrashesRequest, opts ...grpc.CallOption) (Common_FetchCrashesClient, error)
	// CreateFakeOmaha starts a fake Omaha service on TLS and exposes the
	// listened port to the DUT.
	CreateFakeOmaha(ctx context.Context, in *CreateFakeOmahaRequest, opts ...grpc.CallOption) (*FakeOmaha, error)
	// DeleteFakeOmaha deletes the specified fake Omaha resource created by
	// CreateFakeOmaha.
	DeleteFakeOmaha(ctx context.Context, in *DeleteFakeOmahaRequest, opts ...grpc.CallOption) (*empty.Empty, error)
}

CommonClient is the client API for Common service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewCommonClient

func NewCommonClient(cc *grpc.ClientConn) CommonClient

type CommonServer

type CommonServer interface {
	// ExecDutCommand runs a command on a DUT.
	//
	// The working directory is /.
	// A tty is not spawned for the command.
	// The user and group is root.
	// All signals have their default dispositions and are not masked.
	// The umask is set to 0.
	//
	// The environment contains:
	//
	//   TERM=dumb
	//   PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin
	//   LANG=en_US.UTF-8
	//   USER=root
	//   HOME=/root
	//
	// The environment MAY also contain SSH client variables.
	// The environment SHALL NOT contain variables not mentioned above.
	//
	// If the stream is interrupted, the implementation MAY attempt to
	// stop the command by sending SIGINT, SIGHUP, SIGTERM, or SIGKILL.
	ExecDutCommand(*ExecDutCommandRequest, Common_ExecDutCommandServer) error
	// ProvisionDut installs a specified version of Chrome OS on the DUT, along
	// with any specified DLCs.
	//
	// If the DUT is already on the specified version of Chrome OS, the OS will
	// not be provisioned.
	//
	// If the DUT already has the specified list of DLCs, only the missing DLCs
	// will be provisioned.
	ProvisionDut(context.Context, *ProvisionDutRequest) (*longrunning.Operation, error)
	// ProvisionLacros installs a specified version of Lacros on the DUT.
	//
	// If the DUT already has the specified version of Lacros, Lacros will not be
	// provisioned.
	ProvisionLacros(context.Context, *ProvisionLacrosRequest) (*longrunning.Operation, error)
	// ProvisionAsh installs a specific version of AshChrome on the DUT.
	//
	ProvisionAsh(context.Context, *ProvisionAshRequest) (*longrunning.Operation, error)
	// FetchCrashes gets a stream of all crash reports currently on the DUT.
	//
	// The stream returned may split up a crash over multiple
	// `FetchCrashesResponse` protos. See the definition of that proto for
	// details.
	//
	// This call is read-only: it doesn't delete the crashes that it reads.
	FetchCrashes(*FetchCrashesRequest, Common_FetchCrashesServer) error
	// CreateFakeOmaha starts a fake Omaha service on TLS and exposes the
	// listened port to the DUT.
	CreateFakeOmaha(context.Context, *CreateFakeOmahaRequest) (*FakeOmaha, error)
	// DeleteFakeOmaha deletes the specified fake Omaha resource created by
	// CreateFakeOmaha.
	DeleteFakeOmaha(context.Context, *DeleteFakeOmahaRequest) (*empty.Empty, error)
}

CommonServer is the server API for Common service.

type Common_ExecDutCommandClient

type Common_ExecDutCommandClient interface {
	Recv() (*ExecDutCommandResponse, error)
	grpc.ClientStream
}

type Common_ExecDutCommandServer

type Common_ExecDutCommandServer interface {
	Send(*ExecDutCommandResponse) error
	grpc.ServerStream
}

type Common_FetchCrashesClient

type Common_FetchCrashesClient interface {
	Recv() (*FetchCrashesResponse, error)
	grpc.ClientStream
}

type Common_FetchCrashesServer

type Common_FetchCrashesServer interface {
	Send(*FetchCrashesResponse) error
	grpc.ServerStream
}

type CrashBlob

type CrashBlob struct {
	// This value is a UTF8, human-readable, description of the data.
	// This should be passed as the 'name' to the crash server.
	// For instance, upload_file_fake_payload
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// The value is a blob (e.g. a file from sysfs or a minidump), which need
	// not be valid UTF-8, and may be large.
	Blob []byte `protobuf:"bytes,2,opt,name=blob,proto3" json:"blob,omitempty"`
	// The basename of the file. Must be specified as the filename in data
	// uploaded to the crash server.
	// e.g. foo_binary.20201027.102345.0.dmp
	Filename             string   `protobuf:"bytes,3,opt,name=filename,proto3" json:"filename,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Arbitrary non-UTF8 key-value pair from crash report metadata files.

func (*CrashBlob) Descriptor

func (*CrashBlob) Descriptor() ([]byte, []int)

func (*CrashBlob) GetBlob

func (m *CrashBlob) GetBlob() []byte

func (*CrashBlob) GetFilename

func (m *CrashBlob) GetFilename() string

func (*CrashBlob) GetKey

func (m *CrashBlob) GetKey() string

func (*CrashBlob) ProtoMessage

func (*CrashBlob) ProtoMessage()

func (*CrashBlob) Reset

func (m *CrashBlob) Reset()

func (*CrashBlob) String

func (m *CrashBlob) String() string

func (*CrashBlob) XXX_DiscardUnknown

func (m *CrashBlob) XXX_DiscardUnknown()

func (*CrashBlob) XXX_Marshal

func (m *CrashBlob) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CrashBlob) XXX_Merge

func (m *CrashBlob) XXX_Merge(src proto.Message)

func (*CrashBlob) XXX_Size

func (m *CrashBlob) XXX_Size() int

func (*CrashBlob) XXX_Unmarshal

func (m *CrashBlob) XXX_Unmarshal(b []byte) error

type CrashInfo

type CrashInfo struct {
	// Name of executable that crashed (e.g. "chrome")
	ExecName string `protobuf:"bytes,1,opt,name=exec_name,json=execName,proto3" json:"exec_name,omitempty"`
	// Product name (e.g. "Chrome_ChromeOS" or "ChromeOS")
	Prod string `protobuf:"bytes,2,opt,name=prod,proto3" json:"prod,omitempty"`
	// Product version (e.g. "12345.0.0")
	Ver string `protobuf:"bytes,3,opt,name=ver,proto3" json:"ver,omitempty"`
	// Crash signature (may not be populated for all crashes)
	Sig string `protobuf:"bytes,4,opt,name=sig,proto3" json:"sig,omitempty"`
	// The name of the integration test that was running when this crash
	// happened, if any.
	InProgressIntegrationTest string `` /* 140-byte string literal not displayed */
	// The name of the collector (e.g. chrome_collector, arc_collector)
	Collector string `protobuf:"bytes,6,opt,name=collector,proto3" json:"collector,omitempty"`
	// Additional key-value pairs of metadata (e.g. "crash_loop_mode = true").
	// These should be included in any POSTs to the crash server in a standard
	// POST form, as seen in CreateCrashFormData.
	// (despite the fact that this message is a subfield, it should be a flat
	// structure in any POSTs).
	Fields               []*CrashMetadata `protobuf:"bytes,7,rep,name=fields,proto3" json:"fields,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

The data in this proto matches the metadata from crash-reporter's meta files. Sender::CreateCrashFormData puts this data into crash upload POST requests. (See src/platform2/crash-reporter/crash_sender_util.cc.) The names in this proto MUST match the names that crash-reporter uses so that, when crashes are uploaded to the crash server, they are interpreted as they are when crash-reporter uploads them. Similarly, when this proto is converted into a POST request to send to the crash server, the names must not be altered.

func (*CrashInfo) Descriptor

func (*CrashInfo) Descriptor() ([]byte, []int)

func (*CrashInfo) GetCollector

func (m *CrashInfo) GetCollector() string

func (*CrashInfo) GetExecName

func (m *CrashInfo) GetExecName() string

func (*CrashInfo) GetFields

func (m *CrashInfo) GetFields() []*CrashMetadata

func (*CrashInfo) GetInProgressIntegrationTest

func (m *CrashInfo) GetInProgressIntegrationTest() string

func (*CrashInfo) GetProd

func (m *CrashInfo) GetProd() string

func (*CrashInfo) GetSig

func (m *CrashInfo) GetSig() string

func (*CrashInfo) GetVer

func (m *CrashInfo) GetVer() string

func (*CrashInfo) ProtoMessage

func (*CrashInfo) ProtoMessage()

func (*CrashInfo) Reset

func (m *CrashInfo) Reset()

func (*CrashInfo) String

func (m *CrashInfo) String() string

func (*CrashInfo) XXX_DiscardUnknown

func (m *CrashInfo) XXX_DiscardUnknown()

func (*CrashInfo) XXX_Marshal

func (m *CrashInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CrashInfo) XXX_Merge

func (m *CrashInfo) XXX_Merge(src proto.Message)

func (*CrashInfo) XXX_Size

func (m *CrashInfo) XXX_Size() int

func (*CrashInfo) XXX_Unmarshal

func (m *CrashInfo) XXX_Unmarshal(b []byte) error

type CrashMetadata

type CrashMetadata struct {
	// This value is a UTF8, human-readable, description of the data.
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// The value will be a human-readable string (e.g. "12345.0.0"), which must
	// be valid UTF-8.
	Text                 string   `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Arbitrary text-only key-value pair corresponding to the key-value pairs in crash report metadata files.

func (*CrashMetadata) Descriptor

func (*CrashMetadata) Descriptor() ([]byte, []int)

func (*CrashMetadata) GetKey

func (m *CrashMetadata) GetKey() string

func (*CrashMetadata) GetText

func (m *CrashMetadata) GetText() string

func (*CrashMetadata) ProtoMessage

func (*CrashMetadata) ProtoMessage()

func (*CrashMetadata) Reset

func (m *CrashMetadata) Reset()

func (*CrashMetadata) String

func (m *CrashMetadata) String() string

func (*CrashMetadata) XXX_DiscardUnknown

func (m *CrashMetadata) XXX_DiscardUnknown()

func (*CrashMetadata) XXX_Marshal

func (m *CrashMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CrashMetadata) XXX_Merge

func (m *CrashMetadata) XXX_Merge(src proto.Message)

func (*CrashMetadata) XXX_Size

func (m *CrashMetadata) XXX_Size() int

func (*CrashMetadata) XXX_Unmarshal

func (m *CrashMetadata) XXX_Unmarshal(b []byte) error

type CreateFakeOmahaRequest

type CreateFakeOmahaRequest struct {
	// fake_omaha is the fake omaha service to be created.
	FakeOmaha            *FakeOmaha `protobuf:"bytes,1,opt,name=fake_omaha,json=fakeOmaha,proto3" json:"fake_omaha,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}
Example
package main

import (
	"context"
	"fmt"

	rtd "go.chromium.org/chromiumos/config/go/api/test/rtd/v1"
	"go.chromium.org/chromiumos/config/go/api/test/tls"
	"google.golang.org/grpc"
)

func main() {
	var invocation rtd.Invocation

	tlsConfig := invocation.GetTestLabServicesConfig()
	dutName := invocation.GetDuts()[0].GetTlsDutName()

	conn, err := grpc.Dial(fmt.Sprintf("%s:%d", tlsConfig.GetTlsAddress(), tlsConfig.GetTlsPort()), grpc.WithInsecure())
	if err != nil {
		panic(err)
	}
	defer conn.Close()

	c := tls.NewCommonClient(conn)

	req := tls.CreateFakeOmahaRequest{
		FakeOmaha: &tls.FakeOmaha{
			Dut: dutName,
			TargetBuild: &tls.ChromeOsImage{
				PathOneof: &tls.ChromeOsImage_GsPathPrefix{
					GsPathPrefix: "gs://chromeos-image-archive/eve-release/R87-13457.0.0",
				},
			},
			Payloads: []*tls.FakeOmaha_Payload{
				&tls.FakeOmaha_Payload{
					Id:   "ROOTFS",
					Type: tls.FakeOmaha_Payload_FULL,
				},
			},
		},
	}

	ctx := context.Background()
	omaha, err := c.CreateFakeOmaha(ctx, &req)
	if err != nil {
		panic("RPC CreateFakeOmaha error")
	}
	defer c.DeleteFakeOmaha(ctx, &tls.DeleteFakeOmahaRequest{Name: omaha.GetName()})

	result, err := c.ExecDutCommand(ctx, &tls.ExecDutCommandRequest{
		Name:    dutName,
		Command: "update_engine_client",
		Args:    []string{"--update_url", omaha.GetOmahaUrl(), "--update"},
	})
	if err != nil {
		panic("RPC ExecDutCommand error")
	}

	// Check the return code of ExecDutCommand.
	_ = result
}
Output:

func (*CreateFakeOmahaRequest) Descriptor

func (*CreateFakeOmahaRequest) Descriptor() ([]byte, []int)

func (*CreateFakeOmahaRequest) GetFakeOmaha

func (m *CreateFakeOmahaRequest) GetFakeOmaha() *FakeOmaha

func (*CreateFakeOmahaRequest) ProtoMessage

func (*CreateFakeOmahaRequest) ProtoMessage()

func (*CreateFakeOmahaRequest) Reset

func (m *CreateFakeOmahaRequest) Reset()

func (*CreateFakeOmahaRequest) String

func (m *CreateFakeOmahaRequest) String() string

func (*CreateFakeOmahaRequest) XXX_DiscardUnknown

func (m *CreateFakeOmahaRequest) XXX_DiscardUnknown()

func (*CreateFakeOmahaRequest) XXX_Marshal

func (m *CreateFakeOmahaRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CreateFakeOmahaRequest) XXX_Merge

func (m *CreateFakeOmahaRequest) XXX_Merge(src proto.Message)

func (*CreateFakeOmahaRequest) XXX_Size

func (m *CreateFakeOmahaRequest) XXX_Size() int

func (*CreateFakeOmahaRequest) XXX_Unmarshal

func (m *CreateFakeOmahaRequest) XXX_Unmarshal(b []byte) error

type DeleteFakeOmahaRequest

type DeleteFakeOmahaRequest struct {
	// The resource name of the fake Omaha service to stop.
	// Format: fakeOmahaServices/{fake-omaha-id}
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*DeleteFakeOmahaRequest) Descriptor

func (*DeleteFakeOmahaRequest) Descriptor() ([]byte, []int)

func (*DeleteFakeOmahaRequest) GetName

func (m *DeleteFakeOmahaRequest) GetName() string

func (*DeleteFakeOmahaRequest) ProtoMessage

func (*DeleteFakeOmahaRequest) ProtoMessage()

func (*DeleteFakeOmahaRequest) Reset

func (m *DeleteFakeOmahaRequest) Reset()

func (*DeleteFakeOmahaRequest) String

func (m *DeleteFakeOmahaRequest) String() string

func (*DeleteFakeOmahaRequest) XXX_DiscardUnknown

func (m *DeleteFakeOmahaRequest) XXX_DiscardUnknown()

func (*DeleteFakeOmahaRequest) XXX_Marshal

func (m *DeleteFakeOmahaRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DeleteFakeOmahaRequest) XXX_Merge

func (m *DeleteFakeOmahaRequest) XXX_Merge(src proto.Message)

func (*DeleteFakeOmahaRequest) XXX_Size

func (m *DeleteFakeOmahaRequest) XXX_Size() int

func (*DeleteFakeOmahaRequest) XXX_Unmarshal

func (m *DeleteFakeOmahaRequest) XXX_Unmarshal(b []byte) error

type Dut

type Dut struct {
	// name is the resource name for the DUT.
	// The DUT name is passed to the RTD when the RTD is started.
	// It is not specified whether the name is the DUT hostname.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// licenses are the licenses assigned to the DUT, e.g. Windows
	// licenses.
	Licenses             []*License `protobuf:"bytes,2,rep,name=licenses,proto3" json:"licenses,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (*Dut) Descriptor

func (*Dut) Descriptor() ([]byte, []int)

func (*Dut) GetLicenses

func (m *Dut) GetLicenses() []*License

func (*Dut) GetName

func (m *Dut) GetName() string

func (*Dut) ProtoMessage

func (*Dut) ProtoMessage()

func (*Dut) Reset

func (m *Dut) Reset()

func (*Dut) String

func (m *Dut) String() string

func (*Dut) XXX_DiscardUnknown

func (m *Dut) XXX_DiscardUnknown()

func (*Dut) XXX_Marshal

func (m *Dut) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Dut) XXX_Merge

func (m *Dut) XXX_Merge(src proto.Message)

func (*Dut) XXX_Size

func (m *Dut) XXX_Size() int

func (*Dut) XXX_Unmarshal

func (m *Dut) XXX_Unmarshal(b []byte) error

type ExecDutCommandRequest

type ExecDutCommandRequest struct {
	// name is the resource name for the DUT.
	// The DUT name is passed to the RTD when the RTD is started.
	// It is not specified whether the name is the DUT hostname.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// command is the command to run.
	// If this contains no slashes, it is resolved using PATH.
	// If this starts with /, it is used as an absolute path to the
	// program to run.
	// Otherwise, this is treated as a path relative to the working
	// directory.
	Command string `protobuf:"bytes,2,opt,name=command,proto3" json:"command,omitempty"`
	// args are the arguments to pass to the command.
	Args []string `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"`
	// stdin is passed to the command as the program's stdin.
	// The stream does not support seeking.
	// An empty bytes is not treated specially; if the command reads
	// from stdin, it will receive zero bytes.
	Stdin []byte `protobuf:"bytes,4,opt,name=stdin,proto3" json:"stdin,omitempty"`
	// stdout indicates how to handle the command's stdout.
	Stdout Output `protobuf:"varint,5,opt,name=stdout,proto3,enum=chromiumos.config.api.test.tls.Output" json:"stdout,omitempty"`
	// stderr indicates how to handle the command's stderr.
	Stderr               Output   `protobuf:"varint,6,opt,name=stderr,proto3,enum=chromiumos.config.api.test.tls.Output" json:"stderr,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}
Example
package main

import (
	"context"

	"go.chromium.org/chromiumos/config/go/api/test/tls"
	"google.golang.org/grpc"
)

func main() {
	// The RTD will receive this in its invocation spec.
	var (
		addr    string
		dutName string
	)
	conn, err := grpc.Dial(addr)
	if err != nil {
		panic(err)
	}
	defer conn.Close()
	c := tls.NewCommonClient(conn)
	ctx := context.Background()
	req := tls.ExecDutCommandRequest{
		Name:    dutName,
		Command: "echo",
		Args:    []string{"hello world"},
	}
	stream, err := c.ExecDutCommand(ctx, &req)
	if err != nil {
		panic("RPC error")
	}
	// Handle stream in various ways.
	_ = stream
}
Output:

func (*ExecDutCommandRequest) Descriptor

func (*ExecDutCommandRequest) Descriptor() ([]byte, []int)

func (*ExecDutCommandRequest) GetArgs

func (m *ExecDutCommandRequest) GetArgs() []string

func (*ExecDutCommandRequest) GetCommand

func (m *ExecDutCommandRequest) GetCommand() string

func (*ExecDutCommandRequest) GetName

func (m *ExecDutCommandRequest) GetName() string

func (*ExecDutCommandRequest) GetStderr

func (m *ExecDutCommandRequest) GetStderr() Output

func (*ExecDutCommandRequest) GetStdin

func (m *ExecDutCommandRequest) GetStdin() []byte

func (*ExecDutCommandRequest) GetStdout

func (m *ExecDutCommandRequest) GetStdout() Output

func (*ExecDutCommandRequest) ProtoMessage

func (*ExecDutCommandRequest) ProtoMessage()

func (*ExecDutCommandRequest) Reset

func (m *ExecDutCommandRequest) Reset()

func (*ExecDutCommandRequest) String

func (m *ExecDutCommandRequest) String() string

func (*ExecDutCommandRequest) XXX_DiscardUnknown

func (m *ExecDutCommandRequest) XXX_DiscardUnknown()

func (*ExecDutCommandRequest) XXX_Marshal

func (m *ExecDutCommandRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ExecDutCommandRequest) XXX_Merge

func (m *ExecDutCommandRequest) XXX_Merge(src proto.Message)

func (*ExecDutCommandRequest) XXX_Size

func (m *ExecDutCommandRequest) XXX_Size() int

func (*ExecDutCommandRequest) XXX_Unmarshal

func (m *ExecDutCommandRequest) XXX_Unmarshal(b []byte) error

type ExecDutCommandResponse

type ExecDutCommandResponse struct {
	// exit_info contains exit information.
	// This is set when the command has exited or failed to start.
	// This is set on the last message in the response stream.
	ExitInfo *ExecDutCommandResponse_ExitInfo `protobuf:"bytes,1,opt,name=exit_info,json=exitInfo,proto3" json:"exit_info,omitempty"`
	// stdout contains the shell command's stdout output since the last
	// response in the stream.
	// The implementation MAY batch or delay output to later
	// responses in the stream.
	Stdout []byte `protobuf:"bytes,2,opt,name=stdout,proto3" json:"stdout,omitempty"`
	// stderr contains the shell command's stderr output since the last
	// response in the stream.
	// The implementation MAY batch or delay output to later
	// responses in the stream.
	Stderr               []byte   `protobuf:"bytes,3,opt,name=stderr,proto3" json:"stderr,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ExecDutCommandResponse) Descriptor

func (*ExecDutCommandResponse) Descriptor() ([]byte, []int)

func (*ExecDutCommandResponse) GetExitInfo

func (*ExecDutCommandResponse) GetStderr

func (m *ExecDutCommandResponse) GetStderr() []byte

func (*ExecDutCommandResponse) GetStdout

func (m *ExecDutCommandResponse) GetStdout() []byte

func (*ExecDutCommandResponse) ProtoMessage

func (*ExecDutCommandResponse) ProtoMessage()

func (*ExecDutCommandResponse) Reset

func (m *ExecDutCommandResponse) Reset()

func (*ExecDutCommandResponse) String

func (m *ExecDutCommandResponse) String() string

func (*ExecDutCommandResponse) XXX_DiscardUnknown

func (m *ExecDutCommandResponse) XXX_DiscardUnknown()

func (*ExecDutCommandResponse) XXX_Marshal

func (m *ExecDutCommandResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ExecDutCommandResponse) XXX_Merge

func (m *ExecDutCommandResponse) XXX_Merge(src proto.Message)

func (*ExecDutCommandResponse) XXX_Size

func (m *ExecDutCommandResponse) XXX_Size() int

func (*ExecDutCommandResponse) XXX_Unmarshal

func (m *ExecDutCommandResponse) XXX_Unmarshal(b []byte) error

type ExecDutCommandResponse_ExitInfo

type ExecDutCommandResponse_ExitInfo struct {
	// status provides information about how the command process
	// terminated.
	//
	// If the command failed to start, status is set to an arbitrary
	// non-zero value.
	//
	// If signaled is set, status is set to the signal that caused
	// the command to terminate.
	//
	// Otherwise, status is set to the exit status of the process.
	// Exit statuses outside of 0 to 255 inclusive are not supported;
	// they will be mapped to an arbitrary non-zero value.
	//
	// status is zero if and only if the process was successfully
	// started and exited with a zero status.
	Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
	// signaled indicates whether the command exited due to a signal.
	// If set, status contains the signal.
	Signaled bool `protobuf:"varint,2,opt,name=signaled,proto3" json:"signaled,omitempty"`
	// started indicates whether the command was started.
	Started bool `protobuf:"varint,3,opt,name=started,proto3" json:"started,omitempty"`
	// error_message provides a human readable explanation for some errors.
	// This MUST NOT be inspected by programs.
	ErrorMessage         string   `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ExecDutCommandResponse_ExitInfo) Descriptor

func (*ExecDutCommandResponse_ExitInfo) Descriptor() ([]byte, []int)

func (*ExecDutCommandResponse_ExitInfo) GetErrorMessage

func (m *ExecDutCommandResponse_ExitInfo) GetErrorMessage() string

func (*ExecDutCommandResponse_ExitInfo) GetSignaled

func (m *ExecDutCommandResponse_ExitInfo) GetSignaled() bool

func (*ExecDutCommandResponse_ExitInfo) GetStarted

func (m *ExecDutCommandResponse_ExitInfo) GetStarted() bool

func (*ExecDutCommandResponse_ExitInfo) GetStatus

func (m *ExecDutCommandResponse_ExitInfo) GetStatus() int32

func (*ExecDutCommandResponse_ExitInfo) ProtoMessage

func (*ExecDutCommandResponse_ExitInfo) ProtoMessage()

func (*ExecDutCommandResponse_ExitInfo) Reset

func (*ExecDutCommandResponse_ExitInfo) String

func (*ExecDutCommandResponse_ExitInfo) XXX_DiscardUnknown

func (m *ExecDutCommandResponse_ExitInfo) XXX_DiscardUnknown()

func (*ExecDutCommandResponse_ExitInfo) XXX_Marshal

func (m *ExecDutCommandResponse_ExitInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ExecDutCommandResponse_ExitInfo) XXX_Merge

func (m *ExecDutCommandResponse_ExitInfo) XXX_Merge(src proto.Message)

func (*ExecDutCommandResponse_ExitInfo) XXX_Size

func (m *ExecDutCommandResponse_ExitInfo) XXX_Size() int

func (*ExecDutCommandResponse_ExitInfo) XXX_Unmarshal

func (m *ExecDutCommandResponse_ExitInfo) XXX_Unmarshal(b []byte) error

type ExposePortToDutRequest

type ExposePortToDutRequest struct {
	// dut_name is the resource name for the DUT.
	// The DUT name is passed to the RTD when the RTD is started.
	// It is not specified whether the name is the DUT hostname.
	// (-- aip.dev/not-precedent: This preceded the AIP standards.
	//     Ordinarily, this field should be either `name` or `dut`,
	//     depending on whether this is a method on Dut resources. --)
	DutName string `protobuf:"bytes,1,opt,name=dut_name,json=dutName,proto3" json:"dut_name,omitempty"`
	// local_port is the port of a service running inside the RTD container to
	// expose. It MUST be in the range of [1, 65535] as defined in RFC 1700
	// (http://https://tools.ietf.org/html/rfc1700).
	// A client MAY bind to the special port number "0" from inside an RTD to get
	// an OS assigned free port number without race condition. Then the client
	// MUST get the real port number assigned and pass it to "local_port" here.
	LocalPort int32 `protobuf:"varint,2,opt,name=local_port,json=localPort,proto3" json:"local_port,omitempty"`
	// require_remote_proxy indicates if the implementation SHOULD use a DUT
	// reachable server as a proxy and return the address and port of the proxy
	// server.
	// If require_remote_proxy is set, the exposed port SHOULD persist across DUT
	// reboots.
	// If require_remote_proxy is set but an implementation cannot provide a
	// remote proxy, the implementation SHOULD return FAILED_PRECONDITION.
	// If require_remote_proxy is not set, the implementation MAY expose a port
	// that cannot persist across DUT reboots.
	// If require_remote_proxy is not set, the implementation MAY use 'localhost'
	// as the exposed address.
	RequireRemoteProxy   bool     `protobuf:"varint,3,opt,name=require_remote_proxy,json=requireRemoteProxy,proto3" json:"require_remote_proxy,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}
Example
package main

import (
	"context"
	"fmt"
	"net"
	"net/http"

	rtd "go.chromium.org/chromiumos/config/go/api/test/rtd/v1"
	"go.chromium.org/chromiumos/config/go/api/test/tls"
	"google.golang.org/grpc"
)

func main() {
	var invocation rtd.Invocation

	tlsConfig := invocation.GetTestLabServicesConfig()
	dutName := invocation.GetDuts()[0].GetTlsDutName()

	conn, err := grpc.Dial(fmt.Sprintf("%s:%d", tlsConfig.GetTlwAddress(), tlsConfig.GetTlwPort()))
	if err != nil {
		panic(err)
	}
	defer conn.Close()

	c := tls.NewWiringClient(conn)
	ctx := context.Background()

	// Start a service inside RTD to bind to a local port.
	s := http.Server{}
	http.HandleFunc("/foo", func(w http.ResponseWriter, _ *http.Request) {
		fmt.Fprint(w, "Hello world!\n")
	})
	// Use port "0" to request OS to assign an unused port number.
	ln, _ := net.Listen("tcp", ":0")
	go func() {
		s.Serve(ln)
	}()
	defer s.Shutdown(context.Background())

	req := tls.ExposePortToDutRequest{
		DutName:   dutName,
		LocalPort: int32(ln.Addr().(*net.TCPAddr).Port),
	}
	resp, err := c.ExposePortToDut(ctx, &req)
	if err != nil {
		panic("RPC error")
	}

	// Handle the response in various ways. For example:
	// Run a client command to access the service started.
	// Dummy example, see ExecDutCommandRequest for a possible implementation.
	runCommandOnDut := func(args []string) {}
	runCommandOnDut([]string{"curl", fmt.Sprintf("%s:%d/foo", resp.ExposedAddress, resp.ExposedPort)})
}
Output:

func (*ExposePortToDutRequest) Descriptor

func (*ExposePortToDutRequest) Descriptor() ([]byte, []int)

func (*ExposePortToDutRequest) GetDutName

func (m *ExposePortToDutRequest) GetDutName() string

func (*ExposePortToDutRequest) GetLocalPort

func (m *ExposePortToDutRequest) GetLocalPort() int32

func (*ExposePortToDutRequest) GetRequireRemoteProxy

func (m *ExposePortToDutRequest) GetRequireRemoteProxy() bool

func (*ExposePortToDutRequest) ProtoMessage

func (*ExposePortToDutRequest) ProtoMessage()

func (*ExposePortToDutRequest) Reset

func (m *ExposePortToDutRequest) Reset()

func (*ExposePortToDutRequest) String

func (m *ExposePortToDutRequest) String() string

func (*ExposePortToDutRequest) XXX_DiscardUnknown

func (m *ExposePortToDutRequest) XXX_DiscardUnknown()

func (*ExposePortToDutRequest) XXX_Marshal

func (m *ExposePortToDutRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ExposePortToDutRequest) XXX_Merge

func (m *ExposePortToDutRequest) XXX_Merge(src proto.Message)

func (*ExposePortToDutRequest) XXX_Size

func (m *ExposePortToDutRequest) XXX_Size() int

func (*ExposePortToDutRequest) XXX_Unmarshal

func (m *ExposePortToDutRequest) XXX_Unmarshal(b []byte) error

type ExposePortToDutResponse

type ExposePortToDutResponse struct {
	// exposed_address is the address reachable by the requesting DUT.
	// TLEs SHOULD return an IPv4 or IPv6 address to avoid name resolution
	// issues.
	// IPv4 addresses MUST be in standard dotted decimal notation.
	// IPv6 addresses MUST be formatted according to RFC4291, Section 2.2. The
	// mixed IPv4 and IPv6 form MUST NOT be used.
	// If TLEs return a hostname, they SHOULD ensure that the hostname can be
	// resolved by the DUT via standard name resolution facilities.
	ExposedAddress string `protobuf:"bytes,1,opt,name=exposed_address,json=exposedAddress,proto3" json:"exposed_address,omitempty"`
	// exposed_port is the port on the exposed_address which is reachable from
	// the DUT.
	ExposedPort          int32    `protobuf:"varint,2,opt,name=exposed_port,json=exposedPort,proto3" json:"exposed_port,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ExposePortToDutResponse) Descriptor

func (*ExposePortToDutResponse) Descriptor() ([]byte, []int)

func (*ExposePortToDutResponse) GetExposedAddress

func (m *ExposePortToDutResponse) GetExposedAddress() string

func (*ExposePortToDutResponse) GetExposedPort

func (m *ExposePortToDutResponse) GetExposedPort() int32

func (*ExposePortToDutResponse) ProtoMessage

func (*ExposePortToDutResponse) ProtoMessage()

func (*ExposePortToDutResponse) Reset

func (m *ExposePortToDutResponse) Reset()

func (*ExposePortToDutResponse) String

func (m *ExposePortToDutResponse) String() string

func (*ExposePortToDutResponse) XXX_DiscardUnknown

func (m *ExposePortToDutResponse) XXX_DiscardUnknown()

func (*ExposePortToDutResponse) XXX_Marshal

func (m *ExposePortToDutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ExposePortToDutResponse) XXX_Merge

func (m *ExposePortToDutResponse) XXX_Merge(src proto.Message)

func (*ExposePortToDutResponse) XXX_Size

func (m *ExposePortToDutResponse) XXX_Size() int

func (*ExposePortToDutResponse) XXX_Unmarshal

func (m *ExposePortToDutResponse) XXX_Unmarshal(b []byte) error

type FakeOmaha

type FakeOmaha struct {
	// name is the resource name of the fake Omaha service.
	// Format: fakeOmaha/{fake-omaha-id}
	// The implementation MUST set it after creating the fake Omaha service.
	// Clients SHOULD NOT set it.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// dut is the resource name for the DUT.
	// The DUT name is passed to the RTD when the RTD is started.
	// It is not specified whether the name is the DUT hostname.
	Dut string `protobuf:"bytes,2,opt,name=dut,proto3" json:"dut,omitempty"`
	// target_build is the ChromeOS build that the fake Omaha service will serve
	// payloads for.
	TargetBuild *ChromeOsImage `protobuf:"bytes,3,opt,name=target_build,json=targetBuild,proto3" json:"target_build,omitempty"`
	// payloads is the payloads can be served by the fake Omaha service.
	Payloads []*FakeOmaha_Payload `protobuf:"bytes,4,rep,name=payloads,proto3" json:"payloads,omitempty"`
	// exposed_via_proxy indicates that the fake Omaha service is exposed to a
	// DUT via a proxy server, instead of exposing to the DUT directly. So the
	// service exposing won't be impacted by rebooting the DUT, disconnecting the
	// DUT network, etc.
	ExposedViaProxy bool `protobuf:"varint,5,opt,name=exposed_via_proxy,json=exposedViaProxy,proto3" json:"exposed_via_proxy,omitempty"`
	// critical_update instructs the fake Omaha created that the update is
	// critical if set.
	CriticalUpdate bool `protobuf:"varint,6,opt,name=critical_update,json=criticalUpdate,proto3" json:"critical_update,omitempty"`
	// return_noupdate_starting indicates from which update check to start returning noupdate.
	// It MUST be 0 or greater.
	// When set to 0 (the default value), disables returning noupdate.
	// If set to positive N, returns noupdate for the Nth check and for every
	// check thereafter.
	// For example, if set to 1, returns noupdate starting from the first check,
	// i.e., always returns noupdate.
	ReturnNoupdateStarting int32 `` /* 130-byte string literal not displayed */
	// omaha_url is the current fake Omaha service URL which is reachable from
	// the specified DUT.
	// The URL can be used as input of the update engine client of the DUT.
	// The implementation MUST set it after creating the fake Omaha service.
	// Clients SHOULD NOT set it.
	OmahaUrl             string   `protobuf:"bytes,8,opt,name=omaha_url,json=omahaUrl,proto3" json:"omaha_url,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*FakeOmaha) Descriptor

func (*FakeOmaha) Descriptor() ([]byte, []int)

func (*FakeOmaha) GetCriticalUpdate

func (m *FakeOmaha) GetCriticalUpdate() bool

func (*FakeOmaha) GetDut

func (m *FakeOmaha) GetDut() string

func (*FakeOmaha) GetExposedViaProxy

func (m *FakeOmaha) GetExposedViaProxy() bool

func (*FakeOmaha) GetName

func (m *FakeOmaha) GetName() string

func (*FakeOmaha) GetOmahaUrl

func (m *FakeOmaha) GetOmahaUrl() string

func (*FakeOmaha) GetPayloads

func (m *FakeOmaha) GetPayloads() []*FakeOmaha_Payload

func (*FakeOmaha) GetReturnNoupdateStarting

func (m *FakeOmaha) GetReturnNoupdateStarting() int32

func (*FakeOmaha) GetTargetBuild

func (m *FakeOmaha) GetTargetBuild() *ChromeOsImage

func (*FakeOmaha) ProtoMessage

func (*FakeOmaha) ProtoMessage()

func (*FakeOmaha) Reset

func (m *FakeOmaha) Reset()

func (*FakeOmaha) String

func (m *FakeOmaha) String() string

func (*FakeOmaha) XXX_DiscardUnknown

func (m *FakeOmaha) XXX_DiscardUnknown()

func (*FakeOmaha) XXX_Marshal

func (m *FakeOmaha) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FakeOmaha) XXX_Merge

func (m *FakeOmaha) XXX_Merge(src proto.Message)

func (*FakeOmaha) XXX_Size

func (m *FakeOmaha) XXX_Size() int

func (*FakeOmaha) XXX_Unmarshal

func (m *FakeOmaha) XXX_Unmarshal(b []byte) error

type FakeOmaha_Payload

type FakeOmaha_Payload struct {
	// id is the id of the payload. It MAY be "ROOTFS" or a DLC id, etc.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// type is the payload type, e.g. TYPE_FULL or TYPE_DELTA.
	Type                 FakeOmaha_Payload_Type `protobuf:"varint,2,opt,name=type,proto3,enum=chromiumos.config.api.test.tls.FakeOmaha_Payload_Type" json:"type,omitempty"`
	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
	XXX_unrecognized     []byte                 `json:"-"`
	XXX_sizecache        int32                  `json:"-"`
}

func (*FakeOmaha_Payload) Descriptor

func (*FakeOmaha_Payload) Descriptor() ([]byte, []int)

func (*FakeOmaha_Payload) GetId

func (m *FakeOmaha_Payload) GetId() string

func (*FakeOmaha_Payload) GetType

func (*FakeOmaha_Payload) ProtoMessage

func (*FakeOmaha_Payload) ProtoMessage()

func (*FakeOmaha_Payload) Reset

func (m *FakeOmaha_Payload) Reset()

func (*FakeOmaha_Payload) String

func (m *FakeOmaha_Payload) String() string

func (*FakeOmaha_Payload) XXX_DiscardUnknown

func (m *FakeOmaha_Payload) XXX_DiscardUnknown()

func (*FakeOmaha_Payload) XXX_Marshal

func (m *FakeOmaha_Payload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FakeOmaha_Payload) XXX_Merge

func (m *FakeOmaha_Payload) XXX_Merge(src proto.Message)

func (*FakeOmaha_Payload) XXX_Size

func (m *FakeOmaha_Payload) XXX_Size() int

func (*FakeOmaha_Payload) XXX_Unmarshal

func (m *FakeOmaha_Payload) XXX_Unmarshal(b []byte) error

type FakeOmaha_Payload_Type

type FakeOmaha_Payload_Type int32
const (
	FakeOmaha_Payload_TYPE_UNSPECIFIED FakeOmaha_Payload_Type = 0
	FakeOmaha_Payload_FULL             FakeOmaha_Payload_Type = 1
	FakeOmaha_Payload_DELTA            FakeOmaha_Payload_Type = 2
)

func (FakeOmaha_Payload_Type) EnumDescriptor

func (FakeOmaha_Payload_Type) EnumDescriptor() ([]byte, []int)

func (FakeOmaha_Payload_Type) String

func (x FakeOmaha_Payload_Type) String() string

type FetchCrashesRequest

type FetchCrashesRequest struct {
	// dut is the resource name for the DUT from which to fetch crashes.
	// The DUT name is passed to the RTD when the RTD is started.
	// It is not specified whether the name is the DUT hostname.
	Dut string `protobuf:"bytes,1,opt,name=dut,proto3" json:"dut,omitempty"`
	// If true, fetch the core file.
	// For uploads to the crash server, that should generally be false.
	// If the crash file is likely to be used for manual debugging (e.g. on
	// a manually-invoked test suite run), this might be true.
	// Coredumps can be extremely large (even gigabytes), so if resource usage
	// is a concern, this should probably be false.
	FetchCore            bool     `protobuf:"varint,2,opt,name=fetch_core,json=fetchCore,proto3" json:"fetch_core,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}
Example
package main

import (
	"context"
	"fmt"
	"io"

	rtd "go.chromium.org/chromiumos/config/go/api/test/rtd/v1"
	"go.chromium.org/chromiumos/config/go/api/test/tls"
	"google.golang.org/grpc"
)

func main() {
	var invocation rtd.Invocation

	tlsConfig := invocation.GetTestLabServicesConfig()
	dutName := invocation.GetDuts()[0].GetTlsDutName()

	conn, err := grpc.Dial(fmt.Sprintf("%s:%d", tlsConfig.GetTlwAddress(), tlsConfig.GetTlwPort()), grpc.WithInsecure())
	if err != nil {
		panic(err)
	}
	defer conn.Close()

	c := tls.NewCommonClient(conn)

	req := tls.FetchCrashesRequest{
		Dut:       dutName,
		FetchCore: true,
	}

	ctx := context.Background()
	stream, err := c.FetchCrashes(ctx, &req)
	if err != nil {
		panic(err)
	}

	crashes := make(map[int64]*tls.CrashInfo)
	cores := make(map[int64][]byte)
	blobs := make(map[int64]map[string][]byte)

readStream:
	for {
		resp, err := stream.Recv()
		if err != nil {
			if err == io.EOF {
				break readStream
			}
			panic(fmt.Sprintf("RPC error: %v", err))
		}

		id := resp.CrashId
		switch x := resp.Data.(type) {
		case *tls.FetchCrashesResponse_Crash:
			crashes[id] = x.Crash
			// Start on next crash -- assume we get CrashInfo before
			// any blobs.
			blobs[id] = make(map[string][]byte)
		case *tls.FetchCrashesResponse_Blob:
			b := x.Blob
			blobs[id][b.Key] = append(blobs[id][b.Key], b.Blob...)
		case *tls.FetchCrashesResponse_Core:
			cores[id] = append(cores[id], x.Core...)
		default:
			panic(fmt.Sprintf("invalid type %T", x))
		}
	}
}
Output:

func (*FetchCrashesRequest) Descriptor

func (*FetchCrashesRequest) Descriptor() ([]byte, []int)

func (*FetchCrashesRequest) GetDut

func (m *FetchCrashesRequest) GetDut() string

func (*FetchCrashesRequest) GetFetchCore

func (m *FetchCrashesRequest) GetFetchCore() bool

func (*FetchCrashesRequest) ProtoMessage

func (*FetchCrashesRequest) ProtoMessage()

func (*FetchCrashesRequest) Reset

func (m *FetchCrashesRequest) Reset()

func (*FetchCrashesRequest) String

func (m *FetchCrashesRequest) String() string

func (*FetchCrashesRequest) XXX_DiscardUnknown

func (m *FetchCrashesRequest) XXX_DiscardUnknown()

func (*FetchCrashesRequest) XXX_Marshal

func (m *FetchCrashesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FetchCrashesRequest) XXX_Merge

func (m *FetchCrashesRequest) XXX_Merge(src proto.Message)

func (*FetchCrashesRequest) XXX_Size

func (m *FetchCrashesRequest) XXX_Size() int

func (*FetchCrashesRequest) XXX_Unmarshal

func (m *FetchCrashesRequest) XXX_Unmarshal(b []byte) error

type FetchCrashesResponse

type FetchCrashesResponse struct {
	// Crash id. unique only within responses to a single FetchCrashes request.
	// Used to assemble multiple streamed |FetchCrashesResponse| protos into a
	// single crash report.
	CrashId int64 `protobuf:"varint,1,opt,name=crash_id,json=crashId,proto3" json:"crash_id,omitempty"`
	// Types that are valid to be assigned to Data:
	//	*FetchCrashesResponse_Crash
	//	*FetchCrashesResponse_Blob
	//	*FetchCrashesResponse_Core
	Data                 isFetchCrashesResponse_Data `protobuf_oneof:"data"`
	XXX_NoUnkeyedLiteral struct{}                    `json:"-"`
	XXX_unrecognized     []byte                      `json:"-"`
	XXX_sizecache        int32                       `json:"-"`
}

When this response is streamed, the first proto with a given crash ID will always contain the CrashInfo. Files and core dumps (if present) may be streamed. If they are, subsequent protos with the same crash ID will follow, each containing a chunk of file/coredump. To reassemble these, concatenate the bytes received from each subsequent proto with a matching crash_id (concatenate blobs that have matching crash_ids and keys). Additional crashes may be reported in the same stream with a new crash ID.

func (*FetchCrashesResponse) Descriptor

func (*FetchCrashesResponse) Descriptor() ([]byte, []int)

func (*FetchCrashesResponse) GetBlob

func (m *FetchCrashesResponse) GetBlob() *CrashBlob

func (*FetchCrashesResponse) GetCore

func (m *FetchCrashesResponse) GetCore() []byte

func (*FetchCrashesResponse) GetCrash

func (m *FetchCrashesResponse) GetCrash() *CrashInfo

func (*FetchCrashesResponse) GetCrashId

func (m *FetchCrashesResponse) GetCrashId() int64

func (*FetchCrashesResponse) GetData

func (m *FetchCrashesResponse) GetData() isFetchCrashesResponse_Data

func (*FetchCrashesResponse) ProtoMessage

func (*FetchCrashesResponse) ProtoMessage()

func (*FetchCrashesResponse) Reset

func (m *FetchCrashesResponse) Reset()

func (*FetchCrashesResponse) String

func (m *FetchCrashesResponse) String() string

func (*FetchCrashesResponse) XXX_DiscardUnknown

func (m *FetchCrashesResponse) XXX_DiscardUnknown()

func (*FetchCrashesResponse) XXX_Marshal

func (m *FetchCrashesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FetchCrashesResponse) XXX_Merge

func (m *FetchCrashesResponse) XXX_Merge(src proto.Message)

func (*FetchCrashesResponse) XXX_OneofWrappers

func (*FetchCrashesResponse) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*FetchCrashesResponse) XXX_Size

func (m *FetchCrashesResponse) XXX_Size() int

func (*FetchCrashesResponse) XXX_Unmarshal

func (m *FetchCrashesResponse) XXX_Unmarshal(b []byte) error

type FetchCrashesResponse_Blob

type FetchCrashesResponse_Blob struct {
	Blob *CrashBlob `protobuf:"bytes,3,opt,name=blob,proto3,oneof"`
}

type FetchCrashesResponse_Core

type FetchCrashesResponse_Core struct {
	Core []byte `protobuf:"bytes,4,opt,name=core,proto3,oneof"`
}

type FetchCrashesResponse_Crash

type FetchCrashesResponse_Crash struct {
	Crash *CrashInfo `protobuf:"bytes,2,opt,name=crash,proto3,oneof"`
}

type GetDutRequest

type GetDutRequest struct {
	// name is the resource name for the DUT.
	// The DUT name is passed to the RTD when the RTD is started.
	// It is not specified whether the name is the DUT hostname.
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetDutRequest) Descriptor

func (*GetDutRequest) Descriptor() ([]byte, []int)

func (*GetDutRequest) GetName

func (m *GetDutRequest) GetName() string

func (*GetDutRequest) ProtoMessage

func (*GetDutRequest) ProtoMessage()

func (*GetDutRequest) Reset

func (m *GetDutRequest) Reset()

func (*GetDutRequest) String

func (m *GetDutRequest) String() string

func (*GetDutRequest) XXX_DiscardUnknown

func (m *GetDutRequest) XXX_DiscardUnknown()

func (*GetDutRequest) XXX_Marshal

func (m *GetDutRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetDutRequest) XXX_Merge

func (m *GetDutRequest) XXX_Merge(src proto.Message)

func (*GetDutRequest) XXX_Size

func (m *GetDutRequest) XXX_Size() int

func (*GetDutRequest) XXX_Unmarshal

func (m *GetDutRequest) XXX_Unmarshal(b []byte) error

type License

type License struct {
	// name is the resource name for the license.
	// This is used for tracking licenses.
	// Clients MUST NOT use the name to identify the type of license,
	// even if the implementation names the resources after the license
	// type.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// type is the type of the license.
	Type                 License_Type `protobuf:"varint,2,opt,name=type,proto3,enum=chromiumos.config.api.test.tls.License_Type" json:"type,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*License) Descriptor

func (*License) Descriptor() ([]byte, []int)

func (*License) GetName

func (m *License) GetName() string

func (*License) GetType

func (m *License) GetType() License_Type

func (*License) ProtoMessage

func (*License) ProtoMessage()

func (*License) Reset

func (m *License) Reset()

func (*License) String

func (m *License) String() string

func (*License) XXX_DiscardUnknown

func (m *License) XXX_DiscardUnknown()

func (*License) XXX_Marshal

func (m *License) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*License) XXX_Merge

func (m *License) XXX_Merge(src proto.Message)

func (*License) XXX_Size

func (m *License) XXX_Size() int

func (*License) XXX_Unmarshal

func (m *License) XXX_Unmarshal(b []byte) error

type License_Type

type License_Type int32
const (
	License_TYPE_UNSPECIFIED License_Type = 0
	// Microsoft Windows 10 Professional Desktop Operating System.
	// Contact the Chrome OS Parallels team for license specifics.
	License_WINDOWS_10_PRO License_Type = 1
	// Microsoft Office Standard.
	// Contact the Chrome OS Parallels team for version and license specifics.
	License_MS_OFFICE_STANDARD License_Type = 2
)

func (License_Type) EnumDescriptor

func (License_Type) EnumDescriptor() ([]byte, []int)

func (License_Type) String

func (x License_Type) String() string

type OpenDutPortRequest

type OpenDutPortRequest struct {
	// name is the resource name for the DUT.
	// The DUT name is passed to the RTD when the RTD is started.
	// It is not specified whether the name is the DUT hostname.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// port is the port to open on the DUT.
	Port                 int32    `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*OpenDutPortRequest) Descriptor

func (*OpenDutPortRequest) Descriptor() ([]byte, []int)

func (*OpenDutPortRequest) GetName

func (m *OpenDutPortRequest) GetName() string

func (*OpenDutPortRequest) GetPort

func (m *OpenDutPortRequest) GetPort() int32

func (*OpenDutPortRequest) ProtoMessage

func (*OpenDutPortRequest) ProtoMessage()

func (*OpenDutPortRequest) Reset

func (m *OpenDutPortRequest) Reset()

func (*OpenDutPortRequest) String

func (m *OpenDutPortRequest) String() string

func (*OpenDutPortRequest) XXX_DiscardUnknown

func (m *OpenDutPortRequest) XXX_DiscardUnknown()

func (*OpenDutPortRequest) XXX_Marshal

func (m *OpenDutPortRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OpenDutPortRequest) XXX_Merge

func (m *OpenDutPortRequest) XXX_Merge(src proto.Message)

func (*OpenDutPortRequest) XXX_Size

func (m *OpenDutPortRequest) XXX_Size() int

func (*OpenDutPortRequest) XXX_Unmarshal

func (m *OpenDutPortRequest) XXX_Unmarshal(b []byte) error

type OpenDutPortResponse

type OpenDutPortResponse struct {
	// address for which a port is forwarded to the DUT.
	// TLEs SHOULD return an IPv4 or IPv6 address to avoid name
	// resolution issues.
	// IPv4 addresses MUST be in standard dotted decimal notation.
	// IPv6 addresses MUST be formatted according to RFC4291, Section
	// 2.2.  The mixed IPv4 and IPv6 form MUST NOT be used.
	// If TLEs return a hostname, they SHOULD ensure that the hostname
	// can be resolved by the RTD via standard name resolution
	// facilities.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// port on the address which is forwarded to the DUT.
	Port                 int32    `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*OpenDutPortResponse) Descriptor

func (*OpenDutPortResponse) Descriptor() ([]byte, []int)

func (*OpenDutPortResponse) GetAddress

func (m *OpenDutPortResponse) GetAddress() string

func (*OpenDutPortResponse) GetPort

func (m *OpenDutPortResponse) GetPort() int32

func (*OpenDutPortResponse) ProtoMessage

func (*OpenDutPortResponse) ProtoMessage()

func (*OpenDutPortResponse) Reset

func (m *OpenDutPortResponse) Reset()

func (*OpenDutPortResponse) String

func (m *OpenDutPortResponse) String() string

func (*OpenDutPortResponse) XXX_DiscardUnknown

func (m *OpenDutPortResponse) XXX_DiscardUnknown()

func (*OpenDutPortResponse) XXX_Marshal

func (m *OpenDutPortResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OpenDutPortResponse) XXX_Merge

func (m *OpenDutPortResponse) XXX_Merge(src proto.Message)

func (*OpenDutPortResponse) XXX_Size

func (m *OpenDutPortResponse) XXX_Size() int

func (*OpenDutPortResponse) XXX_Unmarshal

func (m *OpenDutPortResponse) XXX_Unmarshal(b []byte) error

type Output

type Output int32

Output enumeration for ExecDutCommandRequest.

const (
	// OUTPUT_PIPE means to collect output and return it.
	Output_OUTPUT_PIPE Output = 0
	// OUTPUT_STDOUT is a special value for stderr which means to merge stderr
	// into stdout.
	Output_OUTPUT_STDOUT Output = 1
)

func (Output) EnumDescriptor

func (Output) EnumDescriptor() ([]byte, []int)

func (Output) String

func (x Output) String() string

type ProvisionAshMetadata

type ProvisionAshMetadata struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ProvisionAshMetadata) Descriptor

func (*ProvisionAshMetadata) Descriptor() ([]byte, []int)

func (*ProvisionAshMetadata) ProtoMessage

func (*ProvisionAshMetadata) ProtoMessage()

func (*ProvisionAshMetadata) Reset

func (m *ProvisionAshMetadata) Reset()

func (*ProvisionAshMetadata) String

func (m *ProvisionAshMetadata) String() string

func (*ProvisionAshMetadata) XXX_DiscardUnknown

func (m *ProvisionAshMetadata) XXX_DiscardUnknown()

func (*ProvisionAshMetadata) XXX_Marshal

func (m *ProvisionAshMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProvisionAshMetadata) XXX_Merge

func (m *ProvisionAshMetadata) XXX_Merge(src proto.Message)

func (*ProvisionAshMetadata) XXX_Size

func (m *ProvisionAshMetadata) XXX_Size() int

func (*ProvisionAshMetadata) XXX_Unmarshal

func (m *ProvisionAshMetadata) XXX_Unmarshal(b []byte) error

type ProvisionAshRequest

type ProvisionAshRequest struct {
	// name is the resource name for the DUT.
	// The DUT name is passed to the RTD when the RTD is started.
	// It is not specified whether the name is the DUT hostname.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// image specifies the Lacros image with which to provision the DUT.
	Bundle               *ProvisionAshRequest_AshBundle `protobuf:"bytes,2,opt,name=bundle,proto3" json:"bundle,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                       `json:"-"`
	XXX_unrecognized     []byte                         `json:"-"`
	XXX_sizecache        int32                          `json:"-"`
}

func (*ProvisionAshRequest) Descriptor

func (*ProvisionAshRequest) Descriptor() ([]byte, []int)

func (*ProvisionAshRequest) GetBundle

func (*ProvisionAshRequest) GetName

func (m *ProvisionAshRequest) GetName() string

func (*ProvisionAshRequest) ProtoMessage

func (*ProvisionAshRequest) ProtoMessage()

func (*ProvisionAshRequest) Reset

func (m *ProvisionAshRequest) Reset()

func (*ProvisionAshRequest) String

func (m *ProvisionAshRequest) String() string

func (*ProvisionAshRequest) XXX_DiscardUnknown

func (m *ProvisionAshRequest) XXX_DiscardUnknown()

func (*ProvisionAshRequest) XXX_Marshal

func (m *ProvisionAshRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProvisionAshRequest) XXX_Merge

func (m *ProvisionAshRequest) XXX_Merge(src proto.Message)

func (*ProvisionAshRequest) XXX_Size

func (m *ProvisionAshRequest) XXX_Size() int

func (*ProvisionAshRequest) XXX_Unmarshal

func (m *ProvisionAshRequest) XXX_Unmarshal(b []byte) error

type ProvisionAshRequest_AshBundle

type ProvisionAshRequest_AshBundle struct {
	// Types that are valid to be assigned to PathOneof:
	//	*ProvisionAshRequest_AshBundle_GsBundlePath
	PathOneof            isProvisionAshRequest_AshBundle_PathOneof `protobuf_oneof:"path_oneof"`
	XXX_NoUnkeyedLiteral struct{}                                  `json:"-"`
	XXX_unrecognized     []byte                                    `json:"-"`
	XXX_sizecache        int32                                     `json:"-"`
}

func (*ProvisionAshRequest_AshBundle) Descriptor

func (*ProvisionAshRequest_AshBundle) Descriptor() ([]byte, []int)

func (*ProvisionAshRequest_AshBundle) GetGsBundlePath

func (m *ProvisionAshRequest_AshBundle) GetGsBundlePath() string

func (*ProvisionAshRequest_AshBundle) GetPathOneof

func (m *ProvisionAshRequest_AshBundle) GetPathOneof() isProvisionAshRequest_AshBundle_PathOneof

func (*ProvisionAshRequest_AshBundle) ProtoMessage

func (*ProvisionAshRequest_AshBundle) ProtoMessage()

func (*ProvisionAshRequest_AshBundle) Reset

func (m *ProvisionAshRequest_AshBundle) Reset()

func (*ProvisionAshRequest_AshBundle) String

func (*ProvisionAshRequest_AshBundle) XXX_DiscardUnknown

func (m *ProvisionAshRequest_AshBundle) XXX_DiscardUnknown()

func (*ProvisionAshRequest_AshBundle) XXX_Marshal

func (m *ProvisionAshRequest_AshBundle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProvisionAshRequest_AshBundle) XXX_Merge

func (m *ProvisionAshRequest_AshBundle) XXX_Merge(src proto.Message)

func (*ProvisionAshRequest_AshBundle) XXX_OneofWrappers

func (*ProvisionAshRequest_AshBundle) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*ProvisionAshRequest_AshBundle) XXX_Size

func (m *ProvisionAshRequest_AshBundle) XXX_Size() int

func (*ProvisionAshRequest_AshBundle) XXX_Unmarshal

func (m *ProvisionAshRequest_AshBundle) XXX_Unmarshal(b []byte) error

type ProvisionAshRequest_AshBundle_GsBundlePath

type ProvisionAshRequest_AshBundle_GsBundlePath struct {
	GsBundlePath string `protobuf:"bytes,1,opt,name=gs_bundle_path,json=gsBundlePath,proto3,oneof"`
}

type ProvisionAshResponse

type ProvisionAshResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ProvisionAshResponse) Descriptor

func (*ProvisionAshResponse) Descriptor() ([]byte, []int)

func (*ProvisionAshResponse) ProtoMessage

func (*ProvisionAshResponse) ProtoMessage()

func (*ProvisionAshResponse) Reset

func (m *ProvisionAshResponse) Reset()

func (*ProvisionAshResponse) String

func (m *ProvisionAshResponse) String() string

func (*ProvisionAshResponse) XXX_DiscardUnknown

func (m *ProvisionAshResponse) XXX_DiscardUnknown()

func (*ProvisionAshResponse) XXX_Marshal

func (m *ProvisionAshResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProvisionAshResponse) XXX_Merge

func (m *ProvisionAshResponse) XXX_Merge(src proto.Message)

func (*ProvisionAshResponse) XXX_Size

func (m *ProvisionAshResponse) XXX_Size() int

func (*ProvisionAshResponse) XXX_Unmarshal

func (m *ProvisionAshResponse) XXX_Unmarshal(b []byte) error

type ProvisionAshResponse_Reason

type ProvisionAshResponse_Reason int32

When the status code is other than OK, details in Status message should be parsed for ErrorInfo message with the following Reasons as the reason.

const (
	// Failed as the ProvisionAsh request is invalid.
	ProvisionAshResponse_REASON_INVALID_REQUEST ProvisionAshResponse_Reason = 0
	// Failed to connect to the DUT prior to provisioning Ash.
	ProvisionAshResponse_REASON_DUT_UNREACHABLE_PRE_PROVISION ProvisionAshResponse_Reason = 1
	// Failed to download the Ash bundle or a timeout during download.
	ProvisionAshResponse_REASON_DOWNLOADING_BUNDLE_FAILED ProvisionAshResponse_Reason = 2
	// Failed due to a timeout during the main Ash provisioning.
	// Excludes timeout during other steps.
	ProvisionAshResponse_REASON_PROVISIONING_TIMEDOUT ProvisionAshResponse_Reason = 3
	// General failure in Ash provisioning.
	ProvisionAshResponse_REASON_PROVISIONING_FAILED ProvisionAshResponse_Reason = 4
)

func (ProvisionAshResponse_Reason) EnumDescriptor

func (ProvisionAshResponse_Reason) EnumDescriptor() ([]byte, []int)

func (ProvisionAshResponse_Reason) String

type ProvisionDutMetadata

type ProvisionDutMetadata struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ProvisionDutMetadata) Descriptor

func (*ProvisionDutMetadata) Descriptor() ([]byte, []int)

func (*ProvisionDutMetadata) ProtoMessage

func (*ProvisionDutMetadata) ProtoMessage()

func (*ProvisionDutMetadata) Reset

func (m *ProvisionDutMetadata) Reset()

func (*ProvisionDutMetadata) String

func (m *ProvisionDutMetadata) String() string

func (*ProvisionDutMetadata) XXX_DiscardUnknown

func (m *ProvisionDutMetadata) XXX_DiscardUnknown()

func (*ProvisionDutMetadata) XXX_Marshal

func (m *ProvisionDutMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProvisionDutMetadata) XXX_Merge

func (m *ProvisionDutMetadata) XXX_Merge(src proto.Message)

func (*ProvisionDutMetadata) XXX_Size

func (m *ProvisionDutMetadata) XXX_Size() int

func (*ProvisionDutMetadata) XXX_Unmarshal

func (m *ProvisionDutMetadata) XXX_Unmarshal(b []byte) error

type ProvisionDutRequest

type ProvisionDutRequest struct {
	// name is the resource name for the DUT.
	// The DUT name is passed to the RTD when the RTD is started.
	// It is not specified whether the name is the DUT hostname.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// image specifies the Chrome OS image with which to provision the DUT.
	Image *ProvisionDutRequest_ChromeOSImage `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` // Deprecated: Do not use.
	// dlc_specs specifies which DLCs to install on the DUT after provisioning.
	DlcSpecs []*ProvisionDutRequest_DLCSpec `protobuf:"bytes,3,rep,name=dlc_specs,json=dlcSpecs,proto3" json:"dlc_specs,omitempty"`
	// preserve_stateful specifies whether the stateful partition should be preserved during
	// provisioning. If preserve_stateful is not set to true, the stateful partition is
	// block-level wiped and reset during provisioning.
	PreserveStateful bool `protobuf:"varint,4,opt,name=preserve_stateful,json=preserveStateful,proto3" json:"preserve_stateful,omitempty"`
	// target_build is the ChromeOS build to provision to.
	TargetBuild *ChromeOsImage `protobuf:"bytes,5,opt,name=target_build,json=targetBuild,proto3" json:"target_build,omitempty"`
	// force_provision_os will always provision the OS.
	ForceProvisionOs bool `protobuf:"varint,6,opt,name=force_provision_os,json=forceProvisionOs,proto3" json:"force_provision_os,omitempty"`
	// prevent_reboot will skip all attempts to reboot during provision the OS.
	PreventReboot bool `protobuf:"varint,7,opt,name=prevent_reboot,json=preventReboot,proto3" json:"prevent_reboot,omitempty"`
	// update_firmware will update OS bundled firmware during the provision.
	// Please note this firmware update only update firmware that built in
	// the target_build OS image and it is different from firmware provision
	// which download and update a separate firmware image based on request.
	UpdateFirmware       bool     `protobuf:"varint,8,opt,name=update_firmware,json=updateFirmware,proto3" json:"update_firmware,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}
Example
package main

import (
	"context"
	"fmt"

	"github.com/golang/protobuf/ptypes/duration"
	rtd "go.chromium.org/chromiumos/config/go/api/test/rtd/v1"
	"go.chromium.org/chromiumos/config/go/api/test/tls"
	"go.chromium.org/chromiumos/config/go/api/test/tls/dependencies/longrunning"
	"google.golang.org/grpc"
)

func main() {
	var invocation rtd.Invocation

	tlsConfig := invocation.GetTestLabServicesConfig()
	dutName := invocation.GetDuts()[0].GetTlsDutName()

	conn, err := grpc.Dial(fmt.Sprintf("%s:%d", tlsConfig.GetTlwAddress(), tlsConfig.GetTlwPort()), grpc.WithInsecure())
	if err != nil {
		panic(err)
	}
	defer conn.Close()

	c := tls.NewCommonClient(conn)

	req := tls.ProvisionDutRequest{
		Name: dutName,
		TargetBuild: &tls.ChromeOsImage{
			PathOneof: &tls.ChromeOsImage_GsPathPrefix{
				GsPathPrefix: "gs://chromeos-image-archive/eve-release/R87-13457.0.0",
			},
		},
		DlcSpecs: []*tls.ProvisionDutRequest_DLCSpec{
			&tls.ProvisionDutRequest_DLCSpec{
				Id: "sample-dlc",
			},
		},
	}

	ctx := context.Background()
	op, err := c.ProvisionDut(ctx, &req)
	if err != nil {
		panic(err)
	}

	opcli := longrunning.NewOperationsClient(conn)
	op, err = opcli.WaitOperation(ctx, &longrunning.WaitOperationRequest{
		Name: op.GetName(),
		Timeout: &duration.Duration{
			Seconds: 3600,
		},
	})
	if err != nil {
		panic("RPC error")
	}

	if errStatus := op.GetError(); errStatus != nil {
		panic(fmt.Sprintf("Operation error details: %v", errStatus.GetDetails()))
	}

	// Provisioned OS + DLC.
}
Output:

func (*ProvisionDutRequest) Descriptor

func (*ProvisionDutRequest) Descriptor() ([]byte, []int)

func (*ProvisionDutRequest) GetDlcSpecs

func (*ProvisionDutRequest) GetForceProvisionOs

func (m *ProvisionDutRequest) GetForceProvisionOs() bool

func (*ProvisionDutRequest) GetImage deprecated

Deprecated: Do not use.

func (*ProvisionDutRequest) GetName

func (m *ProvisionDutRequest) GetName() string

func (*ProvisionDutRequest) GetPreserveStateful

func (m *ProvisionDutRequest) GetPreserveStateful() bool

func (*ProvisionDutRequest) GetPreventReboot

func (m *ProvisionDutRequest) GetPreventReboot() bool

func (*ProvisionDutRequest) GetTargetBuild

func (m *ProvisionDutRequest) GetTargetBuild() *ChromeOsImage

func (*ProvisionDutRequest) GetUpdateFirmware

func (m *ProvisionDutRequest) GetUpdateFirmware() bool

func (*ProvisionDutRequest) ProtoMessage

func (*ProvisionDutRequest) ProtoMessage()

func (*ProvisionDutRequest) Reset

func (m *ProvisionDutRequest) Reset()

func (*ProvisionDutRequest) String

func (m *ProvisionDutRequest) String() string

func (*ProvisionDutRequest) XXX_DiscardUnknown

func (m *ProvisionDutRequest) XXX_DiscardUnknown()

func (*ProvisionDutRequest) XXX_Marshal

func (m *ProvisionDutRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProvisionDutRequest) XXX_Merge

func (m *ProvisionDutRequest) XXX_Merge(src proto.Message)

func (*ProvisionDutRequest) XXX_Size

func (m *ProvisionDutRequest) XXX_Size() int

func (*ProvisionDutRequest) XXX_Unmarshal

func (m *ProvisionDutRequest) XXX_Unmarshal(b []byte) error

type ProvisionDutRequest_ChromeOSImage deprecated

type ProvisionDutRequest_ChromeOSImage struct {
	// Types that are valid to be assigned to PathOneof:
	//	*ProvisionDutRequest_ChromeOSImage_GsPathPrefix
	PathOneof            isProvisionDutRequest_ChromeOSImage_PathOneof `protobuf_oneof:"path_oneof"`
	XXX_NoUnkeyedLiteral struct{}                                      `json:"-"`
	XXX_unrecognized     []byte                                        `json:"-"`
	XXX_sizecache        int32                                         `json:"-"`
}

TODO(crbug.com/1155247) Deprecate this nested message and replace with top level ChromeOsImage.

Deprecated: Do not use.

func (*ProvisionDutRequest_ChromeOSImage) Descriptor

func (*ProvisionDutRequest_ChromeOSImage) Descriptor() ([]byte, []int)

func (*ProvisionDutRequest_ChromeOSImage) GetGsPathPrefix

func (m *ProvisionDutRequest_ChromeOSImage) GetGsPathPrefix() string

func (*ProvisionDutRequest_ChromeOSImage) GetPathOneof

func (m *ProvisionDutRequest_ChromeOSImage) GetPathOneof() isProvisionDutRequest_ChromeOSImage_PathOneof

func (*ProvisionDutRequest_ChromeOSImage) ProtoMessage

func (*ProvisionDutRequest_ChromeOSImage) ProtoMessage()

func (*ProvisionDutRequest_ChromeOSImage) Reset

func (*ProvisionDutRequest_ChromeOSImage) String

func (*ProvisionDutRequest_ChromeOSImage) XXX_DiscardUnknown

func (m *ProvisionDutRequest_ChromeOSImage) XXX_DiscardUnknown()

func (*ProvisionDutRequest_ChromeOSImage) XXX_Marshal

func (m *ProvisionDutRequest_ChromeOSImage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProvisionDutRequest_ChromeOSImage) XXX_Merge

func (*ProvisionDutRequest_ChromeOSImage) XXX_OneofWrappers

func (*ProvisionDutRequest_ChromeOSImage) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*ProvisionDutRequest_ChromeOSImage) XXX_Size

func (m *ProvisionDutRequest_ChromeOSImage) XXX_Size() int

func (*ProvisionDutRequest_ChromeOSImage) XXX_Unmarshal

func (m *ProvisionDutRequest_ChromeOSImage) XXX_Unmarshal(b []byte) error

type ProvisionDutRequest_ChromeOSImage_GsPathPrefix

type ProvisionDutRequest_ChromeOSImage_GsPathPrefix struct {
	GsPathPrefix string `protobuf:"bytes,1,opt,name=gs_path_prefix,json=gsPathPrefix,proto3,oneof"`
}

type ProvisionDutRequest_DLCSpec

type ProvisionDutRequest_DLCSpec struct {
	// id is the DLC ID which is a unique identifier.
	// The DLC ID must follow a specific format that can be found in the DLC
	// developer doc below.
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Reference DLCs developer documentation: https://source.corp.google.com/chromeos_public/src/platform2/dlcservice/docs/developer.md

func (*ProvisionDutRequest_DLCSpec) Descriptor

func (*ProvisionDutRequest_DLCSpec) Descriptor() ([]byte, []int)

func (*ProvisionDutRequest_DLCSpec) GetId

func (*ProvisionDutRequest_DLCSpec) ProtoMessage

func (*ProvisionDutRequest_DLCSpec) ProtoMessage()

func (*ProvisionDutRequest_DLCSpec) Reset

func (m *ProvisionDutRequest_DLCSpec) Reset()

func (*ProvisionDutRequest_DLCSpec) String

func (m *ProvisionDutRequest_DLCSpec) String() string

func (*ProvisionDutRequest_DLCSpec) XXX_DiscardUnknown

func (m *ProvisionDutRequest_DLCSpec) XXX_DiscardUnknown()

func (*ProvisionDutRequest_DLCSpec) XXX_Marshal

func (m *ProvisionDutRequest_DLCSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProvisionDutRequest_DLCSpec) XXX_Merge

func (m *ProvisionDutRequest_DLCSpec) XXX_Merge(src proto.Message)

func (*ProvisionDutRequest_DLCSpec) XXX_Size

func (m *ProvisionDutRequest_DLCSpec) XXX_Size() int

func (*ProvisionDutRequest_DLCSpec) XXX_Unmarshal

func (m *ProvisionDutRequest_DLCSpec) XXX_Unmarshal(b []byte) error

type ProvisionDutResponse

type ProvisionDutResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ProvisionDutResponse) Descriptor

func (*ProvisionDutResponse) Descriptor() ([]byte, []int)

func (*ProvisionDutResponse) ProtoMessage

func (*ProvisionDutResponse) ProtoMessage()

func (*ProvisionDutResponse) Reset

func (m *ProvisionDutResponse) Reset()

func (*ProvisionDutResponse) String

func (m *ProvisionDutResponse) String() string

func (*ProvisionDutResponse) XXX_DiscardUnknown

func (m *ProvisionDutResponse) XXX_DiscardUnknown()

func (*ProvisionDutResponse) XXX_Marshal

func (m *ProvisionDutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProvisionDutResponse) XXX_Merge

func (m *ProvisionDutResponse) XXX_Merge(src proto.Message)

func (*ProvisionDutResponse) XXX_Size

func (m *ProvisionDutResponse) XXX_Size() int

func (*ProvisionDutResponse) XXX_Unmarshal

func (m *ProvisionDutResponse) XXX_Unmarshal(b []byte) error

type ProvisionDutResponse_Reason

type ProvisionDutResponse_Reason int32

When the status code is other than OK, details in Status message should be parsed for ErrorInfo message with the following Reasons as the reason.

const (
	// status code: INVALID_ARGUMENT
	ProvisionDutResponse_REASON_INVALID_REQUEST ProvisionDutResponse_Reason = 0
	// status code: FAILED_PRECONDITION
	ProvisionDutResponse_REASON_DUT_UNREACHABLE_PRE_PROVISION ProvisionDutResponse_Reason = 1
	// status code: FAILED_PRECONDITION
	ProvisionDutResponse_REASON_DOWNLOADING_IMAGE_FAILED ProvisionDutResponse_Reason = 2
	// status code: DEADLINE_EXCEEDED
	ProvisionDutResponse_REASON_PROVISIONING_TIMEDOUT ProvisionDutResponse_Reason = 3
	// status code: ABORTED
	ProvisionDutResponse_REASON_PROVISIONING_FAILED ProvisionDutResponse_Reason = 4
	// status code: ABORTED
	ProvisionDutResponse_REASON_DUT_UNREACHABLE_POST_PROVISION ProvisionDutResponse_Reason = 5
	// status code: ABORTED
	ProvisionDutResponse_REASON_UPDATE_FIRMWARE_FAILED ProvisionDutResponse_Reason = 6
	// status code: ABORTED
	ProvisionDutResponse_REASON_FIRMWARE_MISMATCH_POST_FIRMWARE_UPDATE ProvisionDutResponse_Reason = 7
	// status code: ABORTED
	ProvisionDutResponse_REASON_DUT_UNREACHABLE_POST_FIRMWARE_UPDATE ProvisionDutResponse_Reason = 8
)

func (ProvisionDutResponse_Reason) EnumDescriptor

func (ProvisionDutResponse_Reason) EnumDescriptor() ([]byte, []int)

func (ProvisionDutResponse_Reason) String

type ProvisionLacrosMetadata

type ProvisionLacrosMetadata struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ProvisionLacrosMetadata) Descriptor

func (*ProvisionLacrosMetadata) Descriptor() ([]byte, []int)

func (*ProvisionLacrosMetadata) ProtoMessage

func (*ProvisionLacrosMetadata) ProtoMessage()

func (*ProvisionLacrosMetadata) Reset

func (m *ProvisionLacrosMetadata) Reset()

func (*ProvisionLacrosMetadata) String

func (m *ProvisionLacrosMetadata) String() string

func (*ProvisionLacrosMetadata) XXX_DiscardUnknown

func (m *ProvisionLacrosMetadata) XXX_DiscardUnknown()

func (*ProvisionLacrosMetadata) XXX_Marshal

func (m *ProvisionLacrosMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProvisionLacrosMetadata) XXX_Merge

func (m *ProvisionLacrosMetadata) XXX_Merge(src proto.Message)

func (*ProvisionLacrosMetadata) XXX_Size

func (m *ProvisionLacrosMetadata) XXX_Size() int

func (*ProvisionLacrosMetadata) XXX_Unmarshal

func (m *ProvisionLacrosMetadata) XXX_Unmarshal(b []byte) error

type ProvisionLacrosRequest

type ProvisionLacrosRequest struct {
	// name is the resource name for the DUT.
	// The DUT name is passed to the RTD when the RTD is started.
	// It is not specified whether the name is the DUT hostname.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// image specifies the Lacros image with which to provision the DUT.
	Image *ProvisionLacrosRequest_LacrosImage `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"`
	// override_version is the Lacros version string used to override when Lacros
	// is provisioned from the image source in the |LacrosImage| to the component
	// path. This is useful for simulating any desired version of Lacros for
	// autoupdate testing.
	// By default, if not specified, the actual version in the |LacrosImage| is
	// used.
	OverrideVersion string `protobuf:"bytes,3,opt,name=override_version,json=overrideVersion,proto3" json:"override_version,omitempty"`
	// override_install_path changes the install location from the default
	// imageloader component path.
	// If not specified, it defaults to the imageloader component path.
	OverrideInstallPath  string   `protobuf:"bytes,4,opt,name=override_install_path,json=overrideInstallPath,proto3" json:"override_install_path,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}
Example
package main

import (
	"context"
	"fmt"

	"github.com/golang/protobuf/ptypes/duration"
	rtd "go.chromium.org/chromiumos/config/go/api/test/rtd/v1"
	"go.chromium.org/chromiumos/config/go/api/test/tls"
	"go.chromium.org/chromiumos/config/go/api/test/tls/dependencies/longrunning"
	"google.golang.org/grpc"
)

func main() {
	var invocation rtd.Invocation

	tlsConfig := invocation.GetTestLabServicesConfig()
	dutName := invocation.GetDuts()[0].GetTlsDutName()

	conn, err := grpc.Dial(fmt.Sprintf("%s:%d", tlsConfig.GetTlwAddress(), tlsConfig.GetTlwPort()), grpc.WithInsecure())
	if err != nil {
		panic(err)
	}
	defer conn.Close()

	c := tls.NewCommonClient(conn)

	req := tls.ProvisionLacrosRequest{
		Name: dutName,
		Image: &tls.ProvisionLacrosRequest_LacrosImage{
			PathOneof: &tls.ProvisionLacrosRequest_LacrosImage_GsPathPrefix{
				GsPathPrefix: "gs://some/path",
			},
		},
	}

	ctx := context.Background()
	op, err := c.ProvisionLacros(ctx, &req)
	if err != nil {
		panic(err)
	}

	opcli := longrunning.NewOperationsClient(conn)
	op, err = opcli.WaitOperation(ctx, &longrunning.WaitOperationRequest{
		Name: op.GetName(),
		Timeout: &duration.Duration{
			Seconds: 3600,
		},
	})
	if err != nil {
		panic("RPC error")
	}

	if errStatus := op.GetError(); errStatus != nil {
		panic(fmt.Sprintf("Operation error details: %v", errStatus.GetDetails()))
	}

	// Provisioned Lacros.
}
Output:

func (*ProvisionLacrosRequest) Descriptor

func (*ProvisionLacrosRequest) Descriptor() ([]byte, []int)

func (*ProvisionLacrosRequest) GetImage

func (*ProvisionLacrosRequest) GetName

func (m *ProvisionLacrosRequest) GetName() string

func (*ProvisionLacrosRequest) GetOverrideInstallPath

func (m *ProvisionLacrosRequest) GetOverrideInstallPath() string

func (*ProvisionLacrosRequest) GetOverrideVersion

func (m *ProvisionLacrosRequest) GetOverrideVersion() string

func (*ProvisionLacrosRequest) ProtoMessage

func (*ProvisionLacrosRequest) ProtoMessage()

func (*ProvisionLacrosRequest) Reset

func (m *ProvisionLacrosRequest) Reset()

func (*ProvisionLacrosRequest) String

func (m *ProvisionLacrosRequest) String() string

func (*ProvisionLacrosRequest) XXX_DiscardUnknown

func (m *ProvisionLacrosRequest) XXX_DiscardUnknown()

func (*ProvisionLacrosRequest) XXX_Marshal

func (m *ProvisionLacrosRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProvisionLacrosRequest) XXX_Merge

func (m *ProvisionLacrosRequest) XXX_Merge(src proto.Message)

func (*ProvisionLacrosRequest) XXX_Size

func (m *ProvisionLacrosRequest) XXX_Size() int

func (*ProvisionLacrosRequest) XXX_Unmarshal

func (m *ProvisionLacrosRequest) XXX_Unmarshal(b []byte) error

type ProvisionLacrosRequest_LacrosImage

type ProvisionLacrosRequest_LacrosImage struct {
	// Types that are valid to be assigned to PathOneof:
	//	*ProvisionLacrosRequest_LacrosImage_GsPathPrefix
	//	*ProvisionLacrosRequest_LacrosImage_DeviceFilePrefix
	PathOneof            isProvisionLacrosRequest_LacrosImage_PathOneof `protobuf_oneof:"path_oneof"`
	XXX_NoUnkeyedLiteral struct{}                                       `json:"-"`
	XXX_unrecognized     []byte                                         `json:"-"`
	XXX_sizecache        int32                                          `json:"-"`
}

func (*ProvisionLacrosRequest_LacrosImage) Descriptor

func (*ProvisionLacrosRequest_LacrosImage) Descriptor() ([]byte, []int)

func (*ProvisionLacrosRequest_LacrosImage) GetDeviceFilePrefix

func (m *ProvisionLacrosRequest_LacrosImage) GetDeviceFilePrefix() string

func (*ProvisionLacrosRequest_LacrosImage) GetGsPathPrefix

func (m *ProvisionLacrosRequest_LacrosImage) GetGsPathPrefix() string

func (*ProvisionLacrosRequest_LacrosImage) GetPathOneof

func (m *ProvisionLacrosRequest_LacrosImage) GetPathOneof() isProvisionLacrosRequest_LacrosImage_PathOneof

func (*ProvisionLacrosRequest_LacrosImage) ProtoMessage

func (*ProvisionLacrosRequest_LacrosImage) ProtoMessage()

func (*ProvisionLacrosRequest_LacrosImage) Reset

func (*ProvisionLacrosRequest_LacrosImage) String

func (*ProvisionLacrosRequest_LacrosImage) XXX_DiscardUnknown

func (m *ProvisionLacrosRequest_LacrosImage) XXX_DiscardUnknown()

func (*ProvisionLacrosRequest_LacrosImage) XXX_Marshal

func (m *ProvisionLacrosRequest_LacrosImage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProvisionLacrosRequest_LacrosImage) XXX_Merge

func (*ProvisionLacrosRequest_LacrosImage) XXX_OneofWrappers

func (*ProvisionLacrosRequest_LacrosImage) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*ProvisionLacrosRequest_LacrosImage) XXX_Size

func (*ProvisionLacrosRequest_LacrosImage) XXX_Unmarshal

func (m *ProvisionLacrosRequest_LacrosImage) XXX_Unmarshal(b []byte) error

type ProvisionLacrosRequest_LacrosImage_DeviceFilePrefix

type ProvisionLacrosRequest_LacrosImage_DeviceFilePrefix struct {
	DeviceFilePrefix string `protobuf:"bytes,2,opt,name=device_file_prefix,json=deviceFilePrefix,proto3,oneof"`
}

type ProvisionLacrosRequest_LacrosImage_GsPathPrefix

type ProvisionLacrosRequest_LacrosImage_GsPathPrefix struct {
	GsPathPrefix string `protobuf:"bytes,1,opt,name=gs_path_prefix,json=gsPathPrefix,proto3,oneof"`
}

type ProvisionLacrosResponse

type ProvisionLacrosResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ProvisionLacrosResponse) Descriptor

func (*ProvisionLacrosResponse) Descriptor() ([]byte, []int)

func (*ProvisionLacrosResponse) ProtoMessage

func (*ProvisionLacrosResponse) ProtoMessage()

func (*ProvisionLacrosResponse) Reset

func (m *ProvisionLacrosResponse) Reset()

func (*ProvisionLacrosResponse) String

func (m *ProvisionLacrosResponse) String() string

func (*ProvisionLacrosResponse) XXX_DiscardUnknown

func (m *ProvisionLacrosResponse) XXX_DiscardUnknown()

func (*ProvisionLacrosResponse) XXX_Marshal

func (m *ProvisionLacrosResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProvisionLacrosResponse) XXX_Merge

func (m *ProvisionLacrosResponse) XXX_Merge(src proto.Message)

func (*ProvisionLacrosResponse) XXX_Size

func (m *ProvisionLacrosResponse) XXX_Size() int

func (*ProvisionLacrosResponse) XXX_Unmarshal

func (m *ProvisionLacrosResponse) XXX_Unmarshal(b []byte) error

type ProvisionLacrosResponse_Reason

type ProvisionLacrosResponse_Reason int32

When the status code is other than OK, details in Status message should be parsed for ErrorInfo message with the following Reasons as the reason.

const (
	// Failed as the ProvisionLacros request is invalid.
	ProvisionLacrosResponse_REASON_INVALID_REQUEST ProvisionLacrosResponse_Reason = 0
	// Failed to connect to the DUT prior to provisioning Lacros.
	ProvisionLacrosResponse_REASON_DUT_UNREACHABLE_PRE_PROVISION ProvisionLacrosResponse_Reason = 1
	// Failed to download the Lacros image or a timeout during download.
	ProvisionLacrosResponse_REASON_DOWNLOADING_IMAGE_FAILED ProvisionLacrosResponse_Reason = 2
	// Failed due to a timeout during the main Lacros provisioning.
	// Excludes timeout during other steps.
	ProvisionLacrosResponse_REASON_PROVISIONING_TIMEDOUT ProvisionLacrosResponse_Reason = 3
	// General failure in Lacros provisioning.
	ProvisionLacrosResponse_REASON_PROVISIONING_FAILED ProvisionLacrosResponse_Reason = 4
)

func (ProvisionLacrosResponse_Reason) EnumDescriptor

func (ProvisionLacrosResponse_Reason) EnumDescriptor() ([]byte, []int)

func (ProvisionLacrosResponse_Reason) String

type SetDutPowerSupplyRequest

type SetDutPowerSupplyRequest struct {
	Dut                  string                         `protobuf:"bytes,1,opt,name=dut,proto3" json:"dut,omitempty"`
	State                SetDutPowerSupplyRequest_State `` /* 131-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}                       `json:"-"`
	XXX_unrecognized     []byte                         `json:"-"`
	XXX_sizecache        int32                          `json:"-"`
}

func (*SetDutPowerSupplyRequest) Descriptor

func (*SetDutPowerSupplyRequest) Descriptor() ([]byte, []int)

func (*SetDutPowerSupplyRequest) GetDut

func (m *SetDutPowerSupplyRequest) GetDut() string

func (*SetDutPowerSupplyRequest) GetState

func (*SetDutPowerSupplyRequest) ProtoMessage

func (*SetDutPowerSupplyRequest) ProtoMessage()

func (*SetDutPowerSupplyRequest) Reset

func (m *SetDutPowerSupplyRequest) Reset()

func (*SetDutPowerSupplyRequest) String

func (m *SetDutPowerSupplyRequest) String() string

func (*SetDutPowerSupplyRequest) XXX_DiscardUnknown

func (m *SetDutPowerSupplyRequest) XXX_DiscardUnknown()

func (*SetDutPowerSupplyRequest) XXX_Marshal

func (m *SetDutPowerSupplyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SetDutPowerSupplyRequest) XXX_Merge

func (m *SetDutPowerSupplyRequest) XXX_Merge(src proto.Message)

func (*SetDutPowerSupplyRequest) XXX_Size

func (m *SetDutPowerSupplyRequest) XXX_Size() int

func (*SetDutPowerSupplyRequest) XXX_Unmarshal

func (m *SetDutPowerSupplyRequest) XXX_Unmarshal(b []byte) error

type SetDutPowerSupplyRequest_State

type SetDutPowerSupplyRequest_State int32
const (
	SetDutPowerSupplyRequest_STATE_UNKNOWN SetDutPowerSupplyRequest_State = 0
	SetDutPowerSupplyRequest_STATE_ON      SetDutPowerSupplyRequest_State = 1
	SetDutPowerSupplyRequest_STATE_OFF     SetDutPowerSupplyRequest_State = 2
)

func (SetDutPowerSupplyRequest_State) EnumDescriptor

func (SetDutPowerSupplyRequest_State) EnumDescriptor() ([]byte, []int)

func (SetDutPowerSupplyRequest_State) String

type SetDutPowerSupplyResponse

type SetDutPowerSupplyResponse struct {
	Status SetDutPowerSupplyResponse_Status `` /* 135-byte string literal not displayed */
	// reason provides human friendly context for any error status.
	Reason               string   `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SetDutPowerSupplyResponse) Descriptor

func (*SetDutPowerSupplyResponse) Descriptor() ([]byte, []int)

func (*SetDutPowerSupplyResponse) GetReason

func (m *SetDutPowerSupplyResponse) GetReason() string

func (*SetDutPowerSupplyResponse) GetStatus

func (*SetDutPowerSupplyResponse) ProtoMessage

func (*SetDutPowerSupplyResponse) ProtoMessage()

func (*SetDutPowerSupplyResponse) Reset

func (m *SetDutPowerSupplyResponse) Reset()

func (*SetDutPowerSupplyResponse) String

func (m *SetDutPowerSupplyResponse) String() string

func (*SetDutPowerSupplyResponse) XXX_DiscardUnknown

func (m *SetDutPowerSupplyResponse) XXX_DiscardUnknown()

func (*SetDutPowerSupplyResponse) XXX_Marshal

func (m *SetDutPowerSupplyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SetDutPowerSupplyResponse) XXX_Merge

func (m *SetDutPowerSupplyResponse) XXX_Merge(src proto.Message)

func (*SetDutPowerSupplyResponse) XXX_Size

func (m *SetDutPowerSupplyResponse) XXX_Size() int

func (*SetDutPowerSupplyResponse) XXX_Unmarshal

func (m *SetDutPowerSupplyResponse) XXX_Unmarshal(b []byte) error

type SetDutPowerSupplyResponse_Status

type SetDutPowerSupplyResponse_Status int32
const (
	SetDutPowerSupplyResponse_STATUS_UNKNOWN SetDutPowerSupplyResponse_Status = 0
	SetDutPowerSupplyResponse_STATUS_OK      SetDutPowerSupplyResponse_Status = 1
	// STATUS_BAD_DUT indicates that the DUT is not known,
	// or the caller does not have access to it.
	SetDutPowerSupplyResponse_STATUS_BAD_DUT SetDutPowerSupplyResponse_Status = 2
	// STATUS_BAD_REQUEST indicates that the request was invalid,
	// e.g., passing an invalid state.
	SetDutPowerSupplyResponse_STATUS_BAD_REQUEST SetDutPowerSupplyResponse_Status = 3
	SetDutPowerSupplyResponse_STATUS_NO_RPM      SetDutPowerSupplyResponse_Status = 4
	SetDutPowerSupplyResponse_STATUS_RPM_ERROR   SetDutPowerSupplyResponse_Status = 5
)

func (SetDutPowerSupplyResponse_Status) EnumDescriptor

func (SetDutPowerSupplyResponse_Status) EnumDescriptor() ([]byte, []int)

func (SetDutPowerSupplyResponse_Status) String

type UnimplementedCommonServer

type UnimplementedCommonServer struct {
}

UnimplementedCommonServer can be embedded to have forward compatible implementations.

func (*UnimplementedCommonServer) CreateFakeOmaha

func (*UnimplementedCommonServer) DeleteFakeOmaha

func (*UnimplementedCommonServer) ExecDutCommand

func (*UnimplementedCommonServer) FetchCrashes

func (*UnimplementedCommonServer) ProvisionAsh

func (*UnimplementedCommonServer) ProvisionDut

func (*UnimplementedCommonServer) ProvisionLacros

type UnimplementedWiringServer

type UnimplementedWiringServer struct {
}

UnimplementedWiringServer can be embedded to have forward compatible implementations.

func (*UnimplementedWiringServer) CacheForDut

func (*UnimplementedWiringServer) CallServo

func (*UnimplementedWiringServer) ExposePortToDut

func (*UnimplementedWiringServer) GetDut

func (*UnimplementedWiringServer) OpenDutPort

func (*UnimplementedWiringServer) SetDutPowerSupply

type WiringClient

type WiringClient interface {
	// GetDut gets a DUT resource, which contains various information
	// about a DUT.
	GetDut(ctx context.Context, in *GetDutRequest, opts ...grpc.CallOption) (*Dut, error)
	// Open a port on the DUT and return an address which the client can
	// use to connect to the port on the DUT.
	// The TLE SHOULD attempt to keep this address-to-port connection open for
	// the duration of the RTD's runtime.
	// The connection is not restarted if it is interrupted.
	//
	// If the connection from a previous call with the same arguments is
	// still open, this RPC SHOULD do nothing and return the same
	// response.
	// If the previous connection was closed, the implementation SHOULD
	// attempt to rebind and return the same address.
	// If the implementation lost and cannot reobtain the previous
	// address, it MAY return a new address.
	//
	// This RPC does NOT ensure that there is a service running on the
	// DUT for the given port.
	// A service running on the given port MUST NOT required for this RPC
	// to succeed.
	// It is not specified whether this RPC will open the given port in
	// the DUT's firewall, if the DUT has a firewall.
	OpenDutPort(ctx context.Context, in *OpenDutPortRequest, opts ...grpc.CallOption) (*OpenDutPortResponse, error)
	// SetDutPowerSupply sets the connected power state for the DUT.  It is
	// the caller's responsibility to wait for the effects of the call
	// to propagate, e.g. waiting in between calls to set the power OFF
	// and ON.
	//
	// EXPERIMENTAL
	SetDutPowerSupply(ctx context.Context, in *SetDutPowerSupplyRequest, opts ...grpc.CallOption) (*SetDutPowerSupplyResponse, error)
	// CacheForDut caches some data to be accessible for the DUT.
	// This will be made available to the DUT via a returned URL.
	// The implementation MUST ensure the returned URL is usable at least for the
	// lifetime of the RTD invocation.
	CacheForDut(ctx context.Context, in *CacheForDutRequest, opts ...grpc.CallOption) (*longrunning.Operation, error)
	// CallServo performs an XML-RPC call against the servod for
	// the servo connected to a DUT.
	//
	// The implementation, not the caller, ensures that there is a
	// running servod instance for the DUT's servo, or is otherwise able
	// to provide identical functionality.
	//
	// This RPC mirrors the XML-RPC specification (http://xmlrpc.com/spec.md).
	CallServo(ctx context.Context, in *CallServoRequest, opts ...grpc.CallOption) (*CallServoResponse, error)
	// ExposePortToDut exposes an RTD port to the specified DUT.
	//
	// The TLE SHOULD attempt to keep this address-to-port connection open for
	// the duration of the RTD's runtime.
	// The connection is not restarted if it is interrupted.
	// By default, the implementation MAY expose a port that cannot persist
	// across DUT reboots.
	// By default, the implementation MAY use 'localhost' as the exposed address.
	ExposePortToDut(ctx context.Context, in *ExposePortToDutRequest, opts ...grpc.CallOption) (*ExposePortToDutResponse, error)
}

WiringClient is the client API for Wiring service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewWiringClient

func NewWiringClient(cc *grpc.ClientConn) WiringClient

type WiringServer

type WiringServer interface {
	// GetDut gets a DUT resource, which contains various information
	// about a DUT.
	GetDut(context.Context, *GetDutRequest) (*Dut, error)
	// Open a port on the DUT and return an address which the client can
	// use to connect to the port on the DUT.
	// The TLE SHOULD attempt to keep this address-to-port connection open for
	// the duration of the RTD's runtime.
	// The connection is not restarted if it is interrupted.
	//
	// If the connection from a previous call with the same arguments is
	// still open, this RPC SHOULD do nothing and return the same
	// response.
	// If the previous connection was closed, the implementation SHOULD
	// attempt to rebind and return the same address.
	// If the implementation lost and cannot reobtain the previous
	// address, it MAY return a new address.
	//
	// This RPC does NOT ensure that there is a service running on the
	// DUT for the given port.
	// A service running on the given port MUST NOT required for this RPC
	// to succeed.
	// It is not specified whether this RPC will open the given port in
	// the DUT's firewall, if the DUT has a firewall.
	OpenDutPort(context.Context, *OpenDutPortRequest) (*OpenDutPortResponse, error)
	// SetDutPowerSupply sets the connected power state for the DUT.  It is
	// the caller's responsibility to wait for the effects of the call
	// to propagate, e.g. waiting in between calls to set the power OFF
	// and ON.
	//
	// EXPERIMENTAL
	SetDutPowerSupply(context.Context, *SetDutPowerSupplyRequest) (*SetDutPowerSupplyResponse, error)
	// CacheForDut caches some data to be accessible for the DUT.
	// This will be made available to the DUT via a returned URL.
	// The implementation MUST ensure the returned URL is usable at least for the
	// lifetime of the RTD invocation.
	CacheForDut(context.Context, *CacheForDutRequest) (*longrunning.Operation, error)
	// CallServo performs an XML-RPC call against the servod for
	// the servo connected to a DUT.
	//
	// The implementation, not the caller, ensures that there is a
	// running servod instance for the DUT's servo, or is otherwise able
	// to provide identical functionality.
	//
	// This RPC mirrors the XML-RPC specification (http://xmlrpc.com/spec.md).
	CallServo(context.Context, *CallServoRequest) (*CallServoResponse, error)
	// ExposePortToDut exposes an RTD port to the specified DUT.
	//
	// The TLE SHOULD attempt to keep this address-to-port connection open for
	// the duration of the RTD's runtime.
	// The connection is not restarted if it is interrupted.
	// By default, the implementation MAY expose a port that cannot persist
	// across DUT reboots.
	// By default, the implementation MAY use 'localhost' as the exposed address.
	ExposePortToDut(context.Context, *ExposePortToDutRequest) (*ExposePortToDutResponse, error)
}

WiringServer is the server API for Wiring service.

Directories

Path Synopsis
dependencies

Jump to

Keyboard shortcuts

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