rtd

package
v0.0.0-...-b8a1838 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_chromiumos_config_api_test_rtd_v1_invocation_proto protoreflect.FileDescriptor
View Source
var File_chromiumos_config_api_test_rtd_v1_progress_proto protoreflect.FileDescriptor
View Source
var ProgressSink_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "chromiumos.config.api.test.rtd.v1.ProgressSink",
	HandlerType: (*ProgressSinkServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ReportResult",
			Handler:    _ProgressSink_ReportResult_Handler,
		},
		{
			MethodName: "ArchiveArtifact",
			Handler:    _ProgressSink_ArchiveArtifact_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ReportLog",
			Handler:       _ProgressSink_ReportLog_Handler,
			ClientStreams: true,
		},
	},
	Metadata: "chromiumos/config/api/test/rtd/v1/progress.proto",
}

ProgressSink_ServiceDesc is the grpc.ServiceDesc for ProgressSink service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterProgressSinkServer

func RegisterProgressSinkServer(s grpc.ServiceRegistrar, srv ProgressSinkServer)

Types

type ArchiveArtifactRequest

type ArchiveArtifactRequest struct {

	// Name for the archived artifact.
	//
	// name may be interpreted as a local file path or part of a URL. name MUST be
	// a valid resource name per https://aip.dev/122 and MUST be a valid POSIX
	// file path.
	//
	// name MUST be unique across all artifacts archived from a single invocation
	// request.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The request to archive artifacts for, identified by the
	// Invocation.Request.name field.
	Request string `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"`
	// Absolute path to a file or directory to archive.
	LocalPath string `protobuf:"bytes,3,opt,name=local_path,json=localPath,proto3" json:"local_path,omitempty"`
	// contains filtered or unexported fields
}

func (*ArchiveArtifactRequest) Descriptor deprecated

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

Deprecated: Use ArchiveArtifactRequest.ProtoReflect.Descriptor instead.

func (*ArchiveArtifactRequest) GetLocalPath

func (x *ArchiveArtifactRequest) GetLocalPath() string

func (*ArchiveArtifactRequest) GetName

func (x *ArchiveArtifactRequest) GetName() string

func (*ArchiveArtifactRequest) GetRequest

func (x *ArchiveArtifactRequest) GetRequest() string

func (*ArchiveArtifactRequest) ProtoMessage

func (*ArchiveArtifactRequest) ProtoMessage()

func (*ArchiveArtifactRequest) ProtoReflect

func (x *ArchiveArtifactRequest) ProtoReflect() protoreflect.Message

func (*ArchiveArtifactRequest) Reset

func (x *ArchiveArtifactRequest) Reset()

func (*ArchiveArtifactRequest) String

func (x *ArchiveArtifactRequest) String() string

type ArchiveArtifactResponse

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

func (*ArchiveArtifactResponse) Descriptor deprecated

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

Deprecated: Use ArchiveArtifactResponse.ProtoReflect.Descriptor instead.

func (*ArchiveArtifactResponse) ProtoMessage

func (*ArchiveArtifactResponse) ProtoMessage()

func (*ArchiveArtifactResponse) ProtoReflect

func (x *ArchiveArtifactResponse) ProtoReflect() protoreflect.Message

func (*ArchiveArtifactResponse) Reset

func (x *ArchiveArtifactResponse) Reset()

func (*ArchiveArtifactResponse) String

func (x *ArchiveArtifactResponse) String() string

type DUT

type DUT struct {

	// Name for the DUT for using Test Lab Services to interact with the
	// device and its peripherals.
	//
	// The RTD MUST pass this to Test Lab Service RPCs that act on a particular
	// DUT. See the tls.OpenDutPortRequest message for an example of where
	// this is used.
	TlsDutName string `protobuf:"bytes,1,opt,name=tls_dut_name,json=tlsDutName,proto3" json:"tls_dut_name,omitempty"`
	// contains filtered or unexported fields
}

Contains all configuration data required to interact with a single device under test during a test invocation.

func (*DUT) Descriptor deprecated

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

Deprecated: Use DUT.ProtoReflect.Descriptor instead.

func (*DUT) GetTlsDutName

func (x *DUT) GetTlsDutName() string

func (*DUT) ProtoMessage

func (*DUT) ProtoMessage()

func (*DUT) ProtoReflect

func (x *DUT) ProtoReflect() protoreflect.Message

func (*DUT) Reset

func (x *DUT) Reset()

func (*DUT) String

func (x *DUT) String() string

type Invocation

type Invocation struct {

	// Smallest unit of an invocation request for which results MUST be reported.
	//
	// An invocation SHOULD execute requests in a deterministic order based on
	// the ordering of this list. The invocation MAY do this my executing the
	// requests serially in the input order.
	Requests []*Request `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"`
	// Progress sink to be used to report progress of the Remote Test Driver
	// invocation to the surrounding Remote Test Server.
	ProgressSinkClientConfig *ProgressSinkClientConfig `` /* 137-byte string literal not displayed */
	// Configuration information for using Test Lab Services to interact
	// with DUTs and their peripherals.
	TestLabServicesConfig *TLSClientConfig `` /* 128-byte string literal not displayed */
	// Set of DUTs usable in this invocation.
	//
	// Contains more than one dut if the test execution is sharded.
	Duts []*DUT `protobuf:"bytes,4,rep,name=duts,proto3" json:"duts,omitempty"`
	// contains filtered or unexported fields
}

Input to a Remote Test Driver invocation.

TODO(crbug.com/1051691): Link to a reference implementation of Remote Test Server & Remote Test Driver.

func (*Invocation) Descriptor deprecated

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

Deprecated: Use Invocation.ProtoReflect.Descriptor instead.

func (*Invocation) GetDuts

func (x *Invocation) GetDuts() []*DUT

func (*Invocation) GetProgressSinkClientConfig

func (x *Invocation) GetProgressSinkClientConfig() *ProgressSinkClientConfig

func (*Invocation) GetRequests

func (x *Invocation) GetRequests() []*Request

func (*Invocation) GetTestLabServicesConfig

func (x *Invocation) GetTestLabServicesConfig() *TLSClientConfig

func (*Invocation) ProtoMessage

func (*Invocation) ProtoMessage()

func (*Invocation) ProtoReflect

func (x *Invocation) ProtoReflect() protoreflect.Message

func (*Invocation) Reset

func (x *Invocation) Reset()

func (*Invocation) String

func (x *Invocation) String() string

type ProgressSinkClient

type ProgressSinkClient interface {
	// A Remote Test Driver invocation MUST call ReportResult exactly once per
	// request.
	ReportResult(ctx context.Context, in *ReportResultRequest, opts ...grpc.CallOption) (*ReportResultResponse, error)
	// A log stream from the Remote Test Driver invocation.
	//
	// Each call to this method MUST stream logs for a single invocation request
	// and log file. Data for the same file may be split over multiple ReportLog
	// calls. Data received from concurrent methods calls for the same log file
	// may be interleved arbitrarily.
	ReportLog(ctx context.Context, opts ...grpc.CallOption) (ProgressSink_ReportLogClient, error)
	// Archive test artifacts to non-ephemeral storage.
	//
	// Different Test Lab Environments may use very different non-ephemeral
	// storage technologies. Remote Test Servers MUST archive the artifacts to
	// final storage synchronously and return an error if the archival fails.
	//
	// Note: Remote Test Drivers SHOULD use ReportLog() to report logs.
	// ArchiveArtifact() SHOULD be used to report structured or binary data only.
	//
	// Remote Test Server may limit the size of artifacts that may be offloaded
	// per request and may fail further requests with RESOURCE_EXHAUSTED.
	ArchiveArtifact(ctx context.Context, in *ArchiveArtifactRequest, opts ...grpc.CallOption) (*ArchiveArtifactResponse, error)
}

ProgressSinkClient is the client API for ProgressSink service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type ProgressSinkClientConfig

type ProgressSinkClientConfig struct {

	// Local TCP port to be used by the Remote Test Driver to communicate with
	// InvocationProgressSink service.
	Port int32 `protobuf:"varint,1,opt,name=port,proto3" json:"port,omitempty"`
	// contains filtered or unexported fields
}

Configuration data needed by clients of ProgressSink.

func (*ProgressSinkClientConfig) Descriptor deprecated

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

Deprecated: Use ProgressSinkClientConfig.ProtoReflect.Descriptor instead.

func (*ProgressSinkClientConfig) GetPort

func (x *ProgressSinkClientConfig) GetPort() int32

func (*ProgressSinkClientConfig) ProtoMessage

func (*ProgressSinkClientConfig) ProtoMessage()

func (*ProgressSinkClientConfig) ProtoReflect

func (x *ProgressSinkClientConfig) ProtoReflect() protoreflect.Message

func (*ProgressSinkClientConfig) Reset

func (x *ProgressSinkClientConfig) Reset()

func (*ProgressSinkClientConfig) String

func (x *ProgressSinkClientConfig) String() string

type ProgressSinkServer

type ProgressSinkServer interface {
	// A Remote Test Driver invocation MUST call ReportResult exactly once per
	// request.
	ReportResult(context.Context, *ReportResultRequest) (*ReportResultResponse, error)
	// A log stream from the Remote Test Driver invocation.
	//
	// Each call to this method MUST stream logs for a single invocation request
	// and log file. Data for the same file may be split over multiple ReportLog
	// calls. Data received from concurrent methods calls for the same log file
	// may be interleved arbitrarily.
	ReportLog(ProgressSink_ReportLogServer) error
	// Archive test artifacts to non-ephemeral storage.
	//
	// Different Test Lab Environments may use very different non-ephemeral
	// storage technologies. Remote Test Servers MUST archive the artifacts to
	// final storage synchronously and return an error if the archival fails.
	//
	// Note: Remote Test Drivers SHOULD use ReportLog() to report logs.
	// ArchiveArtifact() SHOULD be used to report structured or binary data only.
	//
	// Remote Test Server may limit the size of artifacts that may be offloaded
	// per request and may fail further requests with RESOURCE_EXHAUSTED.
	ArchiveArtifact(context.Context, *ArchiveArtifactRequest) (*ArchiveArtifactResponse, error)
}

ProgressSinkServer is the server API for ProgressSink service. All implementations should embed UnimplementedProgressSinkServer for forward compatibility

type ProgressSink_ReportLogClient

type ProgressSink_ReportLogClient interface {
	Send(*ReportLogRequest) error
	CloseAndRecv() (*ReportLogResponse, error)
	grpc.ClientStream
}

type ProgressSink_ReportLogServer

type ProgressSink_ReportLogServer interface {
	SendAndClose(*ReportLogResponse) error
	Recv() (*ReportLogRequest, error)
	grpc.ServerStream
}

type ReportLogRequest

type ReportLogRequest struct {

	// Name of the log sink.
	//
	// name may be interpreted as a local file path or part of a URL. name MUST be
	// a valid resource name per https://aip.dev/122 and MUST be a valid POSIX
	// file path.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The request to report logs for, identified by the
	// Invocation.Request.name field.
	Request string `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"`
	// Uninterpreted chunk of log-data.
	Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*ReportLogRequest) Descriptor deprecated

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

Deprecated: Use ReportLogRequest.ProtoReflect.Descriptor instead.

func (*ReportLogRequest) GetData

func (x *ReportLogRequest) GetData() []byte

func (*ReportLogRequest) GetName

func (x *ReportLogRequest) GetName() string

func (*ReportLogRequest) GetRequest

func (x *ReportLogRequest) GetRequest() string

func (*ReportLogRequest) ProtoMessage

func (*ReportLogRequest) ProtoMessage()

func (*ReportLogRequest) ProtoReflect

func (x *ReportLogRequest) ProtoReflect() protoreflect.Message

func (*ReportLogRequest) Reset

func (x *ReportLogRequest) Reset()

func (*ReportLogRequest) String

func (x *ReportLogRequest) String() string

type ReportLogResponse

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

func (*ReportLogResponse) Descriptor deprecated

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

Deprecated: Use ReportLogResponse.ProtoReflect.Descriptor instead.

func (*ReportLogResponse) ProtoMessage

func (*ReportLogResponse) ProtoMessage()

func (*ReportLogResponse) ProtoReflect

func (x *ReportLogResponse) ProtoReflect() protoreflect.Message

func (*ReportLogResponse) Reset

func (x *ReportLogResponse) Reset()

func (*ReportLogResponse) String

func (x *ReportLogResponse) String() string

type ReportResultRequest

type ReportResultRequest struct {

	// The request to report results for, identified by the
	// Invocation.Request.name field.
	Request string `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"`
	// Result to report.
	Result *v2.Result `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

func (*ReportResultRequest) Descriptor deprecated

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

Deprecated: Use ReportResultRequest.ProtoReflect.Descriptor instead.

func (*ReportResultRequest) GetRequest

func (x *ReportResultRequest) GetRequest() string

func (*ReportResultRequest) GetResult

func (x *ReportResultRequest) GetResult() *v2.Result

func (*ReportResultRequest) ProtoMessage

func (*ReportResultRequest) ProtoMessage()

func (*ReportResultRequest) ProtoReflect

func (x *ReportResultRequest) ProtoReflect() protoreflect.Message

func (*ReportResultRequest) Reset

func (x *ReportResultRequest) Reset()

func (*ReportResultRequest) String

func (x *ReportResultRequest) String() string

type ReportResultResponse

type ReportResultResponse struct {

	// If set, the invocation SHOULD immediately terminate, skipping remaining
	// requests.
	Terminate bool `protobuf:"varint,1,opt,name=terminate,proto3" json:"terminate,omitempty"`
	// contains filtered or unexported fields
}

func (*ReportResultResponse) Descriptor deprecated

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

Deprecated: Use ReportResultResponse.ProtoReflect.Descriptor instead.

func (*ReportResultResponse) GetTerminate

func (x *ReportResultResponse) GetTerminate() bool

func (*ReportResultResponse) ProtoMessage

func (*ReportResultResponse) ProtoMessage()

func (*ReportResultResponse) ProtoReflect

func (x *ReportResultResponse) ProtoReflect() protoreflect.Message

func (*ReportResultResponse) Reset

func (x *ReportResultResponse) Reset()

func (*ReportResultResponse) String

func (x *ReportResultResponse) String() string

type Request

type Request struct {

	// name MUST be unique across all requests in this invocation.
	//
	// ProgressSink methods require the inclusion of this value in reported
	// results. This provides additional safety from leaked Remote Test Driver
	// processes in the case that a single container is used to run multiple
	// invocations sequentially.
	//
	// Remote Test Drivers are recommended to use name as the opaque tag
	// required by the Test Lab Services API. Thus, name SHOULD be unique across
	// all invocations to simplify analytics. UUIDs are recommended.
	//
	// See also:
	//   Test Lab Services API: tls/README.md
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The test to execute, identified by the test.metadata.Test.name field.
	//
	// Note that the request does not contain a reference to the Remote Test
	// Driver to use, as the request is an input to the Remote Test Driver
	// invocation.
	Test string `protobuf:"bytes,2,opt,name=test,proto3" json:"test,omitempty"`
	// Environment configuration set by the Remote Test Server for a specific
	// request of the Remote Test Driver.
	Environment *Request_Environment `protobuf:"bytes,3,opt,name=environment,proto3" json:"environment,omitempty"`
	// contains filtered or unexported fields
}

Request for execution of a single test.metadata.Test

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetEnvironment

func (x *Request) GetEnvironment() *Request_Environment

func (*Request) GetName

func (x *Request) GetName() string

func (*Request) GetTest

func (x *Request) GetTest() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

func (x *Request) ProtoReflect() protoreflect.Message

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Request_Environment

type Request_Environment struct {

	// Absolute path to a directory for writing arbitrary files.
	//
	// This directory MUST be created by Remote Test Server prior to the Remote
	// Test Driver invocation.
	//
	// * Remote Test Drivers SHOULD use
	// test.invocation.ProgressClient.ReportLog() to report logs.
	// * Remote Test Drivers SHOULD use
	// test.invocation.ProgressClient.ArchiveArtifact() to archive critical
	// artifacts.
	//
	// Remote Test Servers may archive the work_dir contents to non-ephemeral
	// storage as a best effort asynchronous task.
	WorkDir string `protobuf:"bytes,1,opt,name=work_dir,json=workDir,proto3" json:"work_dir,omitempty"`
	// contains filtered or unexported fields
}

Per-request Remote Test Server environment configuration.

func (*Request_Environment) Descriptor deprecated

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

Deprecated: Use Request_Environment.ProtoReflect.Descriptor instead.

func (*Request_Environment) GetWorkDir

func (x *Request_Environment) GetWorkDir() string

func (*Request_Environment) ProtoMessage

func (*Request_Environment) ProtoMessage()

func (*Request_Environment) ProtoReflect

func (x *Request_Environment) ProtoReflect() protoreflect.Message

func (*Request_Environment) Reset

func (x *Request_Environment) Reset()

func (*Request_Environment) String

func (x *Request_Environment) String() string

type TLSClientConfig

type TLSClientConfig struct {

	// Address where Test Lab Services is reachable.
	// This should be an IPv4 or IPv6 address to avoid name
	// resolution issues.
	// IPv4 addresses will be in standard dotted decimal notation.
	// IPv6 addresses will be formatted according to RFC4291, Section
	// 2.2, 1. (no zero compression)
	// If this is a hostname, the RTS should ensure that the hostname
	// can be resolved by the RTD via standard name resolution
	// facilities.
	TlsAddress string `protobuf:"bytes,1,opt,name=tls_address,json=tlsAddress,proto3" json:"tls_address,omitempty"`
	// Port on the tls_address where the service is reachable.
	TlsPort int32 `protobuf:"varint,2,opt,name=tls_port,json=tlsPort,proto3" json:"tls_port,omitempty"`
	// Address where Test Lab Services Wiring is reachable.
	// This has the same format as tls_address.
	TlwAddress string `protobuf:"bytes,3,opt,name=tlw_address,json=tlwAddress,proto3" json:"tlw_address,omitempty"`
	// Port on the tlw_address where the service is reachable.
	TlwPort int32 `protobuf:"varint,4,opt,name=tlw_port,json=tlwPort,proto3" json:"tlw_port,omitempty"`
	// contains filtered or unexported fields
}

Configuration information required for using Test Lab & Wiring Services.

func (*TLSClientConfig) Descriptor deprecated

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

Deprecated: Use TLSClientConfig.ProtoReflect.Descriptor instead.

func (*TLSClientConfig) GetTlsAddress

func (x *TLSClientConfig) GetTlsAddress() string

func (*TLSClientConfig) GetTlsPort

func (x *TLSClientConfig) GetTlsPort() int32

func (*TLSClientConfig) GetTlwAddress

func (x *TLSClientConfig) GetTlwAddress() string

func (*TLSClientConfig) GetTlwPort

func (x *TLSClientConfig) GetTlwPort() int32

func (*TLSClientConfig) ProtoMessage

func (*TLSClientConfig) ProtoMessage()

func (*TLSClientConfig) ProtoReflect

func (x *TLSClientConfig) ProtoReflect() protoreflect.Message

func (*TLSClientConfig) Reset

func (x *TLSClientConfig) Reset()

func (*TLSClientConfig) String

func (x *TLSClientConfig) String() string

type UnimplementedProgressSinkServer

type UnimplementedProgressSinkServer struct {
}

UnimplementedProgressSinkServer should be embedded to have forward compatible implementations.

func (UnimplementedProgressSinkServer) ArchiveArtifact

func (UnimplementedProgressSinkServer) ReportLog

func (UnimplementedProgressSinkServer) ReportResult

type UnsafeProgressSinkServer

type UnsafeProgressSinkServer interface {
	// contains filtered or unexported methods
}

UnsafeProgressSinkServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProgressSinkServer will result in compilation errors.

Jump to

Keyboard shortcuts

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