Add timeout and retry_interval to GetRunner
This commit is contained in:
@@ -6,6 +6,8 @@ option go_package = "git.ohea.xyz/cursorius/pipeline-api/go/api/v2;apiv2";
|
||||
|
||||
message GetRunnerOptions {
|
||||
bool clone_source = 2;
|
||||
int64 timeout = 3;
|
||||
int64 retry_interval = 4;
|
||||
}
|
||||
|
||||
message GetRunnerRequest {
|
||||
@@ -13,9 +15,7 @@ message GetRunnerRequest {
|
||||
GetRunnerOptions options = 2;
|
||||
}
|
||||
|
||||
message GetRunnerResponse {
|
||||
string id = 1;
|
||||
}
|
||||
message GetRunnerResponse { string id = 1; }
|
||||
|
||||
service GetRunnerService {
|
||||
rpc GetRunner(GetRunnerRequest) returns (GetRunnerResponse) {}
|
||||
|
||||
+40
-19
@@ -26,6 +26,8 @@ type GetRunnerOptions struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
CloneSource bool `protobuf:"varint,2,opt,name=clone_source,json=cloneSource,proto3" json:"clone_source,omitempty"`
|
||||
Timeout int64 `protobuf:"varint,3,opt,name=timeout,proto3" json:"timeout,omitempty"`
|
||||
RetryInterval int64 `protobuf:"varint,4,opt,name=retry_interval,json=retryInterval,proto3" json:"retry_interval,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetRunnerOptions) Reset() {
|
||||
@@ -67,6 +69,20 @@ func (x *GetRunnerOptions) GetCloneSource() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *GetRunnerOptions) GetTimeout() int64 {
|
||||
if x != nil {
|
||||
return x.Timeout
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetRunnerOptions) GetRetryInterval() int64 {
|
||||
if x != nil {
|
||||
return x.RetryInterval
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type GetRunnerRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@@ -174,27 +190,32 @@ var File_api_v2_get_runner_proto protoreflect.FileDescriptor
|
||||
var file_api_v2_get_runner_proto_rawDesc = []byte{
|
||||
0x0a, 0x17, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x72, 0x75, 0x6e,
|
||||
0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x61, 0x70, 0x69, 0x2e, 0x76,
|
||||
0x32, 0x22, 0x35, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x4f, 0x70,
|
||||
0x32, 0x22, 0x76, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x4f, 0x70,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x6f, 0x6e, 0x65, 0x5f, 0x73,
|
||||
0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x63, 0x6c, 0x6f,
|
||||
0x6e, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x5a, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x52,
|
||||
0x75, 0x6e, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04,
|
||||
0x74, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73,
|
||||
0x12, 0x32, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75,
|
||||
0x6e, 0x6e, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x73, 0x22, 0x23, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x65,
|
||||
0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x32, 0x56, 0x0a, 0x10, 0x47, 0x65, 0x74,
|
||||
0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x42, 0x0a,
|
||||
0x09, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65,
|
||||
0x74, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
||||
0x00, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x2e, 0x6f, 0x68, 0x65, 0x61, 0x2e, 0x78, 0x79,
|
||||
0x7a, 0x2f, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x69, 0x75, 0x73, 0x2f, 0x70, 0x69, 0x70, 0x65,
|
||||
0x6c, 0x69, 0x6e, 0x65, 0x2d, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f,
|
||||
0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x6e, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65,
|
||||
0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f,
|
||||
0x75, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x69, 0x6e, 0x74, 0x65,
|
||||
0x72, 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x72, 0x65, 0x74, 0x72,
|
||||
0x79, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0x5a, 0x0a, 0x10, 0x47, 0x65, 0x74,
|
||||
0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67,
|
||||
0x73, 0x12, 0x32, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x52,
|
||||
0x75, 0x6e, 0x6e, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x23, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e,
|
||||
0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x32, 0x56, 0x0a, 0x10, 0x47, 0x65,
|
||||
0x74, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x42,
|
||||
0x0a, 0x09, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47,
|
||||
0x65, 0x74, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x22, 0x00, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x2e, 0x6f, 0x68, 0x65, 0x61, 0x2e, 0x78,
|
||||
0x79, 0x7a, 0x2f, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x69, 0x75, 0x73, 0x2f, 0x70, 0x69, 0x70,
|
||||
0x65, 0x6c, 0x69, 0x6e, 0x65, 0x2d, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x70, 0x69,
|
||||
0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
@@ -13,7 +13,7 @@ _sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10get_runner.proto\x12\x06\x61pi.v2\"(\n\x10GetRunnerOptions\x12\x14\n\x0c\x63lone_source\x18\x02 \x01(\x08\"K\n\x10GetRunnerRequest\x12\x0c\n\x04tags\x18\x01 \x03(\t\x12)\n\x07options\x18\x02 \x01(\x0b\x32\x18.api.v2.GetRunnerOptions\"\x1f\n\x11GetRunnerResponse\x12\n\n\x02id\x18\x01 \x01(\t2V\n\x10GetRunnerService\x12\x42\n\tGetRunner\x12\x18.api.v2.GetRunnerRequest\x1a\x19.api.v2.GetRunnerResponse\"\x00\x42\x35Z3git.ohea.xyz/cursorius/pipeline-api/go/api/v2;apiv2b\x06proto3')
|
||||
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10get_runner.proto\x12\x06\x61pi.v2\"Q\n\x10GetRunnerOptions\x12\x14\n\x0c\x63lone_source\x18\x02 \x01(\x08\x12\x0f\n\x07timeout\x18\x03 \x01(\x03\x12\x16\n\x0eretry_interval\x18\x04 \x01(\x03\"K\n\x10GetRunnerRequest\x12\x0c\n\x04tags\x18\x01 \x03(\t\x12)\n\x07options\x18\x02 \x01(\x0b\x32\x18.api.v2.GetRunnerOptions\"\x1f\n\x11GetRunnerResponse\x12\n\n\x02id\x18\x01 \x01(\t2V\n\x10GetRunnerService\x12\x42\n\tGetRunner\x12\x18.api.v2.GetRunnerRequest\x1a\x19.api.v2.GetRunnerResponse\"\x00\x42\x35Z3git.ohea.xyz/cursorius/pipeline-api/go/api/v2;apiv2b\x06proto3')
|
||||
|
||||
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
|
||||
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'get_runner_pb2', globals())
|
||||
@@ -22,11 +22,11 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
||||
DESCRIPTOR._options = None
|
||||
DESCRIPTOR._serialized_options = b'Z3git.ohea.xyz/cursorius/pipeline-api/go/api/v2;apiv2'
|
||||
_GETRUNNEROPTIONS._serialized_start=28
|
||||
_GETRUNNEROPTIONS._serialized_end=68
|
||||
_GETRUNNERREQUEST._serialized_start=70
|
||||
_GETRUNNERREQUEST._serialized_end=145
|
||||
_GETRUNNERRESPONSE._serialized_start=147
|
||||
_GETRUNNERRESPONSE._serialized_end=178
|
||||
_GETRUNNERSERVICE._serialized_start=180
|
||||
_GETRUNNERSERVICE._serialized_end=266
|
||||
_GETRUNNEROPTIONS._serialized_end=109
|
||||
_GETRUNNERREQUEST._serialized_start=111
|
||||
_GETRUNNERREQUEST._serialized_end=186
|
||||
_GETRUNNERRESPONSE._serialized_start=188
|
||||
_GETRUNNERRESPONSE._serialized_end=219
|
||||
_GETRUNNERSERVICE._serialized_start=221
|
||||
_GETRUNNERSERVICE._serialized_end=307
|
||||
# @@protoc_insertion_point(module_scope)
|
||||
|
||||
@@ -6,10 +6,14 @@ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Map
|
||||
DESCRIPTOR: _descriptor.FileDescriptor
|
||||
|
||||
class GetRunnerOptions(_message.Message):
|
||||
__slots__ = ["clone_source"]
|
||||
__slots__ = ["clone_source", "retry_interval", "timeout"]
|
||||
CLONE_SOURCE_FIELD_NUMBER: _ClassVar[int]
|
||||
RETRY_INTERVAL_FIELD_NUMBER: _ClassVar[int]
|
||||
TIMEOUT_FIELD_NUMBER: _ClassVar[int]
|
||||
clone_source: bool
|
||||
def __init__(self, clone_source: bool = ...) -> None: ...
|
||||
retry_interval: int
|
||||
timeout: int
|
||||
def __init__(self, clone_source: bool = ..., timeout: _Optional[int] = ..., retry_interval: _Optional[int] = ...) -> None: ...
|
||||
|
||||
class GetRunnerRequest(_message.Message):
|
||||
__slots__ = ["options", "tags"]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "cursorius-pipeline-api-v2"
|
||||
version = "0.1.0"
|
||||
version = "0.2.0"
|
||||
description = "Python client for the cursorius pipeline api (v2)"
|
||||
authors = ["restitux <restitux@ohea.xyz>"]
|
||||
license = "GPL-3.0-or-later"
|
||||
|
||||
Reference in New Issue
Block a user