config: go.chromium.org/chromiumos/config/go/api/test/tls Index | Examples | Files | Directories

package tls

import "go.chromium.org/chromiumos/config/go/api/test/tls"

Index

Examples

Package Files

common.pb.go wiring.pb.go

Variables

var CallServoXmlRpcResponse_Status_name = map[int32]string{
    0:  "STATUS_UNKNOWN",
    1:  "STATUS_OK",
    2:  "STATUS_BAD_DUT",
    3:  "STATUS_NO_METHOD",
    4:  "STATUS_NO_SERVO",
    5:  "STATUS_SERVO_ERROR",
}
var CallServoXmlRpcResponse_Status_value = map[string]int32{
    "STATUS_UNKNOWN":     0,
    "STATUS_OK":          1,
    "STATUS_BAD_DUT":     2,
    "STATUS_NO_METHOD":   3,
    "STATUS_NO_SERVO":    4,
    "STATUS_SERVO_ERROR": 5,
}
var Output_name = map[int32]string{
    0:  "OUTPUT_PIPE",
    1:  "OUTPUT_STDOUT",
}
var Output_value = map[string]int32{
    "OUTPUT_PIPE":   0,
    "OUTPUT_STDOUT": 1,
}
var ProvisionResponse_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",
}
var ProvisionResponse_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,
}
var SetDutPowerSupplyRequest_State_name = map[int32]string{
    0:  "STATE_UNKNOWN",
    1:  "STATE_ON",
    2:  "STATE_OFF",
}
var SetDutPowerSupplyRequest_State_value = map[string]int32{
    "STATE_UNKNOWN": 0,
    "STATE_ON":      1,
    "STATE_OFF":     2,
}
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",
}
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,
}

func RegisterCommonServer Uses

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

func RegisterWiringServer Uses

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

type CacheForDutMetadata Uses

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

func (*CacheForDutMetadata) Descriptor Uses

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

func (*CacheForDutMetadata) ProtoMessage Uses

func (*CacheForDutMetadata) ProtoMessage()

func (*CacheForDutMetadata) Reset Uses

func (m *CacheForDutMetadata) Reset()

func (*CacheForDutMetadata) String Uses

func (m *CacheForDutMetadata) String() string

func (*CacheForDutMetadata) XXX_DiscardUnknown Uses

func (m *CacheForDutMetadata) XXX_DiscardUnknown()

func (*CacheForDutMetadata) XXX_Marshal Uses

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

func (*CacheForDutMetadata) XXX_Merge Uses

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

func (*CacheForDutMetadata) XXX_Size Uses

func (m *CacheForDutMetadata) XXX_Size() int

func (*CacheForDutMetadata) XXX_Unmarshal Uses

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

type CacheForDutRequest Uses

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.
    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:"-"`
}

Code:

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

func (*CacheForDutRequest) Descriptor Uses

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

func (*CacheForDutRequest) GetDutName Uses

func (m *CacheForDutRequest) GetDutName() string

func (*CacheForDutRequest) GetUrl Uses

func (m *CacheForDutRequest) GetUrl() string

func (*CacheForDutRequest) ProtoMessage Uses

func (*CacheForDutRequest) ProtoMessage()

func (*CacheForDutRequest) Reset Uses

func (m *CacheForDutRequest) Reset()

func (*CacheForDutRequest) String Uses

func (m *CacheForDutRequest) String() string

func (*CacheForDutRequest) XXX_DiscardUnknown Uses

func (m *CacheForDutRequest) XXX_DiscardUnknown()

func (*CacheForDutRequest) XXX_Marshal Uses

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

func (*CacheForDutRequest) XXX_Merge Uses

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

func (*CacheForDutRequest) XXX_Size Uses

func (m *CacheForDutRequest) XXX_Size() int

func (*CacheForDutRequest) XXX_Unmarshal Uses

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

type CacheForDutResponse Uses

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 Uses

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

func (*CacheForDutResponse) GetUrl Uses

func (m *CacheForDutResponse) GetUrl() string

func (*CacheForDutResponse) ProtoMessage Uses

func (*CacheForDutResponse) ProtoMessage()

func (*CacheForDutResponse) Reset Uses

func (m *CacheForDutResponse) Reset()

func (*CacheForDutResponse) String Uses

func (m *CacheForDutResponse) String() string

func (*CacheForDutResponse) XXX_DiscardUnknown Uses

func (m *CacheForDutResponse) XXX_DiscardUnknown()

func (*CacheForDutResponse) XXX_Marshal Uses

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

func (*CacheForDutResponse) XXX_Merge Uses

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

func (*CacheForDutResponse) XXX_Size Uses

func (m *CacheForDutResponse) XXX_Size() int

func (*CacheForDutResponse) XXX_Unmarshal Uses

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

type CallServoXmlRpcRequest Uses

type CallServoXmlRpcRequest 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 (*CallServoXmlRpcRequest) Descriptor Uses

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

func (*CallServoXmlRpcRequest) GetArgs Uses

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

func (*CallServoXmlRpcRequest) GetDut Uses

func (m *CallServoXmlRpcRequest) GetDut() string

func (*CallServoXmlRpcRequest) GetMethod Uses

func (m *CallServoXmlRpcRequest) GetMethod() string

func (*CallServoXmlRpcRequest) ProtoMessage Uses

func (*CallServoXmlRpcRequest) ProtoMessage()

func (*CallServoXmlRpcRequest) Reset Uses

func (m *CallServoXmlRpcRequest) Reset()

func (*CallServoXmlRpcRequest) String Uses

func (m *CallServoXmlRpcRequest) String() string

func (*CallServoXmlRpcRequest) XXX_DiscardUnknown Uses

func (m *CallServoXmlRpcRequest) XXX_DiscardUnknown()

func (*CallServoXmlRpcRequest) XXX_Marshal Uses

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

func (*CallServoXmlRpcRequest) XXX_Merge Uses

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

func (*CallServoXmlRpcRequest) XXX_Size Uses

func (m *CallServoXmlRpcRequest) XXX_Size() int

func (*CallServoXmlRpcRequest) XXX_Unmarshal Uses

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

type CallServoXmlRpcResponse Uses

type CallServoXmlRpcResponse struct {
    Status CallServoXmlRpcResponse_Status `protobuf:"varint,1,opt,name=status,proto3,enum=chromiumos.config.api.test.tls.CallServoXmlRpcResponse_Status" json:"status,omitempty"`
    Value  *xmlrpc.Value                  `protobuf:"bytes,2,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,3,opt,name=fault,proto3" json:"fault,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*CallServoXmlRpcResponse) Descriptor Uses

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

func (*CallServoXmlRpcResponse) GetFault Uses

func (m *CallServoXmlRpcResponse) GetFault() bool

func (*CallServoXmlRpcResponse) GetStatus Uses

func (m *CallServoXmlRpcResponse) GetStatus() CallServoXmlRpcResponse_Status

func (*CallServoXmlRpcResponse) GetValue Uses

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

func (*CallServoXmlRpcResponse) ProtoMessage Uses

func (*CallServoXmlRpcResponse) ProtoMessage()

func (*CallServoXmlRpcResponse) Reset Uses

func (m *CallServoXmlRpcResponse) Reset()

func (*CallServoXmlRpcResponse) String Uses

func (m *CallServoXmlRpcResponse) String() string

func (*CallServoXmlRpcResponse) XXX_DiscardUnknown Uses

func (m *CallServoXmlRpcResponse) XXX_DiscardUnknown()

func (*CallServoXmlRpcResponse) XXX_Marshal Uses

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

func (*CallServoXmlRpcResponse) XXX_Merge Uses

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

func (*CallServoXmlRpcResponse) XXX_Size Uses

func (m *CallServoXmlRpcResponse) XXX_Size() int

func (*CallServoXmlRpcResponse) XXX_Unmarshal Uses

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

type CallServoXmlRpcResponse_Status Uses

type CallServoXmlRpcResponse_Status int32
const (
    CallServoXmlRpcResponse_STATUS_UNKNOWN CallServoXmlRpcResponse_Status = 0
    CallServoXmlRpcResponse_STATUS_OK      CallServoXmlRpcResponse_Status = 1
    // STATUS_BAD_DUT indicates that the DUT is not known,
    // or the caller does not have access to it.
    CallServoXmlRpcResponse_STATUS_BAD_DUT CallServoXmlRpcResponse_Status = 2
    // STATUS_NO_METHOD indicates that the requested method does not
    // exist.
    CallServoXmlRpcResponse_STATUS_NO_METHOD   CallServoXmlRpcResponse_Status = 3
    CallServoXmlRpcResponse_STATUS_NO_SERVO    CallServoXmlRpcResponse_Status = 4
    CallServoXmlRpcResponse_STATUS_SERVO_ERROR CallServoXmlRpcResponse_Status = 5
)

func (CallServoXmlRpcResponse_Status) EnumDescriptor Uses

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

func (CallServoXmlRpcResponse_Status) String Uses

func (x CallServoXmlRpcResponse_Status) String() string

type CommonClient Uses

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)
    // Provision 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.
    Provision(ctx context.Context, in *ProvisionRequest, 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)
}

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 Uses

func NewCommonClient(cc *grpc.ClientConn) CommonClient

type CommonServer Uses

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
    // Provision 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.
    Provision(context.Context, *ProvisionRequest) (*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
}

CommonServer is the server API for Common service.

type Common_ExecDutCommandClient Uses

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

type Common_ExecDutCommandServer Uses

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

type Common_FetchCrashesClient Uses

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

type Common_FetchCrashesServer Uses

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

type CrashBlob Uses

type CrashBlob 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 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"`
    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 Uses

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

func (*CrashBlob) GetBlob Uses

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

func (*CrashBlob) GetKey Uses

func (m *CrashBlob) GetKey() string

func (*CrashBlob) ProtoMessage Uses

func (*CrashBlob) ProtoMessage()

func (*CrashBlob) Reset Uses

func (m *CrashBlob) Reset()

func (*CrashBlob) String Uses

func (m *CrashBlob) String() string

func (*CrashBlob) XXX_DiscardUnknown Uses

func (m *CrashBlob) XXX_DiscardUnknown()

func (*CrashBlob) XXX_Marshal Uses

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

func (*CrashBlob) XXX_Merge Uses

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

func (*CrashBlob) XXX_Size Uses

func (m *CrashBlob) XXX_Size() int

func (*CrashBlob) XXX_Unmarshal Uses

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

type CrashInfo Uses

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 `protobuf:"bytes,5,opt,name=in_progress_integration_test,json=inProgressIntegrationTest,proto3" json:"in_progress_integration_test,omitempty"`
    // 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 Uses

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

func (*CrashInfo) GetCollector Uses

func (m *CrashInfo) GetCollector() string

func (*CrashInfo) GetExecName Uses

func (m *CrashInfo) GetExecName() string

func (*CrashInfo) GetFields Uses

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

func (*CrashInfo) GetInProgressIntegrationTest Uses

func (m *CrashInfo) GetInProgressIntegrationTest() string

func (*CrashInfo) GetProd Uses

func (m *CrashInfo) GetProd() string

func (*CrashInfo) GetSig Uses

func (m *CrashInfo) GetSig() string

func (*CrashInfo) GetVer Uses

func (m *CrashInfo) GetVer() string

func (*CrashInfo) ProtoMessage Uses

func (*CrashInfo) ProtoMessage()

func (*CrashInfo) Reset Uses

func (m *CrashInfo) Reset()

func (*CrashInfo) String Uses

func (m *CrashInfo) String() string

func (*CrashInfo) XXX_DiscardUnknown Uses

func (m *CrashInfo) XXX_DiscardUnknown()

func (*CrashInfo) XXX_Marshal Uses

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

func (*CrashInfo) XXX_Merge Uses

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

func (*CrashInfo) XXX_Size Uses

func (m *CrashInfo) XXX_Size() int

func (*CrashInfo) XXX_Unmarshal Uses

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

type CrashMetadata Uses

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 Uses

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

func (*CrashMetadata) GetKey Uses

func (m *CrashMetadata) GetKey() string

func (*CrashMetadata) GetText Uses

func (m *CrashMetadata) GetText() string

func (*CrashMetadata) ProtoMessage Uses

func (*CrashMetadata) ProtoMessage()

func (*CrashMetadata) Reset Uses

func (m *CrashMetadata) Reset()

func (*CrashMetadata) String Uses

func (m *CrashMetadata) String() string

func (*CrashMetadata) XXX_DiscardUnknown Uses

func (m *CrashMetadata) XXX_DiscardUnknown()

func (*CrashMetadata) XXX_Marshal Uses

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

func (*CrashMetadata) XXX_Merge Uses

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

func (*CrashMetadata) XXX_Size Uses

func (m *CrashMetadata) XXX_Size() int

func (*CrashMetadata) XXX_Unmarshal Uses

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

type ExecDutCommandRequest Uses

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:"-"`
}

Code:

// 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

func (*ExecDutCommandRequest) Descriptor Uses

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

func (*ExecDutCommandRequest) GetArgs Uses

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

func (*ExecDutCommandRequest) GetCommand Uses

func (m *ExecDutCommandRequest) GetCommand() string

func (*ExecDutCommandRequest) GetName Uses

func (m *ExecDutCommandRequest) GetName() string

func (*ExecDutCommandRequest) GetStderr Uses

func (m *ExecDutCommandRequest) GetStderr() Output

func (*ExecDutCommandRequest) GetStdin Uses

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

func (*ExecDutCommandRequest) GetStdout Uses

func (m *ExecDutCommandRequest) GetStdout() Output

func (*ExecDutCommandRequest) ProtoMessage Uses

func (*ExecDutCommandRequest) ProtoMessage()

func (*ExecDutCommandRequest) Reset Uses

func (m *ExecDutCommandRequest) Reset()

func (*ExecDutCommandRequest) String Uses

func (m *ExecDutCommandRequest) String() string

func (*ExecDutCommandRequest) XXX_DiscardUnknown Uses

func (m *ExecDutCommandRequest) XXX_DiscardUnknown()

func (*ExecDutCommandRequest) XXX_Marshal Uses

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

func (*ExecDutCommandRequest) XXX_Merge Uses

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

func (*ExecDutCommandRequest) XXX_Size Uses

func (m *ExecDutCommandRequest) XXX_Size() int

func (*ExecDutCommandRequest) XXX_Unmarshal Uses

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

type ExecDutCommandResponse Uses

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 Uses

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

func (*ExecDutCommandResponse) GetExitInfo Uses

func (m *ExecDutCommandResponse) GetExitInfo() *ExecDutCommandResponse_ExitInfo

func (*ExecDutCommandResponse) GetStderr Uses

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

func (*ExecDutCommandResponse) GetStdout Uses

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

func (*ExecDutCommandResponse) ProtoMessage Uses

func (*ExecDutCommandResponse) ProtoMessage()

func (*ExecDutCommandResponse) Reset Uses

func (m *ExecDutCommandResponse) Reset()

func (*ExecDutCommandResponse) String Uses

func (m *ExecDutCommandResponse) String() string

func (*ExecDutCommandResponse) XXX_DiscardUnknown Uses

func (m *ExecDutCommandResponse) XXX_DiscardUnknown()

func (*ExecDutCommandResponse) XXX_Marshal Uses

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

func (*ExecDutCommandResponse) XXX_Merge Uses

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

func (*ExecDutCommandResponse) XXX_Size Uses

func (m *ExecDutCommandResponse) XXX_Size() int

func (*ExecDutCommandResponse) XXX_Unmarshal Uses

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

type ExecDutCommandResponse_ExitInfo Uses

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 Uses

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

func (*ExecDutCommandResponse_ExitInfo) GetErrorMessage Uses

func (m *ExecDutCommandResponse_ExitInfo) GetErrorMessage() string

func (*ExecDutCommandResponse_ExitInfo) GetSignaled Uses

func (m *ExecDutCommandResponse_ExitInfo) GetSignaled() bool

func (*ExecDutCommandResponse_ExitInfo) GetStarted Uses

func (m *ExecDutCommandResponse_ExitInfo) GetStarted() bool

func (*ExecDutCommandResponse_ExitInfo) GetStatus Uses

func (m *ExecDutCommandResponse_ExitInfo) GetStatus() int32

func (*ExecDutCommandResponse_ExitInfo) ProtoMessage Uses

func (*ExecDutCommandResponse_ExitInfo) ProtoMessage()

func (*ExecDutCommandResponse_ExitInfo) Reset Uses

func (m *ExecDutCommandResponse_ExitInfo) Reset()

func (*ExecDutCommandResponse_ExitInfo) String Uses

func (m *ExecDutCommandResponse_ExitInfo) String() string

func (*ExecDutCommandResponse_ExitInfo) XXX_DiscardUnknown Uses

func (m *ExecDutCommandResponse_ExitInfo) XXX_DiscardUnknown()

func (*ExecDutCommandResponse_ExitInfo) XXX_Marshal Uses

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

func (*ExecDutCommandResponse_ExitInfo) XXX_Merge Uses

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

func (*ExecDutCommandResponse_ExitInfo) XXX_Size Uses

func (m *ExecDutCommandResponse_ExitInfo) XXX_Size() int

func (*ExecDutCommandResponse_ExitInfo) XXX_Unmarshal Uses

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

type ExposePortToDutRequest Uses

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.
    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:"-"`
}

Code:

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)})

func (*ExposePortToDutRequest) Descriptor Uses

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

func (*ExposePortToDutRequest) GetDutName Uses

func (m *ExposePortToDutRequest) GetDutName() string

func (*ExposePortToDutRequest) GetLocalPort Uses

func (m *ExposePortToDutRequest) GetLocalPort() int32

func (*ExposePortToDutRequest) GetRequireRemoteProxy Uses

func (m *ExposePortToDutRequest) GetRequireRemoteProxy() bool

func (*ExposePortToDutRequest) ProtoMessage Uses

func (*ExposePortToDutRequest) ProtoMessage()

func (*ExposePortToDutRequest) Reset Uses

func (m *ExposePortToDutRequest) Reset()

func (*ExposePortToDutRequest) String Uses

func (m *ExposePortToDutRequest) String() string

func (*ExposePortToDutRequest) XXX_DiscardUnknown Uses

func (m *ExposePortToDutRequest) XXX_DiscardUnknown()

func (*ExposePortToDutRequest) XXX_Marshal Uses

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

func (*ExposePortToDutRequest) XXX_Merge Uses

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

func (*ExposePortToDutRequest) XXX_Size Uses

func (m *ExposePortToDutRequest) XXX_Size() int

func (*ExposePortToDutRequest) XXX_Unmarshal Uses

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

type ExposePortToDutResponse Uses

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 Uses

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

func (*ExposePortToDutResponse) GetExposedAddress Uses

func (m *ExposePortToDutResponse) GetExposedAddress() string

func (*ExposePortToDutResponse) GetExposedPort Uses

func (m *ExposePortToDutResponse) GetExposedPort() int32

func (*ExposePortToDutResponse) ProtoMessage Uses

func (*ExposePortToDutResponse) ProtoMessage()

func (*ExposePortToDutResponse) Reset Uses

func (m *ExposePortToDutResponse) Reset()

func (*ExposePortToDutResponse) String Uses

func (m *ExposePortToDutResponse) String() string

func (*ExposePortToDutResponse) XXX_DiscardUnknown Uses

func (m *ExposePortToDutResponse) XXX_DiscardUnknown()

func (*ExposePortToDutResponse) XXX_Marshal Uses

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

func (*ExposePortToDutResponse) XXX_Merge Uses

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

func (*ExposePortToDutResponse) XXX_Size Uses

func (m *ExposePortToDutResponse) XXX_Size() int

func (*ExposePortToDutResponse) XXX_Unmarshal Uses

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

type FetchCrashesRequest Uses

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:"-"`
}

Code:

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))
    }
}

func (*FetchCrashesRequest) Descriptor Uses

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

func (*FetchCrashesRequest) GetDut Uses

func (m *FetchCrashesRequest) GetDut() string

func (*FetchCrashesRequest) GetFetchCore Uses

func (m *FetchCrashesRequest) GetFetchCore() bool

func (*FetchCrashesRequest) ProtoMessage Uses

func (*FetchCrashesRequest) ProtoMessage()

func (*FetchCrashesRequest) Reset Uses

func (m *FetchCrashesRequest) Reset()

func (*FetchCrashesRequest) String Uses

func (m *FetchCrashesRequest) String() string

func (*FetchCrashesRequest) XXX_DiscardUnknown Uses

func (m *FetchCrashesRequest) XXX_DiscardUnknown()

func (*FetchCrashesRequest) XXX_Marshal Uses

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

func (*FetchCrashesRequest) XXX_Merge Uses

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

func (*FetchCrashesRequest) XXX_Size Uses

func (m *FetchCrashesRequest) XXX_Size() int

func (*FetchCrashesRequest) XXX_Unmarshal Uses

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

type FetchCrashesResponse Uses

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 (and blob.key, if present). Additional crashes may be reported in the same stream with a new crash ID.

func (*FetchCrashesResponse) Descriptor Uses

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

func (*FetchCrashesResponse) GetBlob Uses

func (m *FetchCrashesResponse) GetBlob() *CrashBlob

func (*FetchCrashesResponse) GetCore Uses

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

func (*FetchCrashesResponse) GetCrash Uses

func (m *FetchCrashesResponse) GetCrash() *CrashInfo

func (*FetchCrashesResponse) GetCrashId Uses

func (m *FetchCrashesResponse) GetCrashId() int64

func (*FetchCrashesResponse) GetData Uses

func (m *FetchCrashesResponse) GetData() isFetchCrashesResponse_Data

func (*FetchCrashesResponse) ProtoMessage Uses

func (*FetchCrashesResponse) ProtoMessage()

func (*FetchCrashesResponse) Reset Uses

func (m *FetchCrashesResponse) Reset()

func (*FetchCrashesResponse) String Uses

func (m *FetchCrashesResponse) String() string

func (*FetchCrashesResponse) XXX_DiscardUnknown Uses

func (m *FetchCrashesResponse) XXX_DiscardUnknown()

func (*FetchCrashesResponse) XXX_Marshal Uses

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

func (*FetchCrashesResponse) XXX_Merge Uses

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

func (*FetchCrashesResponse) XXX_OneofWrappers Uses

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

XXX_OneofWrappers is for the internal use of the proto package.

func (*FetchCrashesResponse) XXX_Size Uses

func (m *FetchCrashesResponse) XXX_Size() int

func (*FetchCrashesResponse) XXX_Unmarshal Uses

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

type FetchCrashesResponse_Blob Uses

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

type FetchCrashesResponse_Core Uses

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

type FetchCrashesResponse_Crash Uses

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

type OpenDutPortRequest Uses

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 Uses

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

func (*OpenDutPortRequest) GetName Uses

func (m *OpenDutPortRequest) GetName() string

func (*OpenDutPortRequest) GetPort Uses

func (m *OpenDutPortRequest) GetPort() int32

func (*OpenDutPortRequest) ProtoMessage Uses

func (*OpenDutPortRequest) ProtoMessage()

func (*OpenDutPortRequest) Reset Uses

func (m *OpenDutPortRequest) Reset()

func (*OpenDutPortRequest) String Uses

func (m *OpenDutPortRequest) String() string

func (*OpenDutPortRequest) XXX_DiscardUnknown Uses

func (m *OpenDutPortRequest) XXX_DiscardUnknown()

func (*OpenDutPortRequest) XXX_Marshal Uses

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

func (*OpenDutPortRequest) XXX_Merge Uses

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

func (*OpenDutPortRequest) XXX_Size Uses

func (m *OpenDutPortRequest) XXX_Size() int

func (*OpenDutPortRequest) XXX_Unmarshal Uses

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

type OpenDutPortResponse Uses

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 Uses

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

func (*OpenDutPortResponse) GetAddress Uses

func (m *OpenDutPortResponse) GetAddress() string

func (*OpenDutPortResponse) GetPort Uses

func (m *OpenDutPortResponse) GetPort() int32

func (*OpenDutPortResponse) ProtoMessage Uses

func (*OpenDutPortResponse) ProtoMessage()

func (*OpenDutPortResponse) Reset Uses

func (m *OpenDutPortResponse) Reset()

func (*OpenDutPortResponse) String Uses

func (m *OpenDutPortResponse) String() string

func (*OpenDutPortResponse) XXX_DiscardUnknown Uses

func (m *OpenDutPortResponse) XXX_DiscardUnknown()

func (*OpenDutPortResponse) XXX_Marshal Uses

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

func (*OpenDutPortResponse) XXX_Merge Uses

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

func (*OpenDutPortResponse) XXX_Size Uses

func (m *OpenDutPortResponse) XXX_Size() int

func (*OpenDutPortResponse) XXX_Unmarshal Uses

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

type Output Uses

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 Uses

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

func (Output) String Uses

func (x Output) String() string

type ProvisionMetadata Uses

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

func (*ProvisionMetadata) Descriptor Uses

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

func (*ProvisionMetadata) ProtoMessage Uses

func (*ProvisionMetadata) ProtoMessage()

func (*ProvisionMetadata) Reset Uses

func (m *ProvisionMetadata) Reset()

func (*ProvisionMetadata) String Uses

func (m *ProvisionMetadata) String() string

func (*ProvisionMetadata) XXX_DiscardUnknown Uses

func (m *ProvisionMetadata) XXX_DiscardUnknown()

func (*ProvisionMetadata) XXX_Marshal Uses

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

func (*ProvisionMetadata) XXX_Merge Uses

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

func (*ProvisionMetadata) XXX_Size Uses

func (m *ProvisionMetadata) XXX_Size() int

func (*ProvisionMetadata) XXX_Unmarshal Uses

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

type ProvisionRequest Uses

type ProvisionRequest 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 *ProvisionRequest_ChromeOSImage `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"`
    // dlc_specs specifies which DLCs to install on the DUT after provisioning.
    DlcSpecs             []*ProvisionRequest_DLCSpec `protobuf:"bytes,3,rep,name=dlc_specs,json=dlcSpecs,proto3" json:"dlc_specs,omitempty"`
    XXX_NoUnkeyedLiteral struct{}                    `json:"-"`
    XXX_unrecognized     []byte                      `json:"-"`
    XXX_sizecache        int32                       `json:"-"`
}

Code:

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.ProvisionRequest{
    Name: dutName,
    Image: &tls.ProvisionRequest_ChromeOSImage{
        PathOneof: &tls.ProvisionRequest_ChromeOSImage_GsPathPrefix{
            GsPathPrefix: "gs://chromeos-image-archive/eve-release/R87-13457.0.0",
        },
    },
    DlcSpecs: []*tls.ProvisionRequest_DLCSpec{
        &tls.ProvisionRequest_DLCSpec{
            Id: "sample-dlc",
        },
    },
}

ctx := context.Background()
op, err := c.Provision(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.

func (*ProvisionRequest) Descriptor Uses

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

func (*ProvisionRequest) GetDlcSpecs Uses

func (m *ProvisionRequest) GetDlcSpecs() []*ProvisionRequest_DLCSpec

func (*ProvisionRequest) GetImage Uses

func (m *ProvisionRequest) GetImage() *ProvisionRequest_ChromeOSImage

func (*ProvisionRequest) GetName Uses

func (m *ProvisionRequest) GetName() string

func (*ProvisionRequest) ProtoMessage Uses

func (*ProvisionRequest) ProtoMessage()

func (*ProvisionRequest) Reset Uses

func (m *ProvisionRequest) Reset()

func (*ProvisionRequest) String Uses

func (m *ProvisionRequest) String() string

func (*ProvisionRequest) XXX_DiscardUnknown Uses

func (m *ProvisionRequest) XXX_DiscardUnknown()

func (*ProvisionRequest) XXX_Marshal Uses

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

func (*ProvisionRequest) XXX_Merge Uses

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

func (*ProvisionRequest) XXX_Size Uses

func (m *ProvisionRequest) XXX_Size() int

func (*ProvisionRequest) XXX_Unmarshal Uses

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

type ProvisionRequest_ChromeOSImage Uses

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

func (*ProvisionRequest_ChromeOSImage) Descriptor Uses

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

func (*ProvisionRequest_ChromeOSImage) GetGsPathPrefix Uses

func (m *ProvisionRequest_ChromeOSImage) GetGsPathPrefix() string

func (*ProvisionRequest_ChromeOSImage) GetPathOneof Uses

func (m *ProvisionRequest_ChromeOSImage) GetPathOneof() isProvisionRequest_ChromeOSImage_PathOneof

func (*ProvisionRequest_ChromeOSImage) ProtoMessage Uses

func (*ProvisionRequest_ChromeOSImage) ProtoMessage()

func (*ProvisionRequest_ChromeOSImage) Reset Uses

func (m *ProvisionRequest_ChromeOSImage) Reset()

func (*ProvisionRequest_ChromeOSImage) String Uses

func (m *ProvisionRequest_ChromeOSImage) String() string

func (*ProvisionRequest_ChromeOSImage) XXX_DiscardUnknown Uses

func (m *ProvisionRequest_ChromeOSImage) XXX_DiscardUnknown()

func (*ProvisionRequest_ChromeOSImage) XXX_Marshal Uses

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

func (*ProvisionRequest_ChromeOSImage) XXX_Merge Uses

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

func (*ProvisionRequest_ChromeOSImage) XXX_OneofWrappers Uses

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

XXX_OneofWrappers is for the internal use of the proto package.

func (*ProvisionRequest_ChromeOSImage) XXX_Size Uses

func (m *ProvisionRequest_ChromeOSImage) XXX_Size() int

func (*ProvisionRequest_ChromeOSImage) XXX_Unmarshal Uses

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

type ProvisionRequest_ChromeOSImage_GsPathPrefix Uses

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

type ProvisionRequest_DLCSpec Uses

type ProvisionRequest_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 (*ProvisionRequest_DLCSpec) Descriptor Uses

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

func (*ProvisionRequest_DLCSpec) GetId Uses

func (m *ProvisionRequest_DLCSpec) GetId() string

func (*ProvisionRequest_DLCSpec) ProtoMessage Uses

func (*ProvisionRequest_DLCSpec) ProtoMessage()

func (*ProvisionRequest_DLCSpec) Reset Uses

func (m *ProvisionRequest_DLCSpec) Reset()

func (*ProvisionRequest_DLCSpec) String Uses

func (m *ProvisionRequest_DLCSpec) String() string

func (*ProvisionRequest_DLCSpec) XXX_DiscardUnknown Uses

func (m *ProvisionRequest_DLCSpec) XXX_DiscardUnknown()

func (*ProvisionRequest_DLCSpec) XXX_Marshal Uses

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

func (*ProvisionRequest_DLCSpec) XXX_Merge Uses

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

func (*ProvisionRequest_DLCSpec) XXX_Size Uses

func (m *ProvisionRequest_DLCSpec) XXX_Size() int

func (*ProvisionRequest_DLCSpec) XXX_Unmarshal Uses

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

type ProvisionResponse Uses

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

func (*ProvisionResponse) Descriptor Uses

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

func (*ProvisionResponse) ProtoMessage Uses

func (*ProvisionResponse) ProtoMessage()

func (*ProvisionResponse) Reset Uses

func (m *ProvisionResponse) Reset()

func (*ProvisionResponse) String Uses

func (m *ProvisionResponse) String() string

func (*ProvisionResponse) XXX_DiscardUnknown Uses

func (m *ProvisionResponse) XXX_DiscardUnknown()

func (*ProvisionResponse) XXX_Marshal Uses

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

func (*ProvisionResponse) XXX_Merge Uses

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

func (*ProvisionResponse) XXX_Size Uses

func (m *ProvisionResponse) XXX_Size() int

func (*ProvisionResponse) XXX_Unmarshal Uses

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

type ProvisionResponse_Reason Uses

type ProvisionResponse_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
    ProvisionResponse_REASON_INVALID_REQUEST ProvisionResponse_Reason = 0
    // status code: FAILED_PRECONDITION
    ProvisionResponse_REASON_DUT_UNREACHABLE_PRE_PROVISION ProvisionResponse_Reason = 1
    // status code: FAILED_PRECONDITION
    ProvisionResponse_REASON_DOWNLOADING_IMAGE_FAILED ProvisionResponse_Reason = 2
    // status code: DEADLINE_EXCEEDED
    ProvisionResponse_REASON_PROVISIONING_TIMEDOUT ProvisionResponse_Reason = 3
    // status code: ABORTED
    ProvisionResponse_REASON_PROVISIONING_FAILED ProvisionResponse_Reason = 4
    // status code: ABORTED
    ProvisionResponse_REASON_DUT_UNREACHABLE_POST_PROVISION ProvisionResponse_Reason = 5
)

func (ProvisionResponse_Reason) EnumDescriptor Uses

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

func (ProvisionResponse_Reason) String Uses

func (x ProvisionResponse_Reason) String() string

type SetDutPowerSupplyRequest Uses

type SetDutPowerSupplyRequest struct {
    Dut                  string                         `protobuf:"bytes,1,opt,name=dut,proto3" json:"dut,omitempty"`
    State                SetDutPowerSupplyRequest_State `protobuf:"varint,2,opt,name=state,proto3,enum=chromiumos.config.api.test.tls.SetDutPowerSupplyRequest_State" json:"state,omitempty"`
    XXX_NoUnkeyedLiteral struct{}                       `json:"-"`
    XXX_unrecognized     []byte                         `json:"-"`
    XXX_sizecache        int32                          `json:"-"`
}

func (*SetDutPowerSupplyRequest) Descriptor Uses

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

func (*SetDutPowerSupplyRequest) GetDut Uses

func (m *SetDutPowerSupplyRequest) GetDut() string

func (*SetDutPowerSupplyRequest) GetState Uses

func (m *SetDutPowerSupplyRequest) GetState() SetDutPowerSupplyRequest_State

func (*SetDutPowerSupplyRequest) ProtoMessage Uses

func (*SetDutPowerSupplyRequest) ProtoMessage()

func (*SetDutPowerSupplyRequest) Reset Uses

func (m *SetDutPowerSupplyRequest) Reset()

func (*SetDutPowerSupplyRequest) String Uses

func (m *SetDutPowerSupplyRequest) String() string

func (*SetDutPowerSupplyRequest) XXX_DiscardUnknown Uses

func (m *SetDutPowerSupplyRequest) XXX_DiscardUnknown()

func (*SetDutPowerSupplyRequest) XXX_Marshal Uses

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

func (*SetDutPowerSupplyRequest) XXX_Merge Uses

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

func (*SetDutPowerSupplyRequest) XXX_Size Uses

func (m *SetDutPowerSupplyRequest) XXX_Size() int

func (*SetDutPowerSupplyRequest) XXX_Unmarshal Uses

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

type SetDutPowerSupplyRequest_State Uses

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 Uses

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

func (SetDutPowerSupplyRequest_State) String Uses

func (x SetDutPowerSupplyRequest_State) String() string

type SetDutPowerSupplyResponse Uses

type SetDutPowerSupplyResponse struct {
    Status SetDutPowerSupplyResponse_Status `protobuf:"varint,1,opt,name=status,proto3,enum=chromiumos.config.api.test.tls.SetDutPowerSupplyResponse_Status" json:"status,omitempty"`
    // 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 Uses

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

func (*SetDutPowerSupplyResponse) GetReason Uses

func (m *SetDutPowerSupplyResponse) GetReason() string

func (*SetDutPowerSupplyResponse) GetStatus Uses

func (m *SetDutPowerSupplyResponse) GetStatus() SetDutPowerSupplyResponse_Status

func (*SetDutPowerSupplyResponse) ProtoMessage Uses

func (*SetDutPowerSupplyResponse) ProtoMessage()

func (*SetDutPowerSupplyResponse) Reset Uses

func (m *SetDutPowerSupplyResponse) Reset()

func (*SetDutPowerSupplyResponse) String Uses

func (m *SetDutPowerSupplyResponse) String() string

func (*SetDutPowerSupplyResponse) XXX_DiscardUnknown Uses

func (m *SetDutPowerSupplyResponse) XXX_DiscardUnknown()

func (*SetDutPowerSupplyResponse) XXX_Marshal Uses

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

func (*SetDutPowerSupplyResponse) XXX_Merge Uses

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

func (*SetDutPowerSupplyResponse) XXX_Size Uses

func (m *SetDutPowerSupplyResponse) XXX_Size() int

func (*SetDutPowerSupplyResponse) XXX_Unmarshal Uses

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

type SetDutPowerSupplyResponse_Status Uses

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 Uses

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

func (SetDutPowerSupplyResponse_Status) String Uses

func (x SetDutPowerSupplyResponse_Status) String() string

type UnimplementedCommonServer Uses

type UnimplementedCommonServer struct {
}

UnimplementedCommonServer can be embedded to have forward compatible implementations.

func (*UnimplementedCommonServer) ExecDutCommand Uses

func (*UnimplementedCommonServer) ExecDutCommand(req *ExecDutCommandRequest, srv Common_ExecDutCommandServer) error

func (*UnimplementedCommonServer) FetchCrashes Uses

func (*UnimplementedCommonServer) FetchCrashes(req *FetchCrashesRequest, srv Common_FetchCrashesServer) error

func (*UnimplementedCommonServer) Provision Uses

func (*UnimplementedCommonServer) Provision(ctx context.Context, req *ProvisionRequest) (*longrunning.Operation, error)

type UnimplementedWiringServer Uses

type UnimplementedWiringServer struct {
}

UnimplementedWiringServer can be embedded to have forward compatible implementations.

func (*UnimplementedWiringServer) CacheForDut Uses

func (*UnimplementedWiringServer) CacheForDut(ctx context.Context, req *CacheForDutRequest) (*longrunning.Operation, error)

func (*UnimplementedWiringServer) CallServoXmlRpc Uses

func (*UnimplementedWiringServer) CallServoXmlRpc(ctx context.Context, req *CallServoXmlRpcRequest) (*CallServoXmlRpcResponse, error)

func (*UnimplementedWiringServer) ExposePortToDut Uses

func (*UnimplementedWiringServer) ExposePortToDut(ctx context.Context, req *ExposePortToDutRequest) (*ExposePortToDutResponse, error)

func (*UnimplementedWiringServer) OpenDutPort Uses

func (*UnimplementedWiringServer) OpenDutPort(ctx context.Context, req *OpenDutPortRequest) (*OpenDutPortResponse, error)

func (*UnimplementedWiringServer) SetDutPowerSupply Uses

func (*UnimplementedWiringServer) SetDutPowerSupply(ctx context.Context, req *SetDutPowerSupplyRequest) (*SetDutPowerSupplyResponse, error)

type WiringClient Uses

type WiringClient interface {
    // 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)
    // CallServoXmlRpc performs an XML-RPC call against the servo connected to a
    // DUT.
    //
    // This RPC mirrors the XML-RPC specification (http://xmlrpc.com/spec.md).
    //
    // EXPERIMENTAL
    CallServoXmlRpc(ctx context.Context, in *CallServoXmlRpcRequest, opts ...grpc.CallOption) (*CallServoXmlRpcResponse, 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 Uses

func NewWiringClient(cc *grpc.ClientConn) WiringClient

type WiringServer Uses

type WiringServer interface {
    // 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)
    // CallServoXmlRpc performs an XML-RPC call against the servo connected to a
    // DUT.
    //
    // This RPC mirrors the XML-RPC specification (http://xmlrpc.com/spec.md).
    //
    // EXPERIMENTAL
    CallServoXmlRpc(context.Context, *CallServoXmlRpcRequest) (*CallServoXmlRpcResponse, 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

PathSynopsis
dependencies/longrunning

Package tls imports 9 packages (graph) and is imported by 5 packages. Updated 2020-10-26. Refresh now. Tools for package owners.