blob: d394c06492a156ecf94a5c8bd7329576fce37249 [file] [log] [blame]
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: chromiumos/config/api/test/rtd/v1/progress.proto
package rtd
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
v2 "go.chromium.org/chromiumos/config/go/api/test/results/v2"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// Configuration data needed by clients of ProgressSink.
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ProgressSinkClientConfig) Reset() { *m = ProgressSinkClientConfig{} }
func (m *ProgressSinkClientConfig) String() string { return proto.CompactTextString(m) }
func (*ProgressSinkClientConfig) ProtoMessage() {}
func (*ProgressSinkClientConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_5e83d657830dbeb4, []int{0}
}
func (m *ProgressSinkClientConfig) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ProgressSinkClientConfig.Unmarshal(m, b)
}
func (m *ProgressSinkClientConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ProgressSinkClientConfig.Marshal(b, m, deterministic)
}
func (m *ProgressSinkClientConfig) XXX_Merge(src proto.Message) {
xxx_messageInfo_ProgressSinkClientConfig.Merge(m, src)
}
func (m *ProgressSinkClientConfig) XXX_Size() int {
return xxx_messageInfo_ProgressSinkClientConfig.Size(m)
}
func (m *ProgressSinkClientConfig) XXX_DiscardUnknown() {
xxx_messageInfo_ProgressSinkClientConfig.DiscardUnknown(m)
}
var xxx_messageInfo_ProgressSinkClientConfig proto.InternalMessageInfo
func (m *ProgressSinkClientConfig) GetPort() int32 {
if m != nil {
return m.Port
}
return 0
}
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReportResultRequest) Reset() { *m = ReportResultRequest{} }
func (m *ReportResultRequest) String() string { return proto.CompactTextString(m) }
func (*ReportResultRequest) ProtoMessage() {}
func (*ReportResultRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_5e83d657830dbeb4, []int{1}
}
func (m *ReportResultRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReportResultRequest.Unmarshal(m, b)
}
func (m *ReportResultRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReportResultRequest.Marshal(b, m, deterministic)
}
func (m *ReportResultRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReportResultRequest.Merge(m, src)
}
func (m *ReportResultRequest) XXX_Size() int {
return xxx_messageInfo_ReportResultRequest.Size(m)
}
func (m *ReportResultRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ReportResultRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ReportResultRequest proto.InternalMessageInfo
func (m *ReportResultRequest) GetRequest() string {
if m != nil {
return m.Request
}
return ""
}
func (m *ReportResultRequest) GetResult() *v2.Result {
if m != nil {
return m.Result
}
return nil
}
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReportResultResponse) Reset() { *m = ReportResultResponse{} }
func (m *ReportResultResponse) String() string { return proto.CompactTextString(m) }
func (*ReportResultResponse) ProtoMessage() {}
func (*ReportResultResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_5e83d657830dbeb4, []int{2}
}
func (m *ReportResultResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReportResultResponse.Unmarshal(m, b)
}
func (m *ReportResultResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReportResultResponse.Marshal(b, m, deterministic)
}
func (m *ReportResultResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReportResultResponse.Merge(m, src)
}
func (m *ReportResultResponse) XXX_Size() int {
return xxx_messageInfo_ReportResultResponse.Size(m)
}
func (m *ReportResultResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ReportResultResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ReportResultResponse proto.InternalMessageInfo
func (m *ReportResultResponse) GetTerminate() bool {
if m != nil {
return m.Terminate
}
return false
}
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReportLogRequest) Reset() { *m = ReportLogRequest{} }
func (m *ReportLogRequest) String() string { return proto.CompactTextString(m) }
func (*ReportLogRequest) ProtoMessage() {}
func (*ReportLogRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_5e83d657830dbeb4, []int{3}
}
func (m *ReportLogRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReportLogRequest.Unmarshal(m, b)
}
func (m *ReportLogRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReportLogRequest.Marshal(b, m, deterministic)
}
func (m *ReportLogRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReportLogRequest.Merge(m, src)
}
func (m *ReportLogRequest) XXX_Size() int {
return xxx_messageInfo_ReportLogRequest.Size(m)
}
func (m *ReportLogRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ReportLogRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ReportLogRequest proto.InternalMessageInfo
func (m *ReportLogRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *ReportLogRequest) GetRequest() string {
if m != nil {
return m.Request
}
return ""
}
func (m *ReportLogRequest) GetData() []byte {
if m != nil {
return m.Data
}
return nil
}
type ReportLogResponse struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReportLogResponse) Reset() { *m = ReportLogResponse{} }
func (m *ReportLogResponse) String() string { return proto.CompactTextString(m) }
func (*ReportLogResponse) ProtoMessage() {}
func (*ReportLogResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_5e83d657830dbeb4, []int{4}
}
func (m *ReportLogResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReportLogResponse.Unmarshal(m, b)
}
func (m *ReportLogResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReportLogResponse.Marshal(b, m, deterministic)
}
func (m *ReportLogResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReportLogResponse.Merge(m, src)
}
func (m *ReportLogResponse) XXX_Size() int {
return xxx_messageInfo_ReportLogResponse.Size(m)
}
func (m *ReportLogResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ReportLogResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ReportLogResponse proto.InternalMessageInfo
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ArchiveArtifactRequest) Reset() { *m = ArchiveArtifactRequest{} }
func (m *ArchiveArtifactRequest) String() string { return proto.CompactTextString(m) }
func (*ArchiveArtifactRequest) ProtoMessage() {}
func (*ArchiveArtifactRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_5e83d657830dbeb4, []int{5}
}
func (m *ArchiveArtifactRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ArchiveArtifactRequest.Unmarshal(m, b)
}
func (m *ArchiveArtifactRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ArchiveArtifactRequest.Marshal(b, m, deterministic)
}
func (m *ArchiveArtifactRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ArchiveArtifactRequest.Merge(m, src)
}
func (m *ArchiveArtifactRequest) XXX_Size() int {
return xxx_messageInfo_ArchiveArtifactRequest.Size(m)
}
func (m *ArchiveArtifactRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ArchiveArtifactRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ArchiveArtifactRequest proto.InternalMessageInfo
func (m *ArchiveArtifactRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *ArchiveArtifactRequest) GetRequest() string {
if m != nil {
return m.Request
}
return ""
}
func (m *ArchiveArtifactRequest) GetLocalPath() string {
if m != nil {
return m.LocalPath
}
return ""
}
type ArchiveArtifactResponse struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ArchiveArtifactResponse) Reset() { *m = ArchiveArtifactResponse{} }
func (m *ArchiveArtifactResponse) String() string { return proto.CompactTextString(m) }
func (*ArchiveArtifactResponse) ProtoMessage() {}
func (*ArchiveArtifactResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_5e83d657830dbeb4, []int{6}
}
func (m *ArchiveArtifactResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ArchiveArtifactResponse.Unmarshal(m, b)
}
func (m *ArchiveArtifactResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ArchiveArtifactResponse.Marshal(b, m, deterministic)
}
func (m *ArchiveArtifactResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ArchiveArtifactResponse.Merge(m, src)
}
func (m *ArchiveArtifactResponse) XXX_Size() int {
return xxx_messageInfo_ArchiveArtifactResponse.Size(m)
}
func (m *ArchiveArtifactResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ArchiveArtifactResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ArchiveArtifactResponse proto.InternalMessageInfo
func init() {
proto.RegisterType((*ProgressSinkClientConfig)(nil), "chromiumos.config.api.test.rtd.v1.ProgressSinkClientConfig")
proto.RegisterType((*ReportResultRequest)(nil), "chromiumos.config.api.test.rtd.v1.ReportResultRequest")
proto.RegisterType((*ReportResultResponse)(nil), "chromiumos.config.api.test.rtd.v1.ReportResultResponse")
proto.RegisterType((*ReportLogRequest)(nil), "chromiumos.config.api.test.rtd.v1.ReportLogRequest")
proto.RegisterType((*ReportLogResponse)(nil), "chromiumos.config.api.test.rtd.v1.ReportLogResponse")
proto.RegisterType((*ArchiveArtifactRequest)(nil), "chromiumos.config.api.test.rtd.v1.ArchiveArtifactRequest")
proto.RegisterType((*ArchiveArtifactResponse)(nil), "chromiumos.config.api.test.rtd.v1.ArchiveArtifactResponse")
}
func init() {
proto.RegisterFile("chromiumos/config/api/test/rtd/v1/progress.proto", fileDescriptor_5e83d657830dbeb4)
}
var fileDescriptor_5e83d657830dbeb4 = []byte{
// 420 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0xcd, 0x6e, 0xd4, 0x30,
0x14, 0x85, 0x95, 0x76, 0x28, 0xe4, 0x32, 0x12, 0xe0, 0x22, 0x08, 0x11, 0x48, 0x43, 0x56, 0xd9,
0x60, 0xd3, 0xb4, 0xe2, 0xa7, 0xac, 0x4a, 0xc5, 0x8e, 0x45, 0x65, 0x58, 0xb1, 0x41, 0x26, 0x71,
0x13, 0x8b, 0x24, 0x0e, 0xf6, 0x9d, 0x88, 0x1d, 0x5b, 0x1e, 0x80, 0x07, 0x46, 0xb5, 0xd3, 0x4e,
0xfa, 0xa3, 0xe9, 0xcc, 0xec, 0x4e, 0xac, 0x7c, 0xe7, 0x9c, 0xf8, 0xe6, 0xc2, 0xeb, 0xbc, 0x32,
0xba, 0x51, 0xf3, 0x46, 0x5b, 0x96, 0xeb, 0xf6, 0x54, 0x95, 0x4c, 0x74, 0x8a, 0xa1, 0xb4, 0xc8,
0x0c, 0x16, 0xac, 0xdf, 0x63, 0x9d, 0xd1, 0xa5, 0x91, 0xd6, 0xd2, 0xce, 0x68, 0xd4, 0xe4, 0xe5,
0x82, 0xa0, 0x9e, 0xa0, 0xa2, 0x53, 0xf4, 0x8c, 0xa0, 0x06, 0x0b, 0xda, 0xef, 0xc5, 0xd9, 0x32,
0x53, 0x69, 0xe7, 0x35, 0x5a, 0xd6, 0x67, 0x83, 0xf4, 0xb6, 0x09, 0x85, 0xe8, 0x64, 0x08, 0xfa,
0xa2, 0xda, 0x9f, 0xc7, 0xb5, 0x92, 0x2d, 0x1e, 0x3b, 0x98, 0x10, 0x98, 0x74, 0xda, 0x60, 0x14,
0xcc, 0x82, 0xf4, 0x0e, 0x77, 0x3a, 0xe9, 0x61, 0x97, 0xcb, 0x33, 0xc5, 0x9d, 0x0b, 0x97, 0xbf,
0xe6, 0xd2, 0x22, 0x89, 0xe0, 0xae, 0xf1, 0xd2, 0xbd, 0x1d, 0xf2, 0xf3, 0x47, 0xf2, 0x09, 0x76,
0x7c, 0x60, 0xb4, 0x35, 0x0b, 0xd2, 0xfb, 0xd9, 0x2b, 0xba, 0xec, 0x43, 0x7c, 0x4b, 0xda, 0x67,
0x74, 0xf0, 0x1f, 0xe0, 0xe4, 0x00, 0x1e, 0x5f, 0xce, 0xb5, 0x9d, 0x6e, 0xad, 0x24, 0xcf, 0x21,
0x44, 0x69, 0x1a, 0xd5, 0x0a, 0x94, 0x2e, 0xfa, 0x1e, 0x5f, 0x1c, 0x24, 0x5f, 0xe1, 0xa1, 0xa7,
0x3e, 0xeb, 0xf2, 0xbc, 0x2a, 0x81, 0x49, 0x2b, 0x1a, 0x39, 0xf4, 0x74, 0x7a, 0x5c, 0x7f, 0xeb,
0x72, 0x7d, 0x02, 0x93, 0x42, 0xa0, 0x88, 0xb6, 0x67, 0x41, 0x3a, 0xe5, 0x4e, 0x27, 0xbb, 0xf0,
0x68, 0xe4, 0xea, 0x8b, 0x24, 0x12, 0x9e, 0x1c, 0x99, 0xbc, 0x52, 0xbd, 0x3c, 0x32, 0xa8, 0x4e,
0x45, 0x8e, 0x9b, 0x05, 0xbe, 0x00, 0xa8, 0x75, 0x2e, 0xea, 0xef, 0x9d, 0xc0, 0xca, 0xc5, 0x86,
0x3c, 0x74, 0x27, 0x27, 0x02, 0xab, 0xe4, 0x19, 0x3c, 0xbd, 0x16, 0xe3, 0x1b, 0x64, 0xff, 0xb6,
0x61, 0x3a, 0x9e, 0x25, 0xf9, 0x03, 0xd3, 0xf1, 0x9d, 0x91, 0x37, 0xf4, 0xd6, 0x7f, 0x88, 0xde,
0x30, 0xdc, 0xf8, 0xed, 0xda, 0xdc, 0x30, 0x9c, 0xdf, 0x10, 0x5e, 0x5c, 0x14, 0xd9, 0x5f, 0xd9,
0x65, 0x31, 0xac, 0xf8, 0x60, 0x3d, 0xc8, 0xe7, 0xa6, 0x01, 0xf9, 0x1b, 0xc0, 0x83, 0x2b, 0xf7,
0x44, 0xde, 0xaf, 0xe0, 0x75, 0xf3, 0x08, 0xe3, 0xc3, 0x4d, 0x50, 0x5f, 0xe6, 0xe3, 0xe1, 0xb7,
0x77, 0xa5, 0xbe, 0xe0, 0xa9, 0x36, 0x25, 0xbb, 0xbe, 0xa7, 0xa5, 0xbe, 0xba, 0xff, 0x1f, 0x0c,
0x16, 0x3f, 0x76, 0xdc, 0x92, 0xee, 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff, 0xe6, 0x5e, 0x16, 0x23,
0x2f, 0x04, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// ProgressSinkClient is the client API for ProgressSink service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
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)
}
type progressSinkClient struct {
cc *grpc.ClientConn
}
func NewProgressSinkClient(cc *grpc.ClientConn) ProgressSinkClient {
return &progressSinkClient{cc}
}
func (c *progressSinkClient) ReportResult(ctx context.Context, in *ReportResultRequest, opts ...grpc.CallOption) (*ReportResultResponse, error) {
out := new(ReportResultResponse)
err := c.cc.Invoke(ctx, "/chromiumos.config.api.test.rtd.v1.ProgressSink/ReportResult", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *progressSinkClient) ReportLog(ctx context.Context, opts ...grpc.CallOption) (ProgressSink_ReportLogClient, error) {
stream, err := c.cc.NewStream(ctx, &_ProgressSink_serviceDesc.Streams[0], "/chromiumos.config.api.test.rtd.v1.ProgressSink/ReportLog", opts...)
if err != nil {
return nil, err
}
x := &progressSinkReportLogClient{stream}
return x, nil
}
type ProgressSink_ReportLogClient interface {
Send(*ReportLogRequest) error
CloseAndRecv() (*ReportLogResponse, error)
grpc.ClientStream
}
type progressSinkReportLogClient struct {
grpc.ClientStream
}
func (x *progressSinkReportLogClient) Send(m *ReportLogRequest) error {
return x.ClientStream.SendMsg(m)
}
func (x *progressSinkReportLogClient) CloseAndRecv() (*ReportLogResponse, error) {
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
m := new(ReportLogResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *progressSinkClient) ArchiveArtifact(ctx context.Context, in *ArchiveArtifactRequest, opts ...grpc.CallOption) (*ArchiveArtifactResponse, error) {
out := new(ArchiveArtifactResponse)
err := c.cc.Invoke(ctx, "/chromiumos.config.api.test.rtd.v1.ProgressSink/ArchiveArtifact", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ProgressSinkServer is the server API for ProgressSink service.
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)
}
// UnimplementedProgressSinkServer can be embedded to have forward compatible implementations.
type UnimplementedProgressSinkServer struct {
}
func (*UnimplementedProgressSinkServer) ReportResult(ctx context.Context, req *ReportResultRequest) (*ReportResultResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReportResult not implemented")
}
func (*UnimplementedProgressSinkServer) ReportLog(srv ProgressSink_ReportLogServer) error {
return status.Errorf(codes.Unimplemented, "method ReportLog not implemented")
}
func (*UnimplementedProgressSinkServer) ArchiveArtifact(ctx context.Context, req *ArchiveArtifactRequest) (*ArchiveArtifactResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ArchiveArtifact not implemented")
}
func RegisterProgressSinkServer(s *grpc.Server, srv ProgressSinkServer) {
s.RegisterService(&_ProgressSink_serviceDesc, srv)
}
func _ProgressSink_ReportResult_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ReportResultRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ProgressSinkServer).ReportResult(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/chromiumos.config.api.test.rtd.v1.ProgressSink/ReportResult",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ProgressSinkServer).ReportResult(ctx, req.(*ReportResultRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ProgressSink_ReportLog_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(ProgressSinkServer).ReportLog(&progressSinkReportLogServer{stream})
}
type ProgressSink_ReportLogServer interface {
SendAndClose(*ReportLogResponse) error
Recv() (*ReportLogRequest, error)
grpc.ServerStream
}
type progressSinkReportLogServer struct {
grpc.ServerStream
}
func (x *progressSinkReportLogServer) SendAndClose(m *ReportLogResponse) error {
return x.ServerStream.SendMsg(m)
}
func (x *progressSinkReportLogServer) Recv() (*ReportLogRequest, error) {
m := new(ReportLogRequest)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func _ProgressSink_ArchiveArtifact_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ArchiveArtifactRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ProgressSinkServer).ArchiveArtifact(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/chromiumos.config.api.test.rtd.v1.ProgressSink/ArchiveArtifact",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ProgressSinkServer).ArchiveArtifact(ctx, req.(*ArchiveArtifactRequest))
}
return interceptor(ctx, in, info, handler)
}
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",
}