1
0
Fork 0
mirror of https://github.com/arangodb/kube-arangodb.git synced 2024-12-14 11:57:37 +00:00

[Feature] Scheduler BatchJob Integration Definition (#1634)

This commit is contained in:
Adam Janikowski 2024-03-28 09:24:56 +01:00 committed by GitHub
parent cbb16bce9a
commit 2f987600d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 2021 additions and 0 deletions

View file

@ -61,6 +61,10 @@ linters-settings:
alias: mlSharedTests alias: mlSharedTests
- pkg: github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1 - pkg: github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1
alias: mlApi alias: mlApi
- pkg: github.com/arangodb/kube-arangodb/integrations/scheduler/v1/definition
alias: pbSchedulerV1
- pkg: github.com/arangodb/kube-arangodb/integrations/scheduler/v1
alias: pbImplSchedulerV1
- pkg: github.com/arangodb/kube-arangodb/integrations/shutdown/v1/definition - pkg: github.com/arangodb/kube-arangodb/integrations/shutdown/v1/definition
alias: pbShutdownV1 alias: pbShutdownV1
- pkg: github.com/arangodb/kube-arangodb/integrations/shutdown/v1 - pkg: github.com/arangodb/kube-arangodb/integrations/shutdown/v1

View file

@ -14,6 +14,7 @@
- (Feature) DebugPackage ArangoProfiles - (Feature) DebugPackage ArangoProfiles
- (Feature) Scheduler CLI - (Feature) Scheduler CLI
- (Feature) Parametrize ForceDelete timeout - (Feature) Parametrize ForceDelete timeout
- (Feature) Scheduler BatchJob Integration Definition
## [1.2.39](https://github.com/arangodb/kube-arangodb/tree/1.2.39) (2024-03-11) ## [1.2.39](https://github.com/arangodb/kube-arangodb/tree/1.2.39) (2024-03-11)
- (Feature) Extract Scheduler API - (Feature) Extract Scheduler API

View file

@ -0,0 +1,366 @@
//
// DISCLAIMER
//
// Copyright 2024 ArangoDB GmbH, Cologne, Germany
//
// 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.
//
// Copyright holder is ArangoDB GmbH, Cologne, Germany
//
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.21.1
// source: integrations/scheduler/v1/definition/batchjob.proto
package definition
import (
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)
)
// Keeps information about Kubernetes Batch/V1 Job
type BatchJob struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Keeps BatchJob settings
Spec *BatchJobSpec `protobuf:"bytes,1,opt,name=spec,proto3" json:"spec,omitempty"`
// Keeps current BatchJob Status
Status *BatchJobStatus `protobuf:"bytes,2,opt,name=status,proto3,oneof" json:"status,omitempty"`
}
func (x *BatchJob) Reset() {
*x = BatchJob{}
if protoimpl.UnsafeEnabled {
mi := &file_integrations_scheduler_v1_definition_batchjob_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BatchJob) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BatchJob) ProtoMessage() {}
func (x *BatchJob) ProtoReflect() protoreflect.Message {
mi := &file_integrations_scheduler_v1_definition_batchjob_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 BatchJob.ProtoReflect.Descriptor instead.
func (*BatchJob) Descriptor() ([]byte, []int) {
return file_integrations_scheduler_v1_definition_batchjob_proto_rawDescGZIP(), []int{0}
}
func (x *BatchJob) GetSpec() *BatchJobSpec {
if x != nil {
return x.Spec
}
return nil
}
func (x *BatchJob) GetStatus() *BatchJobStatus {
if x != nil {
return x.Status
}
return nil
}
// Information about BatchJob run settings, like completions and parallelism
type BatchJobSpec struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Number of concurrent Pods which are started within a job. Defaults to 1
Parallelism *int32 `protobuf:"varint,1,opt,name=parallelism,proto3,oneof" json:"parallelism,omitempty"`
// Number of expected completed runs. Defaults to 1
Completions *int32 `protobuf:"varint,2,opt,name=completions,proto3,oneof" json:"completions,omitempty"`
// Number of allowed Pod failures. Defaults to 0
BackoffLimit *int32 `protobuf:"varint,3,opt,name=backoff_limit,json=backoffLimit,proto3,oneof" json:"backoff_limit,omitempty"`
}
func (x *BatchJobSpec) Reset() {
*x = BatchJobSpec{}
if protoimpl.UnsafeEnabled {
mi := &file_integrations_scheduler_v1_definition_batchjob_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BatchJobSpec) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BatchJobSpec) ProtoMessage() {}
func (x *BatchJobSpec) ProtoReflect() protoreflect.Message {
mi := &file_integrations_scheduler_v1_definition_batchjob_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 BatchJobSpec.ProtoReflect.Descriptor instead.
func (*BatchJobSpec) Descriptor() ([]byte, []int) {
return file_integrations_scheduler_v1_definition_batchjob_proto_rawDescGZIP(), []int{1}
}
func (x *BatchJobSpec) GetParallelism() int32 {
if x != nil && x.Parallelism != nil {
return *x.Parallelism
}
return 0
}
func (x *BatchJobSpec) GetCompletions() int32 {
if x != nil && x.Completions != nil {
return *x.Completions
}
return 0
}
func (x *BatchJobSpec) GetBackoffLimit() int32 {
if x != nil && x.BackoffLimit != nil {
return *x.BackoffLimit
}
return 0
}
// Information about BatchJob Status
type BatchJobStatus struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Number of active and running Pods within BatchJob
Active int32 `protobuf:"varint,1,opt,name=active,proto3" json:"active,omitempty"`
// Number of completed Pods withing BatchJob
Succeeded int32 `protobuf:"varint,2,opt,name=succeeded,proto3" json:"succeeded,omitempty"`
// Number of failed Pods within BatchJob
Failed int32 `protobuf:"varint,3,opt,name=failed,proto3" json:"failed,omitempty"`
}
func (x *BatchJobStatus) Reset() {
*x = BatchJobStatus{}
if protoimpl.UnsafeEnabled {
mi := &file_integrations_scheduler_v1_definition_batchjob_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BatchJobStatus) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BatchJobStatus) ProtoMessage() {}
func (x *BatchJobStatus) ProtoReflect() protoreflect.Message {
mi := &file_integrations_scheduler_v1_definition_batchjob_proto_msgTypes[2]
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 BatchJobStatus.ProtoReflect.Descriptor instead.
func (*BatchJobStatus) Descriptor() ([]byte, []int) {
return file_integrations_scheduler_v1_definition_batchjob_proto_rawDescGZIP(), []int{2}
}
func (x *BatchJobStatus) GetActive() int32 {
if x != nil {
return x.Active
}
return 0
}
func (x *BatchJobStatus) GetSucceeded() int32 {
if x != nil {
return x.Succeeded
}
return 0
}
func (x *BatchJobStatus) GetFailed() int32 {
if x != nil {
return x.Failed
}
return 0
}
var File_integrations_scheduler_v1_definition_batchjob_proto protoreflect.FileDescriptor
var file_integrations_scheduler_v1_definition_batchjob_proto_rawDesc = []byte{
0x0a, 0x33, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73,
0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x66, 0x69,
0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x6a, 0x6f, 0x62, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72,
0x22, 0x7a, 0x0a, 0x08, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62, 0x12, 0x2b, 0x0a, 0x04,
0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x63, 0x68,
0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62, 0x53,
0x70, 0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x36, 0x0a, 0x06, 0x73, 0x74, 0x61,
0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x63, 0x68, 0x65,
0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62, 0x53, 0x74,
0x61, 0x74, 0x75, 0x73, 0x48, 0x00, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x88, 0x01,
0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xb8, 0x01, 0x0a,
0x0c, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x12, 0x25, 0x0a,
0x0b, 0x70, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x69, 0x73, 0x6d, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x69, 0x73,
0x6d, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, 0x01, 0x52, 0x0b, 0x63, 0x6f, 0x6d,
0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x62,
0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01,
0x28, 0x05, 0x48, 0x02, 0x52, 0x0c, 0x62, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x4c, 0x69, 0x6d,
0x69, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6c, 0x6c,
0x65, 0x6c, 0x69, 0x73, 0x6d, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x6f, 0x66,
0x66, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x5e, 0x0a, 0x0e, 0x42, 0x61, 0x74, 0x63, 0x68,
0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74,
0x69, 0x76, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76,
0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x75, 0x63, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73, 0x75, 0x63, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x12,
0x16, 0x0a, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52,
0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x42, 0x48, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75,
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x72, 0x61, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x2f, 0x6b,
0x75, 0x62, 0x65, 0x2d, 0x61, 0x72, 0x61, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x2f, 0x69, 0x6e, 0x74,
0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75,
0x6c, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f,
0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_integrations_scheduler_v1_definition_batchjob_proto_rawDescOnce sync.Once
file_integrations_scheduler_v1_definition_batchjob_proto_rawDescData = file_integrations_scheduler_v1_definition_batchjob_proto_rawDesc
)
func file_integrations_scheduler_v1_definition_batchjob_proto_rawDescGZIP() []byte {
file_integrations_scheduler_v1_definition_batchjob_proto_rawDescOnce.Do(func() {
file_integrations_scheduler_v1_definition_batchjob_proto_rawDescData = protoimpl.X.CompressGZIP(file_integrations_scheduler_v1_definition_batchjob_proto_rawDescData)
})
return file_integrations_scheduler_v1_definition_batchjob_proto_rawDescData
}
var file_integrations_scheduler_v1_definition_batchjob_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_integrations_scheduler_v1_definition_batchjob_proto_goTypes = []interface{}{
(*BatchJob)(nil), // 0: scheduler.BatchJob
(*BatchJobSpec)(nil), // 1: scheduler.BatchJobSpec
(*BatchJobStatus)(nil), // 2: scheduler.BatchJobStatus
}
var file_integrations_scheduler_v1_definition_batchjob_proto_depIdxs = []int32{
1, // 0: scheduler.BatchJob.spec:type_name -> scheduler.BatchJobSpec
2, // 1: scheduler.BatchJob.status:type_name -> scheduler.BatchJobStatus
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_integrations_scheduler_v1_definition_batchjob_proto_init() }
func file_integrations_scheduler_v1_definition_batchjob_proto_init() {
if File_integrations_scheduler_v1_definition_batchjob_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_integrations_scheduler_v1_definition_batchjob_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BatchJob); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_integrations_scheduler_v1_definition_batchjob_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BatchJobSpec); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_integrations_scheduler_v1_definition_batchjob_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BatchJobStatus); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_integrations_scheduler_v1_definition_batchjob_proto_msgTypes[0].OneofWrappers = []interface{}{}
file_integrations_scheduler_v1_definition_batchjob_proto_msgTypes[1].OneofWrappers = []interface{}{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_integrations_scheduler_v1_definition_batchjob_proto_rawDesc,
NumEnums: 0,
NumMessages: 3,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_integrations_scheduler_v1_definition_batchjob_proto_goTypes,
DependencyIndexes: file_integrations_scheduler_v1_definition_batchjob_proto_depIdxs,
MessageInfos: file_integrations_scheduler_v1_definition_batchjob_proto_msgTypes,
}.Build()
File_integrations_scheduler_v1_definition_batchjob_proto = out.File
file_integrations_scheduler_v1_definition_batchjob_proto_rawDesc = nil
file_integrations_scheduler_v1_definition_batchjob_proto_goTypes = nil
file_integrations_scheduler_v1_definition_batchjob_proto_depIdxs = nil
}

View file

@ -0,0 +1,58 @@
//
// DISCLAIMER
//
// Copyright 2024 ArangoDB GmbH, Cologne, Germany
//
// 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.
//
// Copyright holder is ArangoDB GmbH, Cologne, Germany
//
syntax = "proto3";
package scheduler;
option go_package = "github.com/arangodb/kube-arangodb/integrations/scheduler/v1/definition";
// Keeps information about Kubernetes Batch/V1 Job
message BatchJob {
// Keeps BatchJob settings
BatchJobSpec spec = 1;
// Keeps current BatchJob Status
optional BatchJobStatus status = 2;
}
// Information about BatchJob run settings, like completions and parallelism
message BatchJobSpec {
// Number of concurrent Pods which are started within a job. Defaults to 1
optional int32 parallelism = 1;
// Number of expected completed runs. Defaults to 1
optional int32 completions = 2;
// Number of allowed Pod failures. Defaults to 0
optional int32 backoff_limit = 3;
}
// Information about BatchJob Status
message BatchJobStatus {
// Number of active and running Pods within BatchJob
int32 active = 1;
// Number of completed Pods withing BatchJob
int32 succeeded = 2;
// Number of failed Pods within BatchJob
int32 failed = 3;
}

View file

@ -0,0 +1,465 @@
//
// DISCLAIMER
//
// Copyright 2024 ArangoDB GmbH, Cologne, Germany
//
// 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.
//
// Copyright holder is ArangoDB GmbH, Cologne, Germany
//
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.21.1
// source: integrations/scheduler/v1/definition/common.proto
package definition
import (
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)
)
// Common base of the Jobs
type JobBase struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Map of the Labels assigned to the job. Used for Profile selection
Labels map[string]string `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// List of additional profiles assigned to Job
Profiles []string `protobuf:"bytes,2,rep,name=profiles,proto3" json:"profiles,omitempty"`
}
func (x *JobBase) Reset() {
*x = JobBase{}
if protoimpl.UnsafeEnabled {
mi := &file_integrations_scheduler_v1_definition_common_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *JobBase) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*JobBase) ProtoMessage() {}
func (x *JobBase) ProtoReflect() protoreflect.Message {
mi := &file_integrations_scheduler_v1_definition_common_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 JobBase.ProtoReflect.Descriptor instead.
func (*JobBase) Descriptor() ([]byte, []int) {
return file_integrations_scheduler_v1_definition_common_proto_rawDescGZIP(), []int{0}
}
func (x *JobBase) GetLabels() map[string]string {
if x != nil {
return x.Labels
}
return nil
}
func (x *JobBase) GetProfiles() []string {
if x != nil {
return x.Profiles
}
return nil
}
// Basic information about Job
type Metadata struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Name of the job
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Optionally extends name of the job with random characters
GenerateName *bool `protobuf:"varint,2,opt,name=generate_name,json=generateName,proto3,oneof" json:"generate_name,omitempty"`
}
func (x *Metadata) Reset() {
*x = Metadata{}
if protoimpl.UnsafeEnabled {
mi := &file_integrations_scheduler_v1_definition_common_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Metadata) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Metadata) ProtoMessage() {}
func (x *Metadata) ProtoReflect() protoreflect.Message {
mi := &file_integrations_scheduler_v1_definition_common_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 Metadata.ProtoReflect.Descriptor instead.
func (*Metadata) Descriptor() ([]byte, []int) {
return file_integrations_scheduler_v1_definition_common_proto_rawDescGZIP(), []int{1}
}
func (x *Metadata) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Metadata) GetGenerateName() bool {
if x != nil && x.GenerateName != nil {
return *x.GenerateName
}
return false
}
// Basic information about container
type ContainerBase struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Container Image used to run container
Image *string `protobuf:"bytes,1,opt,name=image,proto3,oneof" json:"image,omitempty"`
// Arguments passed to the container
Args []string `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"`
// EnvironmentVariables passed to the container
EnvironmentVariables map[string]string `protobuf:"bytes,3,rep,name=environment_variables,json=environmentVariables,proto3" json:"environment_variables,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *ContainerBase) Reset() {
*x = ContainerBase{}
if protoimpl.UnsafeEnabled {
mi := &file_integrations_scheduler_v1_definition_common_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ContainerBase) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ContainerBase) ProtoMessage() {}
func (x *ContainerBase) ProtoReflect() protoreflect.Message {
mi := &file_integrations_scheduler_v1_definition_common_proto_msgTypes[2]
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 ContainerBase.ProtoReflect.Descriptor instead.
func (*ContainerBase) Descriptor() ([]byte, []int) {
return file_integrations_scheduler_v1_definition_common_proto_rawDescGZIP(), []int{2}
}
func (x *ContainerBase) GetImage() string {
if x != nil && x.Image != nil {
return *x.Image
}
return ""
}
func (x *ContainerBase) GetArgs() []string {
if x != nil {
return x.Args
}
return nil
}
func (x *ContainerBase) GetEnvironmentVariables() map[string]string {
if x != nil {
return x.EnvironmentVariables
}
return nil
}
// Common Spec of the Schedule request
type Spec struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Keeps requested Metadata
Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
// Keeps requested Job base
Job *JobBase `protobuf:"bytes,2,opt,name=job,proto3" json:"job,omitempty"`
// Keeps map of the containers
Containers map[string]*ContainerBase `protobuf:"bytes,3,rep,name=containers,proto3" json:"containers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *Spec) Reset() {
*x = Spec{}
if protoimpl.UnsafeEnabled {
mi := &file_integrations_scheduler_v1_definition_common_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Spec) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Spec) ProtoMessage() {}
func (x *Spec) ProtoReflect() protoreflect.Message {
mi := &file_integrations_scheduler_v1_definition_common_proto_msgTypes[3]
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 Spec.ProtoReflect.Descriptor instead.
func (*Spec) Descriptor() ([]byte, []int) {
return file_integrations_scheduler_v1_definition_common_proto_rawDescGZIP(), []int{3}
}
func (x *Spec) GetMetadata() *Metadata {
if x != nil {
return x.Metadata
}
return nil
}
func (x *Spec) GetJob() *JobBase {
if x != nil {
return x.Job
}
return nil
}
func (x *Spec) GetContainers() map[string]*ContainerBase {
if x != nil {
return x.Containers
}
return nil
}
var File_integrations_scheduler_v1_definition_common_proto protoreflect.FileDescriptor
var file_integrations_scheduler_v1_definition_common_proto_rawDesc = []byte{
0x0a, 0x31, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73,
0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x66, 0x69,
0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x12, 0x09, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x22, 0x98,
0x01, 0x0a, 0x07, 0x4a, 0x6f, 0x62, 0x42, 0x61, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x6c, 0x61,
0x62, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x63, 0x68,
0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x4a, 0x6f, 0x62, 0x42, 0x61, 0x73, 0x65, 0x2e, 0x4c,
0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65,
0x6c, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x02,
0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x1a, 0x39,
0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x5a, 0x0a, 0x08, 0x4d, 0x65, 0x74,
0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x67, 0x65, 0x6e,
0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08,
0x48, 0x00, 0x52, 0x0c, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65,
0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65,
0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xfa, 0x01, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69,
0x6e, 0x65, 0x72, 0x42, 0x61, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x88,
0x01, 0x01, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09,
0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x12, 0x67, 0x0a, 0x15, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f,
0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18,
0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65,
0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x42, 0x61, 0x73, 0x65, 0x2e,
0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61,
0x62, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x14, 0x65, 0x6e, 0x76, 0x69, 0x72,
0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x1a,
0x47, 0x0a, 0x19, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61,
0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14,
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x69, 0x6d, 0x61,
0x67, 0x65, 0x22, 0xf7, 0x01, 0x0a, 0x04, 0x53, 0x70, 0x65, 0x63, 0x12, 0x2f, 0x0a, 0x08, 0x6d,
0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e,
0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x03,
0x6a, 0x6f, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x63, 0x68, 0x65,
0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x4a, 0x6f, 0x62, 0x42, 0x61, 0x73, 0x65, 0x52, 0x03, 0x6a,
0x6f, 0x62, 0x12, 0x3f, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73,
0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c,
0x65, 0x72, 0x2e, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
0x65, 0x72, 0x73, 0x1a, 0x57, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75,
0x6c, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x42, 0x61, 0x73,
0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x48, 0x5a, 0x46,
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x72, 0x61, 0x6e, 0x67,
0x6f, 0x64, 0x62, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x2d, 0x61, 0x72, 0x61, 0x6e, 0x67, 0x6f, 0x64,
0x62, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73,
0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x66, 0x69,
0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_integrations_scheduler_v1_definition_common_proto_rawDescOnce sync.Once
file_integrations_scheduler_v1_definition_common_proto_rawDescData = file_integrations_scheduler_v1_definition_common_proto_rawDesc
)
func file_integrations_scheduler_v1_definition_common_proto_rawDescGZIP() []byte {
file_integrations_scheduler_v1_definition_common_proto_rawDescOnce.Do(func() {
file_integrations_scheduler_v1_definition_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_integrations_scheduler_v1_definition_common_proto_rawDescData)
})
return file_integrations_scheduler_v1_definition_common_proto_rawDescData
}
var file_integrations_scheduler_v1_definition_common_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_integrations_scheduler_v1_definition_common_proto_goTypes = []interface{}{
(*JobBase)(nil), // 0: scheduler.JobBase
(*Metadata)(nil), // 1: scheduler.Metadata
(*ContainerBase)(nil), // 2: scheduler.ContainerBase
(*Spec)(nil), // 3: scheduler.Spec
nil, // 4: scheduler.JobBase.LabelsEntry
nil, // 5: scheduler.ContainerBase.EnvironmentVariablesEntry
nil, // 6: scheduler.Spec.ContainersEntry
}
var file_integrations_scheduler_v1_definition_common_proto_depIdxs = []int32{
4, // 0: scheduler.JobBase.labels:type_name -> scheduler.JobBase.LabelsEntry
5, // 1: scheduler.ContainerBase.environment_variables:type_name -> scheduler.ContainerBase.EnvironmentVariablesEntry
1, // 2: scheduler.Spec.metadata:type_name -> scheduler.Metadata
0, // 3: scheduler.Spec.job:type_name -> scheduler.JobBase
6, // 4: scheduler.Spec.containers:type_name -> scheduler.Spec.ContainersEntry
2, // 5: scheduler.Spec.ContainersEntry.value:type_name -> scheduler.ContainerBase
6, // [6:6] is the sub-list for method output_type
6, // [6:6] is the sub-list for method input_type
6, // [6:6] is the sub-list for extension type_name
6, // [6:6] is the sub-list for extension extendee
0, // [0:6] is the sub-list for field type_name
}
func init() { file_integrations_scheduler_v1_definition_common_proto_init() }
func file_integrations_scheduler_v1_definition_common_proto_init() {
if File_integrations_scheduler_v1_definition_common_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_integrations_scheduler_v1_definition_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*JobBase); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_integrations_scheduler_v1_definition_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Metadata); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_integrations_scheduler_v1_definition_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ContainerBase); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_integrations_scheduler_v1_definition_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Spec); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_integrations_scheduler_v1_definition_common_proto_msgTypes[1].OneofWrappers = []interface{}{}
file_integrations_scheduler_v1_definition_common_proto_msgTypes[2].OneofWrappers = []interface{}{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_integrations_scheduler_v1_definition_common_proto_rawDesc,
NumEnums: 0,
NumMessages: 7,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_integrations_scheduler_v1_definition_common_proto_goTypes,
DependencyIndexes: file_integrations_scheduler_v1_definition_common_proto_depIdxs,
MessageInfos: file_integrations_scheduler_v1_definition_common_proto_msgTypes,
}.Build()
File_integrations_scheduler_v1_definition_common_proto = out.File
file_integrations_scheduler_v1_definition_common_proto_rawDesc = nil
file_integrations_scheduler_v1_definition_common_proto_goTypes = nil
file_integrations_scheduler_v1_definition_common_proto_depIdxs = nil
}

View file

@ -0,0 +1,67 @@
//
// DISCLAIMER
//
// Copyright 2024 ArangoDB GmbH, Cologne, Germany
//
// 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.
//
// Copyright holder is ArangoDB GmbH, Cologne, Germany
//
syntax = "proto3";
package scheduler;
option go_package = "github.com/arangodb/kube-arangodb/integrations/scheduler/v1/definition";
// Common base of the Jobs
message JobBase {
// Map of the Labels assigned to the job. Used for Profile selection
map<string, string> labels = 1;
// List of additional profiles assigned to Job
repeated string profiles = 2;
}
// Basic information about Job
message Metadata {
// Name of the job
string name = 1;
// Optionally extends name of the job with random characters
optional bool generate_name = 2;
}
// Basic information about container
message ContainerBase {
// Container Image used to run container
optional string image = 1;
// Arguments passed to the container
repeated string args = 2;
// EnvironmentVariables passed to the container
map<string, string> environment_variables = 3;
}
// Common Spec of the Schedule request
message Spec {
// Keeps requested Metadata
Metadata metadata = 1;
// Keeps requested Job base
JobBase job = 2;
// Keeps map of the containers
map<string, ContainerBase> containers = 3;
}

View file

@ -0,0 +1,25 @@
//
// DISCLAIMER
//
// Copyright 2024 ArangoDB GmbH, Cologne, Germany
//
// 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.
//
// Copyright holder is ArangoDB GmbH, Cologne, Germany
//
package definition
const (
Name = "scheduler.v1"
)

View file

@ -0,0 +1,712 @@
//
// DISCLAIMER
//
// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany
//
// 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 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.
//
// Copyright holder is ArangoDB GmbH, Cologne, Germany
//
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.21.1
// source: integrations/scheduler/v1/definition/definition.proto
package definition
import (
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)
)
// Create Request
type CreateBatchJobRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Spec of the Schedule request
Spec *Spec `protobuf:"bytes,1,opt,name=spec,proto3" json:"spec,omitempty"`
// BatchJob run settings
BatchJob *BatchJobSpec `protobuf:"bytes,2,opt,name=batch_job,json=batchJob,proto3" json:"batch_job,omitempty"`
}
func (x *CreateBatchJobRequest) Reset() {
*x = CreateBatchJobRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_integrations_scheduler_v1_definition_definition_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CreateBatchJobRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateBatchJobRequest) ProtoMessage() {}
func (x *CreateBatchJobRequest) ProtoReflect() protoreflect.Message {
mi := &file_integrations_scheduler_v1_definition_definition_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 CreateBatchJobRequest.ProtoReflect.Descriptor instead.
func (*CreateBatchJobRequest) Descriptor() ([]byte, []int) {
return file_integrations_scheduler_v1_definition_definition_proto_rawDescGZIP(), []int{0}
}
func (x *CreateBatchJobRequest) GetSpec() *Spec {
if x != nil {
return x.Spec
}
return nil
}
func (x *CreateBatchJobRequest) GetBatchJob() *BatchJobSpec {
if x != nil {
return x.BatchJob
}
return nil
}
// Create Response
type CreateBatchJobResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Name of the scheduled job
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// List of the assigned profiles
Profiles []string `protobuf:"bytes,2,rep,name=profiles,proto3" json:"profiles,omitempty"`
}
func (x *CreateBatchJobResponse) Reset() {
*x = CreateBatchJobResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_integrations_scheduler_v1_definition_definition_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CreateBatchJobResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateBatchJobResponse) ProtoMessage() {}
func (x *CreateBatchJobResponse) ProtoReflect() protoreflect.Message {
mi := &file_integrations_scheduler_v1_definition_definition_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 CreateBatchJobResponse.ProtoReflect.Descriptor instead.
func (*CreateBatchJobResponse) Descriptor() ([]byte, []int) {
return file_integrations_scheduler_v1_definition_definition_proto_rawDescGZIP(), []int{1}
}
func (x *CreateBatchJobResponse) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CreateBatchJobResponse) GetProfiles() []string {
if x != nil {
return x.Profiles
}
return nil
}
// Get Request
type GetBatchJobRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Name of the scheduled job
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *GetBatchJobRequest) Reset() {
*x = GetBatchJobRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_integrations_scheduler_v1_definition_definition_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetBatchJobRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetBatchJobRequest) ProtoMessage() {}
func (x *GetBatchJobRequest) ProtoReflect() protoreflect.Message {
mi := &file_integrations_scheduler_v1_definition_definition_proto_msgTypes[2]
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 GetBatchJobRequest.ProtoReflect.Descriptor instead.
func (*GetBatchJobRequest) Descriptor() ([]byte, []int) {
return file_integrations_scheduler_v1_definition_definition_proto_rawDescGZIP(), []int{2}
}
func (x *GetBatchJobRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
// Get Response
type GetBatchJobResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Defines if job was found
Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"`
// BatchJob run settings and current status
BatchJob *BatchJob `protobuf:"bytes,2,opt,name=batch_job,json=batchJob,proto3,oneof" json:"batch_job,omitempty"`
}
func (x *GetBatchJobResponse) Reset() {
*x = GetBatchJobResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_integrations_scheduler_v1_definition_definition_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetBatchJobResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetBatchJobResponse) ProtoMessage() {}
func (x *GetBatchJobResponse) ProtoReflect() protoreflect.Message {
mi := &file_integrations_scheduler_v1_definition_definition_proto_msgTypes[3]
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 GetBatchJobResponse.ProtoReflect.Descriptor instead.
func (*GetBatchJobResponse) Descriptor() ([]byte, []int) {
return file_integrations_scheduler_v1_definition_definition_proto_rawDescGZIP(), []int{3}
}
func (x *GetBatchJobResponse) GetExists() bool {
if x != nil {
return x.Exists
}
return false
}
func (x *GetBatchJobResponse) GetBatchJob() *BatchJob {
if x != nil {
return x.BatchJob
}
return nil
}
// List Request
type ListBatchJobRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *ListBatchJobRequest) Reset() {
*x = ListBatchJobRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_integrations_scheduler_v1_definition_definition_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListBatchJobRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListBatchJobRequest) ProtoMessage() {}
func (x *ListBatchJobRequest) ProtoReflect() protoreflect.Message {
mi := &file_integrations_scheduler_v1_definition_definition_proto_msgTypes[4]
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 ListBatchJobRequest.ProtoReflect.Descriptor instead.
func (*ListBatchJobRequest) Descriptor() ([]byte, []int) {
return file_integrations_scheduler_v1_definition_definition_proto_rawDescGZIP(), []int{4}
}
// List Response
type ListBatchJobResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// List of the BatchJobs
BatchJobs []string `protobuf:"bytes,1,rep,name=batch_jobs,json=batchJobs,proto3" json:"batch_jobs,omitempty"`
}
func (x *ListBatchJobResponse) Reset() {
*x = ListBatchJobResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_integrations_scheduler_v1_definition_definition_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListBatchJobResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListBatchJobResponse) ProtoMessage() {}
func (x *ListBatchJobResponse) ProtoReflect() protoreflect.Message {
mi := &file_integrations_scheduler_v1_definition_definition_proto_msgTypes[5]
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 ListBatchJobResponse.ProtoReflect.Descriptor instead.
func (*ListBatchJobResponse) Descriptor() ([]byte, []int) {
return file_integrations_scheduler_v1_definition_definition_proto_rawDescGZIP(), []int{5}
}
func (x *ListBatchJobResponse) GetBatchJobs() []string {
if x != nil {
return x.BatchJobs
}
return nil
}
// Delete Request
type DeleteBatchJobRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Name of the scheduled job
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Defines if all child containers/pods should be removed together with job
DeleteChildPods *bool `protobuf:"varint,2,opt,name=delete_child_pods,json=deleteChildPods,proto3,oneof" json:"delete_child_pods,omitempty"`
}
func (x *DeleteBatchJobRequest) Reset() {
*x = DeleteBatchJobRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_integrations_scheduler_v1_definition_definition_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeleteBatchJobRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteBatchJobRequest) ProtoMessage() {}
func (x *DeleteBatchJobRequest) ProtoReflect() protoreflect.Message {
mi := &file_integrations_scheduler_v1_definition_definition_proto_msgTypes[6]
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 DeleteBatchJobRequest.ProtoReflect.Descriptor instead.
func (*DeleteBatchJobRequest) Descriptor() ([]byte, []int) {
return file_integrations_scheduler_v1_definition_definition_proto_rawDescGZIP(), []int{6}
}
func (x *DeleteBatchJobRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *DeleteBatchJobRequest) GetDeleteChildPods() bool {
if x != nil && x.DeleteChildPods != nil {
return *x.DeleteChildPods
}
return false
}
// Delete Response
type DeleteBatchJobResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Defines if job was found
Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"`
}
func (x *DeleteBatchJobResponse) Reset() {
*x = DeleteBatchJobResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_integrations_scheduler_v1_definition_definition_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeleteBatchJobResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteBatchJobResponse) ProtoMessage() {}
func (x *DeleteBatchJobResponse) ProtoReflect() protoreflect.Message {
mi := &file_integrations_scheduler_v1_definition_definition_proto_msgTypes[7]
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 DeleteBatchJobResponse.ProtoReflect.Descriptor instead.
func (*DeleteBatchJobResponse) Descriptor() ([]byte, []int) {
return file_integrations_scheduler_v1_definition_definition_proto_rawDescGZIP(), []int{7}
}
func (x *DeleteBatchJobResponse) GetExists() bool {
if x != nil {
return x.Exists
}
return false
}
var File_integrations_scheduler_v1_definition_definition_proto protoreflect.FileDescriptor
var file_integrations_scheduler_v1_definition_definition_proto_rawDesc = []byte{
0x0a, 0x35, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73,
0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x66, 0x69,
0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c,
0x65, 0x72, 0x1a, 0x33, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x2f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65,
0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x6a, 0x6f,
0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x31, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2f,
0x76, 0x31, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x63, 0x6f,
0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x72, 0x0a, 0x15, 0x43, 0x72,
0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x70,
0x65, 0x63, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x34, 0x0a, 0x09, 0x62, 0x61, 0x74, 0x63,
0x68, 0x5f, 0x6a, 0x6f, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x63,
0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62,
0x53, 0x70, 0x65, 0x63, 0x52, 0x08, 0x62, 0x61, 0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62, 0x22, 0x48,
0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08,
0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08,
0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x22, 0x28, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x42,
0x61, 0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12,
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x22, 0x72, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4a, 0x6f,
0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x69,
0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74,
0x73, 0x12, 0x35, 0x0a, 0x09, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6a, 0x6f, 0x62, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72,
0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62, 0x48, 0x00, 0x52, 0x08, 0x62, 0x61, 0x74,
0x63, 0x68, 0x4a, 0x6f, 0x62, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x62, 0x61, 0x74,
0x63, 0x68, 0x5f, 0x6a, 0x6f, 0x62, 0x22, 0x15, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x61,
0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x35, 0x0a,
0x14, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6a,
0x6f, 0x62, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x62, 0x61, 0x74, 0x63, 0x68,
0x4a, 0x6f, 0x62, 0x73, 0x22, 0x72, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x61,
0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x2f, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x69, 0x6c,
0x64, 0x5f, 0x70, 0x6f, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0f,
0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x50, 0x6f, 0x64, 0x73, 0x88,
0x01, 0x01, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x63, 0x68,
0x69, 0x6c, 0x64, 0x5f, 0x70, 0x6f, 0x64, 0x73, 0x22, 0x30, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65,
0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01,
0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x32, 0xe2, 0x02, 0x0a, 0x0b, 0x53,
0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x56, 0x31, 0x12, 0x57, 0x0a, 0x0e, 0x43, 0x72,
0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62, 0x12, 0x20, 0x2e, 0x73,
0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42,
0x61, 0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21,
0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4a,
0x6f, 0x62, 0x12, 0x1d, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x47,
0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x1e, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x47, 0x65,
0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68,
0x4a, 0x6f, 0x62, 0x12, 0x1e, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e,
0x4c, 0x69, 0x73, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e,
0x4c, 0x69, 0x73, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
0x42, 0x61, 0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62, 0x12, 0x20, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64,
0x75, 0x6c, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68,
0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x73, 0x63, 0x68,
0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x61, 0x74,
0x63, 0x68, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42,
0x48, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x72,
0x61, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x2d, 0x61, 0x72, 0x61, 0x6e,
0x67, 0x6f, 0x64, 0x62, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x64,
0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}
var (
file_integrations_scheduler_v1_definition_definition_proto_rawDescOnce sync.Once
file_integrations_scheduler_v1_definition_definition_proto_rawDescData = file_integrations_scheduler_v1_definition_definition_proto_rawDesc
)
func file_integrations_scheduler_v1_definition_definition_proto_rawDescGZIP() []byte {
file_integrations_scheduler_v1_definition_definition_proto_rawDescOnce.Do(func() {
file_integrations_scheduler_v1_definition_definition_proto_rawDescData = protoimpl.X.CompressGZIP(file_integrations_scheduler_v1_definition_definition_proto_rawDescData)
})
return file_integrations_scheduler_v1_definition_definition_proto_rawDescData
}
var file_integrations_scheduler_v1_definition_definition_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_integrations_scheduler_v1_definition_definition_proto_goTypes = []interface{}{
(*CreateBatchJobRequest)(nil), // 0: scheduler.CreateBatchJobRequest
(*CreateBatchJobResponse)(nil), // 1: scheduler.CreateBatchJobResponse
(*GetBatchJobRequest)(nil), // 2: scheduler.GetBatchJobRequest
(*GetBatchJobResponse)(nil), // 3: scheduler.GetBatchJobResponse
(*ListBatchJobRequest)(nil), // 4: scheduler.ListBatchJobRequest
(*ListBatchJobResponse)(nil), // 5: scheduler.ListBatchJobResponse
(*DeleteBatchJobRequest)(nil), // 6: scheduler.DeleteBatchJobRequest
(*DeleteBatchJobResponse)(nil), // 7: scheduler.DeleteBatchJobResponse
(*Spec)(nil), // 8: scheduler.Spec
(*BatchJobSpec)(nil), // 9: scheduler.BatchJobSpec
(*BatchJob)(nil), // 10: scheduler.BatchJob
}
var file_integrations_scheduler_v1_definition_definition_proto_depIdxs = []int32{
8, // 0: scheduler.CreateBatchJobRequest.spec:type_name -> scheduler.Spec
9, // 1: scheduler.CreateBatchJobRequest.batch_job:type_name -> scheduler.BatchJobSpec
10, // 2: scheduler.GetBatchJobResponse.batch_job:type_name -> scheduler.BatchJob
0, // 3: scheduler.SchedulerV1.CreateBatchJob:input_type -> scheduler.CreateBatchJobRequest
2, // 4: scheduler.SchedulerV1.GetBatchJob:input_type -> scheduler.GetBatchJobRequest
4, // 5: scheduler.SchedulerV1.ListBatchJob:input_type -> scheduler.ListBatchJobRequest
6, // 6: scheduler.SchedulerV1.DeleteBatchJob:input_type -> scheduler.DeleteBatchJobRequest
1, // 7: scheduler.SchedulerV1.CreateBatchJob:output_type -> scheduler.CreateBatchJobResponse
3, // 8: scheduler.SchedulerV1.GetBatchJob:output_type -> scheduler.GetBatchJobResponse
5, // 9: scheduler.SchedulerV1.ListBatchJob:output_type -> scheduler.ListBatchJobResponse
7, // 10: scheduler.SchedulerV1.DeleteBatchJob:output_type -> scheduler.DeleteBatchJobResponse
7, // [7:11] is the sub-list for method output_type
3, // [3:7] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_integrations_scheduler_v1_definition_definition_proto_init() }
func file_integrations_scheduler_v1_definition_definition_proto_init() {
if File_integrations_scheduler_v1_definition_definition_proto != nil {
return
}
file_integrations_scheduler_v1_definition_batchjob_proto_init()
file_integrations_scheduler_v1_definition_common_proto_init()
if !protoimpl.UnsafeEnabled {
file_integrations_scheduler_v1_definition_definition_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreateBatchJobRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_integrations_scheduler_v1_definition_definition_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreateBatchJobResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_integrations_scheduler_v1_definition_definition_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetBatchJobRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_integrations_scheduler_v1_definition_definition_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetBatchJobResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_integrations_scheduler_v1_definition_definition_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListBatchJobRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_integrations_scheduler_v1_definition_definition_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListBatchJobResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_integrations_scheduler_v1_definition_definition_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteBatchJobRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_integrations_scheduler_v1_definition_definition_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteBatchJobResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_integrations_scheduler_v1_definition_definition_proto_msgTypes[3].OneofWrappers = []interface{}{}
file_integrations_scheduler_v1_definition_definition_proto_msgTypes[6].OneofWrappers = []interface{}{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_integrations_scheduler_v1_definition_definition_proto_rawDesc,
NumEnums: 0,
NumMessages: 8,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_integrations_scheduler_v1_definition_definition_proto_goTypes,
DependencyIndexes: file_integrations_scheduler_v1_definition_definition_proto_depIdxs,
MessageInfos: file_integrations_scheduler_v1_definition_definition_proto_msgTypes,
}.Build()
File_integrations_scheduler_v1_definition_definition_proto = out.File
file_integrations_scheduler_v1_definition_definition_proto_rawDesc = nil
file_integrations_scheduler_v1_definition_definition_proto_goTypes = nil
file_integrations_scheduler_v1_definition_definition_proto_depIdxs = nil
}

View file

@ -0,0 +1,102 @@
//
// DISCLAIMER
//
// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany
//
// 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 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.
//
// Copyright holder is ArangoDB GmbH, Cologne, Germany
//
syntax = "proto3";
package scheduler;
import "integrations/scheduler/v1/definition/batchjob.proto";
import "integrations/scheduler/v1/definition/common.proto";
option go_package = "github.com/arangodb/kube-arangodb/integrations/scheduler/v1/definition";
// Definition of the ServiceInterface for Scheduler V1
service SchedulerV1 {
// Creates BatchJob from specification
rpc CreateBatchJob(CreateBatchJobRequest) returns (CreateBatchJobResponse) {};
// Returns BatchJob. If job does not exists, Exists flag is set to false
rpc GetBatchJob(GetBatchJobRequest) returns (GetBatchJobResponse) {};
// Returns list of the BatchJobs
rpc ListBatchJob(ListBatchJobRequest) returns (ListBatchJobResponse) {};
// Deletes BatchJob. If job does not exists, Exists flag is set to false
rpc DeleteBatchJob(DeleteBatchJobRequest) returns (DeleteBatchJobResponse) {};
}
// Create Request
message CreateBatchJobRequest {
// Spec of the Schedule request
Spec spec = 1;
// BatchJob run settings
BatchJobSpec batch_job = 2;
}
// Create Response
message CreateBatchJobResponse {
// Name of the scheduled job
string name = 1;
// List of the assigned profiles
repeated string profiles = 2;
}
// Get Request
message GetBatchJobRequest {
// Name of the scheduled job
string name = 1;
}
// Get Response
message GetBatchJobResponse {
// Defines if job was found
bool exists = 1;
// BatchJob run settings and current status
optional BatchJob batch_job = 2;
}
// List Request
message ListBatchJobRequest {
}
// List Response
message ListBatchJobResponse {
// List of the BatchJobs
repeated string batch_jobs = 1;
}
// Delete Request
message DeleteBatchJobRequest {
// Name of the scheduled job
string name = 1;
// Defines if all child containers/pods should be removed together with job
optional bool delete_child_pods = 2;
}
// Delete Response
message DeleteBatchJobResponse {
// Defines if job was found
bool exists = 1;
}

View file

@ -0,0 +1,221 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.21.1
// source: integrations/scheduler/v1/definition/definition.proto
package definition
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// SchedulerV1Client is the client API for SchedulerV1 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 SchedulerV1Client interface {
// Creates BatchJob from specification
CreateBatchJob(ctx context.Context, in *CreateBatchJobRequest, opts ...grpc.CallOption) (*CreateBatchJobResponse, error)
// Returns BatchJob. If job does not exists, Exists flag is set to false
GetBatchJob(ctx context.Context, in *GetBatchJobRequest, opts ...grpc.CallOption) (*GetBatchJobResponse, error)
// Returns list of the BatchJobs
ListBatchJob(ctx context.Context, in *ListBatchJobRequest, opts ...grpc.CallOption) (*ListBatchJobResponse, error)
// Deletes BatchJob. If job does not exists, Exists flag is set to false
DeleteBatchJob(ctx context.Context, in *DeleteBatchJobRequest, opts ...grpc.CallOption) (*DeleteBatchJobResponse, error)
}
type schedulerV1Client struct {
cc grpc.ClientConnInterface
}
func NewSchedulerV1Client(cc grpc.ClientConnInterface) SchedulerV1Client {
return &schedulerV1Client{cc}
}
func (c *schedulerV1Client) CreateBatchJob(ctx context.Context, in *CreateBatchJobRequest, opts ...grpc.CallOption) (*CreateBatchJobResponse, error) {
out := new(CreateBatchJobResponse)
err := c.cc.Invoke(ctx, "/scheduler.SchedulerV1/CreateBatchJob", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *schedulerV1Client) GetBatchJob(ctx context.Context, in *GetBatchJobRequest, opts ...grpc.CallOption) (*GetBatchJobResponse, error) {
out := new(GetBatchJobResponse)
err := c.cc.Invoke(ctx, "/scheduler.SchedulerV1/GetBatchJob", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *schedulerV1Client) ListBatchJob(ctx context.Context, in *ListBatchJobRequest, opts ...grpc.CallOption) (*ListBatchJobResponse, error) {
out := new(ListBatchJobResponse)
err := c.cc.Invoke(ctx, "/scheduler.SchedulerV1/ListBatchJob", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *schedulerV1Client) DeleteBatchJob(ctx context.Context, in *DeleteBatchJobRequest, opts ...grpc.CallOption) (*DeleteBatchJobResponse, error) {
out := new(DeleteBatchJobResponse)
err := c.cc.Invoke(ctx, "/scheduler.SchedulerV1/DeleteBatchJob", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// SchedulerV1Server is the server API for SchedulerV1 service.
// All implementations must embed UnimplementedSchedulerV1Server
// for forward compatibility
type SchedulerV1Server interface {
// Creates BatchJob from specification
CreateBatchJob(context.Context, *CreateBatchJobRequest) (*CreateBatchJobResponse, error)
// Returns BatchJob. If job does not exists, Exists flag is set to false
GetBatchJob(context.Context, *GetBatchJobRequest) (*GetBatchJobResponse, error)
// Returns list of the BatchJobs
ListBatchJob(context.Context, *ListBatchJobRequest) (*ListBatchJobResponse, error)
// Deletes BatchJob. If job does not exists, Exists flag is set to false
DeleteBatchJob(context.Context, *DeleteBatchJobRequest) (*DeleteBatchJobResponse, error)
mustEmbedUnimplementedSchedulerV1Server()
}
// UnimplementedSchedulerV1Server must be embedded to have forward compatible implementations.
type UnimplementedSchedulerV1Server struct {
}
func (UnimplementedSchedulerV1Server) CreateBatchJob(context.Context, *CreateBatchJobRequest) (*CreateBatchJobResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateBatchJob not implemented")
}
func (UnimplementedSchedulerV1Server) GetBatchJob(context.Context, *GetBatchJobRequest) (*GetBatchJobResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetBatchJob not implemented")
}
func (UnimplementedSchedulerV1Server) ListBatchJob(context.Context, *ListBatchJobRequest) (*ListBatchJobResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListBatchJob not implemented")
}
func (UnimplementedSchedulerV1Server) DeleteBatchJob(context.Context, *DeleteBatchJobRequest) (*DeleteBatchJobResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteBatchJob not implemented")
}
func (UnimplementedSchedulerV1Server) mustEmbedUnimplementedSchedulerV1Server() {}
// UnsafeSchedulerV1Server may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to SchedulerV1Server will
// result in compilation errors.
type UnsafeSchedulerV1Server interface {
mustEmbedUnimplementedSchedulerV1Server()
}
func RegisterSchedulerV1Server(s grpc.ServiceRegistrar, srv SchedulerV1Server) {
s.RegisterService(&SchedulerV1_ServiceDesc, srv)
}
func _SchedulerV1_CreateBatchJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateBatchJobRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SchedulerV1Server).CreateBatchJob(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/scheduler.SchedulerV1/CreateBatchJob",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SchedulerV1Server).CreateBatchJob(ctx, req.(*CreateBatchJobRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SchedulerV1_GetBatchJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetBatchJobRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SchedulerV1Server).GetBatchJob(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/scheduler.SchedulerV1/GetBatchJob",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SchedulerV1Server).GetBatchJob(ctx, req.(*GetBatchJobRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SchedulerV1_ListBatchJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListBatchJobRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SchedulerV1Server).ListBatchJob(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/scheduler.SchedulerV1/ListBatchJob",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SchedulerV1Server).ListBatchJob(ctx, req.(*ListBatchJobRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SchedulerV1_DeleteBatchJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteBatchJobRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SchedulerV1Server).DeleteBatchJob(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/scheduler.SchedulerV1/DeleteBatchJob",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SchedulerV1Server).DeleteBatchJob(ctx, req.(*DeleteBatchJobRequest))
}
return interceptor(ctx, in, info, handler)
}
// SchedulerV1_ServiceDesc is the grpc.ServiceDesc for SchedulerV1 service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SchedulerV1_ServiceDesc = grpc.ServiceDesc{
ServiceName: "scheduler.SchedulerV1",
HandlerType: (*SchedulerV1Server)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CreateBatchJob",
Handler: _SchedulerV1_CreateBatchJob_Handler,
},
{
MethodName: "GetBatchJob",
Handler: _SchedulerV1_GetBatchJob_Handler,
},
{
MethodName: "ListBatchJob",
Handler: _SchedulerV1_ListBatchJob_Handler,
},
{
MethodName: "DeleteBatchJob",
Handler: _SchedulerV1_DeleteBatchJob_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "integrations/scheduler/v1/definition/definition.proto",
}