blob: b39458fc145f06d70f39215e0e8fe5d8d1373e08 [file] [log] [blame]
// Copyright 2020 The LUCI Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc v3.12.1
// source: go.chromium.org/luci/resultdb/proto/v1/deriver.proto
package resultpb
import prpc "go.chromium.org/luci/grpc/prpc"
import (
context "context"
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// Used a google.rpc.PreconditionFailure.Violation.type returned as a Status
// detail by DeriveChromiumInvocation when responding with a PreconditionFailure status
// code.
type DeriveChromiumInvocationPreconditionFailureType int32
const (
DeriveChromiumInvocationPreconditionFailureType_DERIVE_CHROMIUM_INVOCATION_PRECONDITION_FAILURE_TYPE_UNSPECIFIED DeriveChromiumInvocationPreconditionFailureType = 0
DeriveChromiumInvocationPreconditionFailureType_INCOMPLETE_CHROMIUM_SWARMING_TASK DeriveChromiumInvocationPreconditionFailureType = 1
)
// Enum value maps for DeriveChromiumInvocationPreconditionFailureType.
var (
DeriveChromiumInvocationPreconditionFailureType_name = map[int32]string{
0: "DERIVE_CHROMIUM_INVOCATION_PRECONDITION_FAILURE_TYPE_UNSPECIFIED",
1: "INCOMPLETE_CHROMIUM_SWARMING_TASK",
}
DeriveChromiumInvocationPreconditionFailureType_value = map[string]int32{
"DERIVE_CHROMIUM_INVOCATION_PRECONDITION_FAILURE_TYPE_UNSPECIFIED": 0,
"INCOMPLETE_CHROMIUM_SWARMING_TASK": 1,
}
)
func (x DeriveChromiumInvocationPreconditionFailureType) Enum() *DeriveChromiumInvocationPreconditionFailureType {
p := new(DeriveChromiumInvocationPreconditionFailureType)
*p = x
return p
}
func (x DeriveChromiumInvocationPreconditionFailureType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (DeriveChromiumInvocationPreconditionFailureType) Descriptor() protoreflect.EnumDescriptor {
return file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_enumTypes[0].Descriptor()
}
func (DeriveChromiumInvocationPreconditionFailureType) Type() protoreflect.EnumType {
return &file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_enumTypes[0]
}
func (x DeriveChromiumInvocationPreconditionFailureType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use DeriveChromiumInvocationPreconditionFailureType.Descriptor instead.
func (DeriveChromiumInvocationPreconditionFailureType) EnumDescriptor() ([]byte, []int) {
return file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_rawDescGZIP(), []int{0}
}
// A request message for DeriveChromiumInvocation RPC.
type DeriveChromiumInvocationRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Derive the invocation from the Swarming task.
SwarmingTask *DeriveChromiumInvocationRequest_SwarmingTask `protobuf:"bytes,1,opt,name=swarming_task,json=swarmingTask,proto3" json:"swarming_task,omitempty"`
}
func (x *DeriveChromiumInvocationRequest) Reset() {
*x = DeriveChromiumInvocationRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeriveChromiumInvocationRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeriveChromiumInvocationRequest) ProtoMessage() {}
func (x *DeriveChromiumInvocationRequest) ProtoReflect() protoreflect.Message {
mi := &file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeriveChromiumInvocationRequest.ProtoReflect.Descriptor instead.
func (*DeriveChromiumInvocationRequest) Descriptor() ([]byte, []int) {
return file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_rawDescGZIP(), []int{0}
}
func (x *DeriveChromiumInvocationRequest) GetSwarmingTask() *DeriveChromiumInvocationRequest_SwarmingTask {
if x != nil {
return x.SwarmingTask
}
return nil
}
// Identifies a swarming task.
type DeriveChromiumInvocationRequest_SwarmingTask struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Swarming host of task.
Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"`
// ID of swarming task to process and insert.
//
// The task should have tags:
// test_id_prefix: test_id_prefix for each test suite, e.g.
// "ninja://chrome/test:telemetry_gpu_integration_test/trace_test/".
// ninja_target: the fully-qualified ninja target used to compile the test
// binary used in the task, e.g. "//chrome/test:browser_tests".
// bucket: the LUCI bucket of the parent build
// buildername: the LUCI builder of the parent build.
// test_suite: a value of "test" property in any of the JSON files in
// https://chromium.googlesource.com/chromium/src/+/master/testing/buildbot/
// used to create the swarming task.
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *DeriveChromiumInvocationRequest_SwarmingTask) Reset() {
*x = DeriveChromiumInvocationRequest_SwarmingTask{}
if protoimpl.UnsafeEnabled {
mi := &file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeriveChromiumInvocationRequest_SwarmingTask) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeriveChromiumInvocationRequest_SwarmingTask) ProtoMessage() {}
func (x *DeriveChromiumInvocationRequest_SwarmingTask) ProtoReflect() protoreflect.Message {
mi := &file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeriveChromiumInvocationRequest_SwarmingTask.ProtoReflect.Descriptor instead.
func (*DeriveChromiumInvocationRequest_SwarmingTask) Descriptor() ([]byte, []int) {
return file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_rawDescGZIP(), []int{0, 0}
}
func (x *DeriveChromiumInvocationRequest_SwarmingTask) GetHostname() string {
if x != nil {
return x.Hostname
}
return ""
}
func (x *DeriveChromiumInvocationRequest_SwarmingTask) GetId() string {
if x != nil {
return x.Id
}
return ""
}
var File_go_chromium_org_luci_resultdb_proto_v1_deriver_proto protoreflect.FileDescriptor
var file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_rawDesc = []byte{
0x0a, 0x34, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72,
0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x64, 0x62, 0x2f,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x65, 0x72,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x6c, 0x75, 0x63, 0x69, 0x2e, 0x72, 0x65, 0x73,
0x75, 0x6c, 0x74, 0x64, 0x62, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76,
0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x37, 0x67, 0x6f, 0x2e, 0x63, 0x68,
0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f,
0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x64, 0x62, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76,
0x31, 0x2f, 0x69, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x22, 0xd1, 0x01, 0x0a, 0x1f, 0x44, 0x65, 0x72, 0x69, 0x76, 0x65, 0x43, 0x68, 0x72,
0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x68, 0x0a, 0x0d, 0x73, 0x77, 0x61, 0x72, 0x6d, 0x69,
0x6e, 0x67, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e,
0x6c, 0x75, 0x63, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x64, 0x62, 0x2e, 0x76, 0x31,
0x2e, 0x44, 0x65, 0x72, 0x69, 0x76, 0x65, 0x43, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x49,
0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x2e, 0x53, 0x77, 0x61, 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0,
0x41, 0x02, 0x52, 0x0c, 0x73, 0x77, 0x61, 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x73, 0x6b,
0x1a, 0x44, 0x0a, 0x0c, 0x53, 0x77, 0x61, 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x73, 0x6b,
0x12, 0x1f, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0,
0x41, 0x02, 0x52, 0x02, 0x69, 0x64, 0x2a, 0x9e, 0x01, 0x0a, 0x2f, 0x44, 0x65, 0x72, 0x69, 0x76,
0x65, 0x43, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46,
0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x44, 0x0a, 0x40, 0x44, 0x45,
0x52, 0x49, 0x56, 0x45, 0x5f, 0x43, 0x48, 0x52, 0x4f, 0x4d, 0x49, 0x55, 0x4d, 0x5f, 0x49, 0x4e,
0x56, 0x4f, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4e, 0x44,
0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x54, 0x59,
0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00,
0x12, 0x25, 0x0a, 0x21, 0x49, 0x4e, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x43,
0x48, 0x52, 0x4f, 0x4d, 0x49, 0x55, 0x4d, 0x5f, 0x53, 0x57, 0x41, 0x52, 0x4d, 0x49, 0x4e, 0x47,
0x5f, 0x54, 0x41, 0x53, 0x4b, 0x10, 0x01, 0x32, 0x78, 0x0a, 0x07, 0x44, 0x65, 0x72, 0x69, 0x76,
0x65, 0x72, 0x12, 0x6d, 0x0a, 0x18, 0x44, 0x65, 0x72, 0x69, 0x76, 0x65, 0x43, 0x68, 0x72, 0x6f,
0x6d, 0x69, 0x75, 0x6d, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31,
0x2e, 0x6c, 0x75, 0x63, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x64, 0x62, 0x2e, 0x76,
0x31, 0x2e, 0x44, 0x65, 0x72, 0x69, 0x76, 0x65, 0x43, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d,
0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x75, 0x63, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x64,
0x62, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22,
0x00, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d,
0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74,
0x64, 0x62, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x31, 0x3b, 0x72, 0x65, 0x73, 0x75,
0x6c, 0x74, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_rawDescOnce sync.Once
file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_rawDescData = file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_rawDesc
)
func file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_rawDescGZIP() []byte {
file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_rawDescOnce.Do(func() {
file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_rawDescData = protoimpl.X.CompressGZIP(file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_rawDescData)
})
return file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_rawDescData
}
var file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_goTypes = []interface{}{
(DeriveChromiumInvocationPreconditionFailureType)(0), // 0: luci.resultdb.v1.DeriveChromiumInvocationPreconditionFailureType
(*DeriveChromiumInvocationRequest)(nil), // 1: luci.resultdb.v1.DeriveChromiumInvocationRequest
(*DeriveChromiumInvocationRequest_SwarmingTask)(nil), // 2: luci.resultdb.v1.DeriveChromiumInvocationRequest.SwarmingTask
(*Invocation)(nil), // 3: luci.resultdb.v1.Invocation
}
var file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_depIdxs = []int32{
2, // 0: luci.resultdb.v1.DeriveChromiumInvocationRequest.swarming_task:type_name -> luci.resultdb.v1.DeriveChromiumInvocationRequest.SwarmingTask
1, // 1: luci.resultdb.v1.Deriver.DeriveChromiumInvocation:input_type -> luci.resultdb.v1.DeriveChromiumInvocationRequest
3, // 2: luci.resultdb.v1.Deriver.DeriveChromiumInvocation:output_type -> luci.resultdb.v1.Invocation
2, // [2:3] is the sub-list for method output_type
1, // [1:2] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_init() }
func file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_init() {
if File_go_chromium_org_luci_resultdb_proto_v1_deriver_proto != nil {
return
}
file_go_chromium_org_luci_resultdb_proto_v1_invocation_proto_init()
if !protoimpl.UnsafeEnabled {
file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeriveChromiumInvocationRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeriveChromiumInvocationRequest_SwarmingTask); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_rawDesc,
NumEnums: 1,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_goTypes,
DependencyIndexes: file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_depIdxs,
EnumInfos: file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_enumTypes,
MessageInfos: file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_msgTypes,
}.Build()
File_go_chromium_org_luci_resultdb_proto_v1_deriver_proto = out.File
file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_rawDesc = nil
file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_goTypes = nil
file_go_chromium_org_luci_resultdb_proto_v1_deriver_proto_depIdxs = nil
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// 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.SupportPackageIsVersion6
// DeriverClient is the client API for Deriver service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type DeriverClient interface {
// Derives an invocation and test results from a Chromium swarming task.
// Returns the derived invocation; test results should retrieved using
// ResultDB.ListTestResults or ResultDB.QueryTestResults.
DeriveChromiumInvocation(ctx context.Context, in *DeriveChromiumInvocationRequest, opts ...grpc.CallOption) (*Invocation, error)
}
type deriverPRPCClient struct {
client *prpc.Client
}
func NewDeriverPRPCClient(client *prpc.Client) DeriverClient {
return &deriverPRPCClient{client}
}
func (c *deriverPRPCClient) DeriveChromiumInvocation(ctx context.Context, in *DeriveChromiumInvocationRequest, opts ...grpc.CallOption) (*Invocation, error) {
out := new(Invocation)
err := c.client.Call(ctx, "luci.resultdb.v1.Deriver", "DeriveChromiumInvocation", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
type deriverClient struct {
cc grpc.ClientConnInterface
}
func NewDeriverClient(cc grpc.ClientConnInterface) DeriverClient {
return &deriverClient{cc}
}
func (c *deriverClient) DeriveChromiumInvocation(ctx context.Context, in *DeriveChromiumInvocationRequest, opts ...grpc.CallOption) (*Invocation, error) {
out := new(Invocation)
err := c.cc.Invoke(ctx, "/luci.resultdb.v1.Deriver/DeriveChromiumInvocation", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// DeriverServer is the server API for Deriver service.
type DeriverServer interface {
// Derives an invocation and test results from a Chromium swarming task.
// Returns the derived invocation; test results should retrieved using
// ResultDB.ListTestResults or ResultDB.QueryTestResults.
DeriveChromiumInvocation(context.Context, *DeriveChromiumInvocationRequest) (*Invocation, error)
}
// UnimplementedDeriverServer can be embedded to have forward compatible implementations.
type UnimplementedDeriverServer struct {
}
func (*UnimplementedDeriverServer) DeriveChromiumInvocation(context.Context, *DeriveChromiumInvocationRequest) (*Invocation, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeriveChromiumInvocation not implemented")
}
func RegisterDeriverServer(s prpc.Registrar, srv DeriverServer) {
s.RegisterService(&_Deriver_serviceDesc, srv)
}
func _Deriver_DeriveChromiumInvocation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeriveChromiumInvocationRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeriverServer).DeriveChromiumInvocation(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/luci.resultdb.v1.Deriver/DeriveChromiumInvocation",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeriverServer).DeriveChromiumInvocation(ctx, req.(*DeriveChromiumInvocationRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Deriver_serviceDesc = grpc.ServiceDesc{
ServiceName: "luci.resultdb.v1.Deriver",
HandlerType: (*DeriverServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "DeriveChromiumInvocation",
Handler: _Deriver_DeriveChromiumInvocation_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "go.chromium.org/luci/resultdb/proto/v1/deriver.proto",
}