diff --git a/flyteidl/clients/go/cacheservice/mocks/CacheServiceClient.go b/flyteidl/clients/go/cacheservice/mocks/CacheServiceClient.go new file mode 100644 index 0000000000..53916fe991 --- /dev/null +++ b/flyteidl/clients/go/cacheservice/mocks/CacheServiceClient.go @@ -0,0 +1,258 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + context "context" + + cacheservice "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/cacheservice" + + grpc "google.golang.org/grpc" + + mock "github.com/stretchr/testify/mock" +) + +// CacheServiceClient is an autogenerated mock type for the CacheServiceClient type +type CacheServiceClient struct { + mock.Mock +} + +type CacheServiceClient_Delete struct { + *mock.Call +} + +func (_m CacheServiceClient_Delete) Return(_a0 *cacheservice.DeleteCacheResponse, _a1 error) *CacheServiceClient_Delete { + return &CacheServiceClient_Delete{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *CacheServiceClient) OnDelete(ctx context.Context, in *cacheservice.DeleteCacheRequest, opts ...grpc.CallOption) *CacheServiceClient_Delete { + c_call := _m.On("Delete", ctx, in, opts) + return &CacheServiceClient_Delete{Call: c_call} +} + +func (_m *CacheServiceClient) OnDeleteMatch(matchers ...interface{}) *CacheServiceClient_Delete { + c_call := _m.On("Delete", matchers...) + return &CacheServiceClient_Delete{Call: c_call} +} + +// Delete provides a mock function with given fields: ctx, in, opts +func (_m *CacheServiceClient) Delete(ctx context.Context, in *cacheservice.DeleteCacheRequest, opts ...grpc.CallOption) (*cacheservice.DeleteCacheResponse, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, in) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *cacheservice.DeleteCacheResponse + if rf, ok := ret.Get(0).(func(context.Context, *cacheservice.DeleteCacheRequest, ...grpc.CallOption) *cacheservice.DeleteCacheResponse); ok { + r0 = rf(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cacheservice.DeleteCacheResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *cacheservice.DeleteCacheRequest, ...grpc.CallOption) error); ok { + r1 = rf(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type CacheServiceClient_Get struct { + *mock.Call +} + +func (_m CacheServiceClient_Get) Return(_a0 *cacheservice.GetCacheResponse, _a1 error) *CacheServiceClient_Get { + return &CacheServiceClient_Get{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *CacheServiceClient) OnGet(ctx context.Context, in *cacheservice.GetCacheRequest, opts ...grpc.CallOption) *CacheServiceClient_Get { + c_call := _m.On("Get", ctx, in, opts) + return &CacheServiceClient_Get{Call: c_call} +} + +func (_m *CacheServiceClient) OnGetMatch(matchers ...interface{}) *CacheServiceClient_Get { + c_call := _m.On("Get", matchers...) + return &CacheServiceClient_Get{Call: c_call} +} + +// Get provides a mock function with given fields: ctx, in, opts +func (_m *CacheServiceClient) Get(ctx context.Context, in *cacheservice.GetCacheRequest, opts ...grpc.CallOption) (*cacheservice.GetCacheResponse, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, in) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *cacheservice.GetCacheResponse + if rf, ok := ret.Get(0).(func(context.Context, *cacheservice.GetCacheRequest, ...grpc.CallOption) *cacheservice.GetCacheResponse); ok { + r0 = rf(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cacheservice.GetCacheResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *cacheservice.GetCacheRequest, ...grpc.CallOption) error); ok { + r1 = rf(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type CacheServiceClient_GetOrExtendReservation struct { + *mock.Call +} + +func (_m CacheServiceClient_GetOrExtendReservation) Return(_a0 *cacheservice.GetOrExtendReservationResponse, _a1 error) *CacheServiceClient_GetOrExtendReservation { + return &CacheServiceClient_GetOrExtendReservation{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *CacheServiceClient) OnGetOrExtendReservation(ctx context.Context, in *cacheservice.GetOrExtendReservationRequest, opts ...grpc.CallOption) *CacheServiceClient_GetOrExtendReservation { + c_call := _m.On("GetOrExtendReservation", ctx, in, opts) + return &CacheServiceClient_GetOrExtendReservation{Call: c_call} +} + +func (_m *CacheServiceClient) OnGetOrExtendReservationMatch(matchers ...interface{}) *CacheServiceClient_GetOrExtendReservation { + c_call := _m.On("GetOrExtendReservation", matchers...) + return &CacheServiceClient_GetOrExtendReservation{Call: c_call} +} + +// GetOrExtendReservation provides a mock function with given fields: ctx, in, opts +func (_m *CacheServiceClient) GetOrExtendReservation(ctx context.Context, in *cacheservice.GetOrExtendReservationRequest, opts ...grpc.CallOption) (*cacheservice.GetOrExtendReservationResponse, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, in) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *cacheservice.GetOrExtendReservationResponse + if rf, ok := ret.Get(0).(func(context.Context, *cacheservice.GetOrExtendReservationRequest, ...grpc.CallOption) *cacheservice.GetOrExtendReservationResponse); ok { + r0 = rf(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cacheservice.GetOrExtendReservationResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *cacheservice.GetOrExtendReservationRequest, ...grpc.CallOption) error); ok { + r1 = rf(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type CacheServiceClient_Put struct { + *mock.Call +} + +func (_m CacheServiceClient_Put) Return(_a0 *cacheservice.PutCacheResponse, _a1 error) *CacheServiceClient_Put { + return &CacheServiceClient_Put{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *CacheServiceClient) OnPut(ctx context.Context, in *cacheservice.PutCacheRequest, opts ...grpc.CallOption) *CacheServiceClient_Put { + c_call := _m.On("Put", ctx, in, opts) + return &CacheServiceClient_Put{Call: c_call} +} + +func (_m *CacheServiceClient) OnPutMatch(matchers ...interface{}) *CacheServiceClient_Put { + c_call := _m.On("Put", matchers...) + return &CacheServiceClient_Put{Call: c_call} +} + +// Put provides a mock function with given fields: ctx, in, opts +func (_m *CacheServiceClient) Put(ctx context.Context, in *cacheservice.PutCacheRequest, opts ...grpc.CallOption) (*cacheservice.PutCacheResponse, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, in) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *cacheservice.PutCacheResponse + if rf, ok := ret.Get(0).(func(context.Context, *cacheservice.PutCacheRequest, ...grpc.CallOption) *cacheservice.PutCacheResponse); ok { + r0 = rf(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cacheservice.PutCacheResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *cacheservice.PutCacheRequest, ...grpc.CallOption) error); ok { + r1 = rf(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type CacheServiceClient_ReleaseReservation struct { + *mock.Call +} + +func (_m CacheServiceClient_ReleaseReservation) Return(_a0 *cacheservice.ReleaseReservationResponse, _a1 error) *CacheServiceClient_ReleaseReservation { + return &CacheServiceClient_ReleaseReservation{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *CacheServiceClient) OnReleaseReservation(ctx context.Context, in *cacheservice.ReleaseReservationRequest, opts ...grpc.CallOption) *CacheServiceClient_ReleaseReservation { + c_call := _m.On("ReleaseReservation", ctx, in, opts) + return &CacheServiceClient_ReleaseReservation{Call: c_call} +} + +func (_m *CacheServiceClient) OnReleaseReservationMatch(matchers ...interface{}) *CacheServiceClient_ReleaseReservation { + c_call := _m.On("ReleaseReservation", matchers...) + return &CacheServiceClient_ReleaseReservation{Call: c_call} +} + +// ReleaseReservation provides a mock function with given fields: ctx, in, opts +func (_m *CacheServiceClient) ReleaseReservation(ctx context.Context, in *cacheservice.ReleaseReservationRequest, opts ...grpc.CallOption) (*cacheservice.ReleaseReservationResponse, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, in) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *cacheservice.ReleaseReservationResponse + if rf, ok := ret.Get(0).(func(context.Context, *cacheservice.ReleaseReservationRequest, ...grpc.CallOption) *cacheservice.ReleaseReservationResponse); ok { + r0 = rf(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cacheservice.ReleaseReservationResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *cacheservice.ReleaseReservationRequest, ...grpc.CallOption) error); ok { + r1 = rf(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} diff --git a/flyteidl/gen/pb-es/flyteidl/cacheservice/cacheservice_connect.ts b/flyteidl/gen/pb-es/flyteidl/cacheservice/cacheservice_connect.ts new file mode 100644 index 0000000000..3a4956b93b --- /dev/null +++ b/flyteidl/gen/pb-es/flyteidl/cacheservice/cacheservice_connect.ts @@ -0,0 +1,75 @@ +// @generated by protoc-gen-connect-es v1.3.0 with parameter "target=ts" +// @generated from file flyteidl/cacheservice/cacheservice.proto (package flyteidl.cacheservice, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { DeleteCacheRequest, DeleteCacheResponse, GetCacheRequest, GetCacheResponse, GetOrExtendReservationRequest, GetOrExtendReservationResponse, PutCacheRequest, PutCacheResponse, ReleaseReservationRequest, ReleaseReservationResponse } from "./cacheservice_pb.js"; +import { MethodKind } from "@bufbuild/protobuf"; + +/** + * + * CacheService defines operations for cache management including retrieval, storage, and deletion of cached task/workflow outputs. + * + * @generated from service flyteidl.cacheservice.CacheService + */ +export const CacheService = { + typeName: "flyteidl.cacheservice.CacheService", + methods: { + /** + * Retrieves cached data by key. + * + * @generated from rpc flyteidl.cacheservice.CacheService.Get + */ + get: { + name: "Get", + I: GetCacheRequest, + O: GetCacheResponse, + kind: MethodKind.Unary, + }, + /** + * Stores or updates cached data by key. + * + * @generated from rpc flyteidl.cacheservice.CacheService.Put + */ + put: { + name: "Put", + I: PutCacheRequest, + O: PutCacheResponse, + kind: MethodKind.Unary, + }, + /** + * Deletes cached data by key. + * + * @generated from rpc flyteidl.cacheservice.CacheService.Delete + */ + delete: { + name: "Delete", + I: DeleteCacheRequest, + O: DeleteCacheResponse, + kind: MethodKind.Unary, + }, + /** + * Get or extend a reservation for a cache key + * + * @generated from rpc flyteidl.cacheservice.CacheService.GetOrExtendReservation + */ + getOrExtendReservation: { + name: "GetOrExtendReservation", + I: GetOrExtendReservationRequest, + O: GetOrExtendReservationResponse, + kind: MethodKind.Unary, + }, + /** + * Release the reservation for a cache key + * + * @generated from rpc flyteidl.cacheservice.CacheService.ReleaseReservation + */ + releaseReservation: { + name: "ReleaseReservation", + I: ReleaseReservationRequest, + O: ReleaseReservationResponse, + kind: MethodKind.Unary, + }, + } +} as const; + diff --git a/flyteidl/gen/pb-es/flyteidl/cacheservice/cacheservice_pb.ts b/flyteidl/gen/pb-es/flyteidl/cacheservice/cacheservice_pb.ts new file mode 100644 index 0000000000..ff6304fde4 --- /dev/null +++ b/flyteidl/gen/pb-es/flyteidl/cacheservice/cacheservice_pb.ts @@ -0,0 +1,690 @@ +// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" +// @generated from file flyteidl/cacheservice/cacheservice.proto (package flyteidl.cacheservice, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Duration, Message, proto3, Timestamp } from "@bufbuild/protobuf"; +import { Identifier } from "../core/identifier_pb.js"; +import { LiteralMap } from "../core/literals_pb.js"; + +/** + * + * Additional metadata as key-value pairs + * + * @generated from message flyteidl.cacheservice.KeyMapMetadata + */ +export class KeyMapMetadata extends Message { + /** + * Additional metadata as key-value pairs + * + * @generated from field: map values = 1; + */ + values: { [key: string]: string } = {}; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.cacheservice.KeyMapMetadata"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "values", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): KeyMapMetadata { + return new KeyMapMetadata().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): KeyMapMetadata { + return new KeyMapMetadata().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): KeyMapMetadata { + return new KeyMapMetadata().fromJsonString(jsonString, options); + } + + static equals(a: KeyMapMetadata | PlainMessage | undefined, b: KeyMapMetadata | PlainMessage | undefined): boolean { + return proto3.util.equals(KeyMapMetadata, a, b); + } +} + +/** + * + * Metadata for cached outputs, including the source identifier and timestamps. + * + * @generated from message flyteidl.cacheservice.Metadata + */ +export class Metadata extends Message { + /** + * Source task or workflow identifier + * + * @generated from field: flyteidl.core.Identifier source_identifier = 1; + */ + sourceIdentifier?: Identifier; + + /** + * Additional metadata as key-value pairs + * + * @generated from field: flyteidl.cacheservice.KeyMapMetadata key_map = 2; + */ + keyMap?: KeyMapMetadata; + + /** + * Creation timestamp + * + * @generated from field: google.protobuf.Timestamp created_at = 3; + */ + createdAt?: Timestamp; + + /** + * Last update timestamp + * + * @generated from field: google.protobuf.Timestamp last_updated_at = 4; + */ + lastUpdatedAt?: Timestamp; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.cacheservice.Metadata"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "source_identifier", kind: "message", T: Identifier }, + { no: 2, name: "key_map", kind: "message", T: KeyMapMetadata }, + { no: 3, name: "created_at", kind: "message", T: Timestamp }, + { no: 4, name: "last_updated_at", kind: "message", T: Timestamp }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Metadata { + return new Metadata().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Metadata { + return new Metadata().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Metadata { + return new Metadata().fromJsonString(jsonString, options); + } + + static equals(a: Metadata | PlainMessage | undefined, b: Metadata | PlainMessage | undefined): boolean { + return proto3.util.equals(Metadata, a, b); + } +} + +/** + * + * Represents cached output, either as literals or an URI, with associated metadata. + * + * @generated from message flyteidl.cacheservice.CachedOutput + */ +export class CachedOutput extends Message { + /** + * @generated from oneof flyteidl.cacheservice.CachedOutput.output + */ + output: { + /** + * Output literals + * + * @generated from field: flyteidl.core.LiteralMap output_literals = 1; + */ + value: LiteralMap; + case: "outputLiterals"; + } | { + /** + * URI to output data + * + * @generated from field: string output_uri = 2; + */ + value: string; + case: "outputUri"; + } | { case: undefined; value?: undefined } = { case: undefined }; + + /** + * Associated metadata + * + * @generated from field: flyteidl.cacheservice.Metadata metadata = 3; + */ + metadata?: Metadata; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.cacheservice.CachedOutput"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "output_literals", kind: "message", T: LiteralMap, oneof: "output" }, + { no: 2, name: "output_uri", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "output" }, + { no: 3, name: "metadata", kind: "message", T: Metadata }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): CachedOutput { + return new CachedOutput().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): CachedOutput { + return new CachedOutput().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): CachedOutput { + return new CachedOutput().fromJsonString(jsonString, options); + } + + static equals(a: CachedOutput | PlainMessage | undefined, b: CachedOutput | PlainMessage | undefined): boolean { + return proto3.util.equals(CachedOutput, a, b); + } +} + +/** + * + * Request to retrieve cached data by key. + * + * @generated from message flyteidl.cacheservice.GetCacheRequest + */ +export class GetCacheRequest extends Message { + /** + * Cache key + * + * @generated from field: string key = 1; + */ + key = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.cacheservice.GetCacheRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetCacheRequest { + return new GetCacheRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetCacheRequest { + return new GetCacheRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetCacheRequest { + return new GetCacheRequest().fromJsonString(jsonString, options); + } + + static equals(a: GetCacheRequest | PlainMessage | undefined, b: GetCacheRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(GetCacheRequest, a, b); + } +} + +/** + * + * Response with cached data for a given key. + * + * @generated from message flyteidl.cacheservice.GetCacheResponse + */ +export class GetCacheResponse extends Message { + /** + * Cached output + * + * @generated from field: flyteidl.cacheservice.CachedOutput output = 1; + */ + output?: CachedOutput; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.cacheservice.GetCacheResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "output", kind: "message", T: CachedOutput }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetCacheResponse { + return new GetCacheResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetCacheResponse { + return new GetCacheResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetCacheResponse { + return new GetCacheResponse().fromJsonString(jsonString, options); + } + + static equals(a: GetCacheResponse | PlainMessage | undefined, b: GetCacheResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(GetCacheResponse, a, b); + } +} + +/** + * + * Request to store/update cached data by key. + * + * @generated from message flyteidl.cacheservice.PutCacheRequest + */ +export class PutCacheRequest extends Message { + /** + * Cache key + * + * @generated from field: string key = 1; + */ + key = ""; + + /** + * Output to cache + * + * @generated from field: flyteidl.cacheservice.CachedOutput output = 2; + */ + output?: CachedOutput; + + /** + * Overwrite flag + * + * @generated from field: bool overwrite = 3; + */ + overwrite = false; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.cacheservice.PutCacheRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "output", kind: "message", T: CachedOutput }, + { no: 3, name: "overwrite", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): PutCacheRequest { + return new PutCacheRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): PutCacheRequest { + return new PutCacheRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): PutCacheRequest { + return new PutCacheRequest().fromJsonString(jsonString, options); + } + + static equals(a: PutCacheRequest | PlainMessage | undefined, b: PutCacheRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(PutCacheRequest, a, b); + } +} + +/** + * + * Response message of cache store/update operation. + * + * Empty, success indicated by no errors + * + * @generated from message flyteidl.cacheservice.PutCacheResponse + */ +export class PutCacheResponse extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.cacheservice.PutCacheResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): PutCacheResponse { + return new PutCacheResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): PutCacheResponse { + return new PutCacheResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): PutCacheResponse { + return new PutCacheResponse().fromJsonString(jsonString, options); + } + + static equals(a: PutCacheResponse | PlainMessage | undefined, b: PutCacheResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(PutCacheResponse, a, b); + } +} + +/** + * + * Request to delete cached data by key. + * + * @generated from message flyteidl.cacheservice.DeleteCacheRequest + */ +export class DeleteCacheRequest extends Message { + /** + * Cache key + * + * @generated from field: string key = 1; + */ + key = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.cacheservice.DeleteCacheRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): DeleteCacheRequest { + return new DeleteCacheRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): DeleteCacheRequest { + return new DeleteCacheRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): DeleteCacheRequest { + return new DeleteCacheRequest().fromJsonString(jsonString, options); + } + + static equals(a: DeleteCacheRequest | PlainMessage | undefined, b: DeleteCacheRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(DeleteCacheRequest, a, b); + } +} + +/** + * + * Response message of cache deletion operation. + * + * Empty, success indicated by no errors + * + * @generated from message flyteidl.cacheservice.DeleteCacheResponse + */ +export class DeleteCacheResponse extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.cacheservice.DeleteCacheResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): DeleteCacheResponse { + return new DeleteCacheResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): DeleteCacheResponse { + return new DeleteCacheResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): DeleteCacheResponse { + return new DeleteCacheResponse().fromJsonString(jsonString, options); + } + + static equals(a: DeleteCacheResponse | PlainMessage | undefined, b: DeleteCacheResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(DeleteCacheResponse, a, b); + } +} + +/** + * A reservation including owner, heartbeat interval, expiration timestamp, and various metadata. + * + * @generated from message flyteidl.cacheservice.Reservation + */ +export class Reservation extends Message { + /** + * The unique ID for the reservation - same as the cache key + * + * @generated from field: string key = 1; + */ + key = ""; + + /** + * The unique ID of the owner for the reservation + * + * @generated from field: string owner_id = 2; + */ + ownerId = ""; + + /** + * Requested reservation extension heartbeat interval + * + * @generated from field: google.protobuf.Duration heartbeat_interval = 3; + */ + heartbeatInterval?: Duration; + + /** + * Expiration timestamp of this reservation + * + * @generated from field: google.protobuf.Timestamp expires_at = 4; + */ + expiresAt?: Timestamp; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.cacheservice.Reservation"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "owner_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "heartbeat_interval", kind: "message", T: Duration }, + { no: 4, name: "expires_at", kind: "message", T: Timestamp }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Reservation { + return new Reservation().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Reservation { + return new Reservation().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Reservation { + return new Reservation().fromJsonString(jsonString, options); + } + + static equals(a: Reservation | PlainMessage | undefined, b: Reservation | PlainMessage | undefined): boolean { + return proto3.util.equals(Reservation, a, b); + } +} + +/** + * + * Request to get or extend a reservation for a cache key + * + * @generated from message flyteidl.cacheservice.GetOrExtendReservationRequest + */ +export class GetOrExtendReservationRequest extends Message { + /** + * The unique ID for the reservation - same as the cache key + * + * @generated from field: string key = 1; + */ + key = ""; + + /** + * The unique ID of the owner for the reservation + * + * @generated from field: string owner_id = 2; + */ + ownerId = ""; + + /** + * Requested reservation extension heartbeat interval + * + * @generated from field: google.protobuf.Duration heartbeat_interval = 3; + */ + heartbeatInterval?: Duration; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.cacheservice.GetOrExtendReservationRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "owner_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "heartbeat_interval", kind: "message", T: Duration }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetOrExtendReservationRequest { + return new GetOrExtendReservationRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetOrExtendReservationRequest { + return new GetOrExtendReservationRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetOrExtendReservationRequest { + return new GetOrExtendReservationRequest().fromJsonString(jsonString, options); + } + + static equals(a: GetOrExtendReservationRequest | PlainMessage | undefined, b: GetOrExtendReservationRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(GetOrExtendReservationRequest, a, b); + } +} + +/** + * + * Request to get or extend a reservation for a cache key + * + * @generated from message flyteidl.cacheservice.GetOrExtendReservationResponse + */ +export class GetOrExtendReservationResponse extends Message { + /** + * The reservation that was created or extended + * + * @generated from field: flyteidl.cacheservice.Reservation reservation = 1; + */ + reservation?: Reservation; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.cacheservice.GetOrExtendReservationResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "reservation", kind: "message", T: Reservation }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetOrExtendReservationResponse { + return new GetOrExtendReservationResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetOrExtendReservationResponse { + return new GetOrExtendReservationResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetOrExtendReservationResponse { + return new GetOrExtendReservationResponse().fromJsonString(jsonString, options); + } + + static equals(a: GetOrExtendReservationResponse | PlainMessage | undefined, b: GetOrExtendReservationResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(GetOrExtendReservationResponse, a, b); + } +} + +/** + * + * Request to release the reservation for a cache key + * + * @generated from message flyteidl.cacheservice.ReleaseReservationRequest + */ +export class ReleaseReservationRequest extends Message { + /** + * The unique ID for the reservation - same as the cache key + * + * @generated from field: string key = 1; + */ + key = ""; + + /** + * The unique ID of the owner for the reservation + * + * @generated from field: string owner_id = 2; + */ + ownerId = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.cacheservice.ReleaseReservationRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "owner_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ReleaseReservationRequest { + return new ReleaseReservationRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ReleaseReservationRequest { + return new ReleaseReservationRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ReleaseReservationRequest { + return new ReleaseReservationRequest().fromJsonString(jsonString, options); + } + + static equals(a: ReleaseReservationRequest | PlainMessage | undefined, b: ReleaseReservationRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(ReleaseReservationRequest, a, b); + } +} + +/** + * + * Response message of release reservation operation. + * + * Empty, success indicated by no errors + * + * @generated from message flyteidl.cacheservice.ReleaseReservationResponse + */ +export class ReleaseReservationResponse extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.cacheservice.ReleaseReservationResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ReleaseReservationResponse { + return new ReleaseReservationResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ReleaseReservationResponse { + return new ReleaseReservationResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ReleaseReservationResponse { + return new ReleaseReservationResponse().fromJsonString(jsonString, options); + } + + static equals(a: ReleaseReservationResponse | PlainMessage | undefined, b: ReleaseReservationResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(ReleaseReservationResponse, a, b); + } +} + diff --git a/flyteidl/gen/pb-go/flyteidl/cacheservice/cacheservice.pb.go b/flyteidl/gen/pb-go/flyteidl/cacheservice/cacheservice.pb.go new file mode 100644 index 0000000000..2422e06201 --- /dev/null +++ b/flyteidl/gen/pb-go/flyteidl/cacheservice/cacheservice.pb.go @@ -0,0 +1,1228 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc (unknown) +// source: flyteidl/cacheservice/cacheservice.proto + +package cacheservice + +import ( + core "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + 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) +) + +// Additional metadata as key-value pairs +type KeyMapMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Values map[string]string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Additional metadata as key-value pairs +} + +func (x *KeyMapMetadata) Reset() { + *x = KeyMapMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_cacheservice_cacheservice_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *KeyMapMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KeyMapMetadata) ProtoMessage() {} + +func (x *KeyMapMetadata) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_cacheservice_cacheservice_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 KeyMapMetadata.ProtoReflect.Descriptor instead. +func (*KeyMapMetadata) Descriptor() ([]byte, []int) { + return file_flyteidl_cacheservice_cacheservice_proto_rawDescGZIP(), []int{0} +} + +func (x *KeyMapMetadata) GetValues() map[string]string { + if x != nil { + return x.Values + } + return nil +} + +// Metadata for cached outputs, including the source identifier and timestamps. +type Metadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SourceIdentifier *core.Identifier `protobuf:"bytes,1,opt,name=source_identifier,json=sourceIdentifier,proto3" json:"source_identifier,omitempty"` // Source task or workflow identifier + KeyMap *KeyMapMetadata `protobuf:"bytes,2,opt,name=key_map,json=keyMap,proto3" json:"key_map,omitempty"` // Additional metadata as key-value pairs + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // Creation timestamp + LastUpdatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=last_updated_at,json=lastUpdatedAt,proto3" json:"last_updated_at,omitempty"` // Last update timestamp +} + +func (x *Metadata) Reset() { + *x = Metadata{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_cacheservice_cacheservice_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_flyteidl_cacheservice_cacheservice_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_flyteidl_cacheservice_cacheservice_proto_rawDescGZIP(), []int{1} +} + +func (x *Metadata) GetSourceIdentifier() *core.Identifier { + if x != nil { + return x.SourceIdentifier + } + return nil +} + +func (x *Metadata) GetKeyMap() *KeyMapMetadata { + if x != nil { + return x.KeyMap + } + return nil +} + +func (x *Metadata) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Metadata) GetLastUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.LastUpdatedAt + } + return nil +} + +// Represents cached output, either as literals or an URI, with associated metadata. +type CachedOutput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Output: + // + // *CachedOutput_OutputLiterals + // *CachedOutput_OutputUri + Output isCachedOutput_Output `protobuf_oneof:"output"` + Metadata *Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` // Associated metadata +} + +func (x *CachedOutput) Reset() { + *x = CachedOutput{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_cacheservice_cacheservice_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CachedOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CachedOutput) ProtoMessage() {} + +func (x *CachedOutput) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_cacheservice_cacheservice_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 CachedOutput.ProtoReflect.Descriptor instead. +func (*CachedOutput) Descriptor() ([]byte, []int) { + return file_flyteidl_cacheservice_cacheservice_proto_rawDescGZIP(), []int{2} +} + +func (m *CachedOutput) GetOutput() isCachedOutput_Output { + if m != nil { + return m.Output + } + return nil +} + +func (x *CachedOutput) GetOutputLiterals() *core.LiteralMap { + if x, ok := x.GetOutput().(*CachedOutput_OutputLiterals); ok { + return x.OutputLiterals + } + return nil +} + +func (x *CachedOutput) GetOutputUri() string { + if x, ok := x.GetOutput().(*CachedOutput_OutputUri); ok { + return x.OutputUri + } + return "" +} + +func (x *CachedOutput) GetMetadata() *Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +type isCachedOutput_Output interface { + isCachedOutput_Output() +} + +type CachedOutput_OutputLiterals struct { + OutputLiterals *core.LiteralMap `protobuf:"bytes,1,opt,name=output_literals,json=outputLiterals,proto3,oneof"` // Output literals +} + +type CachedOutput_OutputUri struct { + OutputUri string `protobuf:"bytes,2,opt,name=output_uri,json=outputUri,proto3,oneof"` // URI to output data +} + +func (*CachedOutput_OutputLiterals) isCachedOutput_Output() {} + +func (*CachedOutput_OutputUri) isCachedOutput_Output() {} + +// Request to retrieve cached data by key. +type GetCacheRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // Cache key +} + +func (x *GetCacheRequest) Reset() { + *x = GetCacheRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_cacheservice_cacheservice_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetCacheRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCacheRequest) ProtoMessage() {} + +func (x *GetCacheRequest) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_cacheservice_cacheservice_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 GetCacheRequest.ProtoReflect.Descriptor instead. +func (*GetCacheRequest) Descriptor() ([]byte, []int) { + return file_flyteidl_cacheservice_cacheservice_proto_rawDescGZIP(), []int{3} +} + +func (x *GetCacheRequest) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +// Response with cached data for a given key. +type GetCacheResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Output *CachedOutput `protobuf:"bytes,1,opt,name=output,proto3" json:"output,omitempty"` // Cached output +} + +func (x *GetCacheResponse) Reset() { + *x = GetCacheResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_cacheservice_cacheservice_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetCacheResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCacheResponse) ProtoMessage() {} + +func (x *GetCacheResponse) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_cacheservice_cacheservice_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 GetCacheResponse.ProtoReflect.Descriptor instead. +func (*GetCacheResponse) Descriptor() ([]byte, []int) { + return file_flyteidl_cacheservice_cacheservice_proto_rawDescGZIP(), []int{4} +} + +func (x *GetCacheResponse) GetOutput() *CachedOutput { + if x != nil { + return x.Output + } + return nil +} + +// Request to store/update cached data by key. +type PutCacheRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // Cache key + Output *CachedOutput `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"` // Output to cache + Overwrite bool `protobuf:"varint,3,opt,name=overwrite,proto3" json:"overwrite,omitempty"` // Overwrite flag +} + +func (x *PutCacheRequest) Reset() { + *x = PutCacheRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_cacheservice_cacheservice_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PutCacheRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PutCacheRequest) ProtoMessage() {} + +func (x *PutCacheRequest) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_cacheservice_cacheservice_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 PutCacheRequest.ProtoReflect.Descriptor instead. +func (*PutCacheRequest) Descriptor() ([]byte, []int) { + return file_flyteidl_cacheservice_cacheservice_proto_rawDescGZIP(), []int{5} +} + +func (x *PutCacheRequest) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *PutCacheRequest) GetOutput() *CachedOutput { + if x != nil { + return x.Output + } + return nil +} + +func (x *PutCacheRequest) GetOverwrite() bool { + if x != nil { + return x.Overwrite + } + return false +} + +// Response message of cache store/update operation. +type PutCacheResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PutCacheResponse) Reset() { + *x = PutCacheResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_cacheservice_cacheservice_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PutCacheResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PutCacheResponse) ProtoMessage() {} + +func (x *PutCacheResponse) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_cacheservice_cacheservice_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 PutCacheResponse.ProtoReflect.Descriptor instead. +func (*PutCacheResponse) Descriptor() ([]byte, []int) { + return file_flyteidl_cacheservice_cacheservice_proto_rawDescGZIP(), []int{6} +} + +// Request to delete cached data by key. +type DeleteCacheRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // Cache key +} + +func (x *DeleteCacheRequest) Reset() { + *x = DeleteCacheRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_cacheservice_cacheservice_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteCacheRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteCacheRequest) ProtoMessage() {} + +func (x *DeleteCacheRequest) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_cacheservice_cacheservice_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 DeleteCacheRequest.ProtoReflect.Descriptor instead. +func (*DeleteCacheRequest) Descriptor() ([]byte, []int) { + return file_flyteidl_cacheservice_cacheservice_proto_rawDescGZIP(), []int{7} +} + +func (x *DeleteCacheRequest) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +// Response message of cache deletion operation. +type DeleteCacheResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeleteCacheResponse) Reset() { + *x = DeleteCacheResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_cacheservice_cacheservice_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteCacheResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteCacheResponse) ProtoMessage() {} + +func (x *DeleteCacheResponse) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_cacheservice_cacheservice_proto_msgTypes[8] + 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 DeleteCacheResponse.ProtoReflect.Descriptor instead. +func (*DeleteCacheResponse) Descriptor() ([]byte, []int) { + return file_flyteidl_cacheservice_cacheservice_proto_rawDescGZIP(), []int{8} +} + +// A reservation including owner, heartbeat interval, expiration timestamp, and various metadata. +type Reservation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // The unique ID for the reservation - same as the cache key + OwnerId string `protobuf:"bytes,2,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"` // The unique ID of the owner for the reservation + HeartbeatInterval *durationpb.Duration `protobuf:"bytes,3,opt,name=heartbeat_interval,json=heartbeatInterval,proto3" json:"heartbeat_interval,omitempty"` // Requested reservation extension heartbeat interval + ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` // Expiration timestamp of this reservation +} + +func (x *Reservation) Reset() { + *x = Reservation{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_cacheservice_cacheservice_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Reservation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Reservation) ProtoMessage() {} + +func (x *Reservation) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_cacheservice_cacheservice_proto_msgTypes[9] + 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 Reservation.ProtoReflect.Descriptor instead. +func (*Reservation) Descriptor() ([]byte, []int) { + return file_flyteidl_cacheservice_cacheservice_proto_rawDescGZIP(), []int{9} +} + +func (x *Reservation) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *Reservation) GetOwnerId() string { + if x != nil { + return x.OwnerId + } + return "" +} + +func (x *Reservation) GetHeartbeatInterval() *durationpb.Duration { + if x != nil { + return x.HeartbeatInterval + } + return nil +} + +func (x *Reservation) GetExpiresAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiresAt + } + return nil +} + +// Request to get or extend a reservation for a cache key +type GetOrExtendReservationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // The unique ID for the reservation - same as the cache key + OwnerId string `protobuf:"bytes,2,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"` // The unique ID of the owner for the reservation + HeartbeatInterval *durationpb.Duration `protobuf:"bytes,3,opt,name=heartbeat_interval,json=heartbeatInterval,proto3" json:"heartbeat_interval,omitempty"` // Requested reservation extension heartbeat interval +} + +func (x *GetOrExtendReservationRequest) Reset() { + *x = GetOrExtendReservationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_cacheservice_cacheservice_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetOrExtendReservationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetOrExtendReservationRequest) ProtoMessage() {} + +func (x *GetOrExtendReservationRequest) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_cacheservice_cacheservice_proto_msgTypes[10] + 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 GetOrExtendReservationRequest.ProtoReflect.Descriptor instead. +func (*GetOrExtendReservationRequest) Descriptor() ([]byte, []int) { + return file_flyteidl_cacheservice_cacheservice_proto_rawDescGZIP(), []int{10} +} + +func (x *GetOrExtendReservationRequest) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *GetOrExtendReservationRequest) GetOwnerId() string { + if x != nil { + return x.OwnerId + } + return "" +} + +func (x *GetOrExtendReservationRequest) GetHeartbeatInterval() *durationpb.Duration { + if x != nil { + return x.HeartbeatInterval + } + return nil +} + +// Request to get or extend a reservation for a cache key +type GetOrExtendReservationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Reservation *Reservation `protobuf:"bytes,1,opt,name=reservation,proto3" json:"reservation,omitempty"` // The reservation that was created or extended +} + +func (x *GetOrExtendReservationResponse) Reset() { + *x = GetOrExtendReservationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_cacheservice_cacheservice_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetOrExtendReservationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetOrExtendReservationResponse) ProtoMessage() {} + +func (x *GetOrExtendReservationResponse) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_cacheservice_cacheservice_proto_msgTypes[11] + 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 GetOrExtendReservationResponse.ProtoReflect.Descriptor instead. +func (*GetOrExtendReservationResponse) Descriptor() ([]byte, []int) { + return file_flyteidl_cacheservice_cacheservice_proto_rawDescGZIP(), []int{11} +} + +func (x *GetOrExtendReservationResponse) GetReservation() *Reservation { + if x != nil { + return x.Reservation + } + return nil +} + +// Request to release the reservation for a cache key +type ReleaseReservationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // The unique ID for the reservation - same as the cache key + OwnerId string `protobuf:"bytes,2,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"` // The unique ID of the owner for the reservation +} + +func (x *ReleaseReservationRequest) Reset() { + *x = ReleaseReservationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_cacheservice_cacheservice_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReleaseReservationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReleaseReservationRequest) ProtoMessage() {} + +func (x *ReleaseReservationRequest) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_cacheservice_cacheservice_proto_msgTypes[12] + 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 ReleaseReservationRequest.ProtoReflect.Descriptor instead. +func (*ReleaseReservationRequest) Descriptor() ([]byte, []int) { + return file_flyteidl_cacheservice_cacheservice_proto_rawDescGZIP(), []int{12} +} + +func (x *ReleaseReservationRequest) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *ReleaseReservationRequest) GetOwnerId() string { + if x != nil { + return x.OwnerId + } + return "" +} + +// Response message of release reservation operation. +type ReleaseReservationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ReleaseReservationResponse) Reset() { + *x = ReleaseReservationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_cacheservice_cacheservice_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReleaseReservationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReleaseReservationResponse) ProtoMessage() {} + +func (x *ReleaseReservationResponse) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_cacheservice_cacheservice_proto_msgTypes[13] + 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 ReleaseReservationResponse.ProtoReflect.Descriptor instead. +func (*ReleaseReservationResponse) Descriptor() ([]byte, []int) { + return file_flyteidl_cacheservice_cacheservice_proto_rawDescGZIP(), []int{13} +} + +var File_flyteidl_cacheservice_cacheservice_proto protoreflect.FileDescriptor + +var file_flyteidl_cacheservice_cacheservice_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x63, 0x61, 0x63, 0x68, 0x65, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x66, 0x6c, 0x79, 0x74, + 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x1a, 0x1c, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x65, + 0x2f, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x19, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x66, 0x6c, 0x79, 0x74, + 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x66, 0x69, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x66, 0x6c, 0x79, 0x74, + 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, + 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x96, 0x01, 0x0a, 0x0e, 0x4b, + 0x65, 0x79, 0x4d, 0x61, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x49, 0x0a, + 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, + 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4b, 0x65, 0x79, 0x4d, 0x61, 0x70, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x56, 0x61, 0x6c, 0x75, + 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, 0x22, 0x91, 0x02, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x46, 0x0a, 0x11, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x66, 0x6c, + 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x49, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x3e, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x5f, + 0x6d, 0x61, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x66, 0x6c, 0x79, 0x74, + 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x4b, 0x65, 0x79, 0x4d, 0x61, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x52, 0x06, 0x6b, 0x65, 0x79, 0x4d, 0x61, 0x70, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x12, 0x42, 0x0a, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xbc, 0x01, 0x0a, 0x0c, 0x43, 0x61, 0x63, 0x68, + 0x65, 0x64, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x44, 0x0a, 0x0f, 0x6f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x5f, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x4d, 0x61, 0x70, 0x48, 0x00, 0x52, 0x0e, + 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x73, 0x12, 0x1f, + 0x0a, 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x55, 0x72, 0x69, 0x12, + 0x3b, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1f, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x61, 0x63, + 0x68, 0x65, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x08, 0x0a, 0x06, + 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x23, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x61, 0x63, + 0x68, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x4f, 0x0a, 0x10, 0x47, + 0x65, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x3b, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x23, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x64, 0x4f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x7e, 0x0a, 0x0f, + 0x50, 0x75, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x3b, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x61, 0x63, + 0x68, 0x65, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x64, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1c, + 0x0a, 0x09, 0x6f, 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x09, 0x6f, 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x22, 0x12, 0x0a, 0x10, + 0x50, 0x75, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x26, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x15, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0xbf, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x12, + 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, + 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x39, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, + 0x73, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, + 0x74, 0x22, 0x96, 0x01, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x64, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, + 0x12, 0x48, 0x0a, 0x12, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x5f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, + 0x61, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0x66, 0x0a, 0x1e, 0x47, 0x65, + 0x74, 0x4f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x0b, + 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x61, 0x63, + 0x68, 0x65, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x48, 0x0a, 0x19, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x22, 0x1c, 0x0a, 0x1a, + 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa2, 0x04, 0x0a, 0x0c, 0x43, + 0x61, 0x63, 0x68, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x56, 0x0a, 0x03, 0x47, + 0x65, 0x74, 0x12, 0x26, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x61, + 0x63, 0x68, 0x65, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x61, + 0x63, 0x68, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x66, 0x6c, 0x79, + 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x03, 0x50, 0x75, 0x74, 0x12, 0x26, 0x2e, 0x66, 0x6c, 0x79, + 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x50, 0x75, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x61, + 0x63, 0x68, 0x65, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x50, 0x75, 0x74, 0x43, 0x61, + 0x63, 0x68, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x06, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x29, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, + 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2a, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x61, 0x63, 0x68, + 0x65, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, + 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x85, 0x01, 0x0a, + 0x16, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, + 0x64, 0x6c, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x47, 0x65, 0x74, 0x4f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, + 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x64, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x79, 0x0a, 0x12, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x52, + 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x2e, 0x66, 0x6c, 0x79, + 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x66, + 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, + 0xe7, 0x01, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, + 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x11, 0x43, + 0x61, 0x63, 0x68, 0x65, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, + 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x2f, 0x66, 0x6c, + 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x62, 0x2d, 0x67, 0x6f, + 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xa2, 0x02, 0x03, 0x46, 0x43, 0x58, 0xaa, 0x02, 0x15, 0x46, + 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0xca, 0x02, 0x15, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, + 0x43, 0x61, 0x63, 0x68, 0x65, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xe2, 0x02, 0x21, 0x46, + 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x43, 0x61, 0x63, 0x68, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x16, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x3a, 0x3a, 0x43, 0x61, 0x63, + 0x68, 0x65, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_flyteidl_cacheservice_cacheservice_proto_rawDescOnce sync.Once + file_flyteidl_cacheservice_cacheservice_proto_rawDescData = file_flyteidl_cacheservice_cacheservice_proto_rawDesc +) + +func file_flyteidl_cacheservice_cacheservice_proto_rawDescGZIP() []byte { + file_flyteidl_cacheservice_cacheservice_proto_rawDescOnce.Do(func() { + file_flyteidl_cacheservice_cacheservice_proto_rawDescData = protoimpl.X.CompressGZIP(file_flyteidl_cacheservice_cacheservice_proto_rawDescData) + }) + return file_flyteidl_cacheservice_cacheservice_proto_rawDescData +} + +var file_flyteidl_cacheservice_cacheservice_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_flyteidl_cacheservice_cacheservice_proto_goTypes = []interface{}{ + (*KeyMapMetadata)(nil), // 0: flyteidl.cacheservice.KeyMapMetadata + (*Metadata)(nil), // 1: flyteidl.cacheservice.Metadata + (*CachedOutput)(nil), // 2: flyteidl.cacheservice.CachedOutput + (*GetCacheRequest)(nil), // 3: flyteidl.cacheservice.GetCacheRequest + (*GetCacheResponse)(nil), // 4: flyteidl.cacheservice.GetCacheResponse + (*PutCacheRequest)(nil), // 5: flyteidl.cacheservice.PutCacheRequest + (*PutCacheResponse)(nil), // 6: flyteidl.cacheservice.PutCacheResponse + (*DeleteCacheRequest)(nil), // 7: flyteidl.cacheservice.DeleteCacheRequest + (*DeleteCacheResponse)(nil), // 8: flyteidl.cacheservice.DeleteCacheResponse + (*Reservation)(nil), // 9: flyteidl.cacheservice.Reservation + (*GetOrExtendReservationRequest)(nil), // 10: flyteidl.cacheservice.GetOrExtendReservationRequest + (*GetOrExtendReservationResponse)(nil), // 11: flyteidl.cacheservice.GetOrExtendReservationResponse + (*ReleaseReservationRequest)(nil), // 12: flyteidl.cacheservice.ReleaseReservationRequest + (*ReleaseReservationResponse)(nil), // 13: flyteidl.cacheservice.ReleaseReservationResponse + nil, // 14: flyteidl.cacheservice.KeyMapMetadata.ValuesEntry + (*core.Identifier)(nil), // 15: flyteidl.core.Identifier + (*timestamppb.Timestamp)(nil), // 16: google.protobuf.Timestamp + (*core.LiteralMap)(nil), // 17: flyteidl.core.LiteralMap + (*durationpb.Duration)(nil), // 18: google.protobuf.Duration +} +var file_flyteidl_cacheservice_cacheservice_proto_depIdxs = []int32{ + 14, // 0: flyteidl.cacheservice.KeyMapMetadata.values:type_name -> flyteidl.cacheservice.KeyMapMetadata.ValuesEntry + 15, // 1: flyteidl.cacheservice.Metadata.source_identifier:type_name -> flyteidl.core.Identifier + 0, // 2: flyteidl.cacheservice.Metadata.key_map:type_name -> flyteidl.cacheservice.KeyMapMetadata + 16, // 3: flyteidl.cacheservice.Metadata.created_at:type_name -> google.protobuf.Timestamp + 16, // 4: flyteidl.cacheservice.Metadata.last_updated_at:type_name -> google.protobuf.Timestamp + 17, // 5: flyteidl.cacheservice.CachedOutput.output_literals:type_name -> flyteidl.core.LiteralMap + 1, // 6: flyteidl.cacheservice.CachedOutput.metadata:type_name -> flyteidl.cacheservice.Metadata + 2, // 7: flyteidl.cacheservice.GetCacheResponse.output:type_name -> flyteidl.cacheservice.CachedOutput + 2, // 8: flyteidl.cacheservice.PutCacheRequest.output:type_name -> flyteidl.cacheservice.CachedOutput + 18, // 9: flyteidl.cacheservice.Reservation.heartbeat_interval:type_name -> google.protobuf.Duration + 16, // 10: flyteidl.cacheservice.Reservation.expires_at:type_name -> google.protobuf.Timestamp + 18, // 11: flyteidl.cacheservice.GetOrExtendReservationRequest.heartbeat_interval:type_name -> google.protobuf.Duration + 9, // 12: flyteidl.cacheservice.GetOrExtendReservationResponse.reservation:type_name -> flyteidl.cacheservice.Reservation + 3, // 13: flyteidl.cacheservice.CacheService.Get:input_type -> flyteidl.cacheservice.GetCacheRequest + 5, // 14: flyteidl.cacheservice.CacheService.Put:input_type -> flyteidl.cacheservice.PutCacheRequest + 7, // 15: flyteidl.cacheservice.CacheService.Delete:input_type -> flyteidl.cacheservice.DeleteCacheRequest + 10, // 16: flyteidl.cacheservice.CacheService.GetOrExtendReservation:input_type -> flyteidl.cacheservice.GetOrExtendReservationRequest + 12, // 17: flyteidl.cacheservice.CacheService.ReleaseReservation:input_type -> flyteidl.cacheservice.ReleaseReservationRequest + 4, // 18: flyteidl.cacheservice.CacheService.Get:output_type -> flyteidl.cacheservice.GetCacheResponse + 6, // 19: flyteidl.cacheservice.CacheService.Put:output_type -> flyteidl.cacheservice.PutCacheResponse + 8, // 20: flyteidl.cacheservice.CacheService.Delete:output_type -> flyteidl.cacheservice.DeleteCacheResponse + 11, // 21: flyteidl.cacheservice.CacheService.GetOrExtendReservation:output_type -> flyteidl.cacheservice.GetOrExtendReservationResponse + 13, // 22: flyteidl.cacheservice.CacheService.ReleaseReservation:output_type -> flyteidl.cacheservice.ReleaseReservationResponse + 18, // [18:23] is the sub-list for method output_type + 13, // [13:18] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name +} + +func init() { file_flyteidl_cacheservice_cacheservice_proto_init() } +func file_flyteidl_cacheservice_cacheservice_proto_init() { + if File_flyteidl_cacheservice_cacheservice_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_flyteidl_cacheservice_cacheservice_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KeyMapMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flyteidl_cacheservice_cacheservice_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_flyteidl_cacheservice_cacheservice_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CachedOutput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flyteidl_cacheservice_cacheservice_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetCacheRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flyteidl_cacheservice_cacheservice_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetCacheResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flyteidl_cacheservice_cacheservice_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PutCacheRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flyteidl_cacheservice_cacheservice_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PutCacheResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flyteidl_cacheservice_cacheservice_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteCacheRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flyteidl_cacheservice_cacheservice_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteCacheResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flyteidl_cacheservice_cacheservice_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Reservation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flyteidl_cacheservice_cacheservice_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetOrExtendReservationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flyteidl_cacheservice_cacheservice_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetOrExtendReservationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flyteidl_cacheservice_cacheservice_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReleaseReservationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flyteidl_cacheservice_cacheservice_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReleaseReservationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_flyteidl_cacheservice_cacheservice_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*CachedOutput_OutputLiterals)(nil), + (*CachedOutput_OutputUri)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_flyteidl_cacheservice_cacheservice_proto_rawDesc, + NumEnums: 0, + NumMessages: 15, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_flyteidl_cacheservice_cacheservice_proto_goTypes, + DependencyIndexes: file_flyteidl_cacheservice_cacheservice_proto_depIdxs, + MessageInfos: file_flyteidl_cacheservice_cacheservice_proto_msgTypes, + }.Build() + File_flyteidl_cacheservice_cacheservice_proto = out.File + file_flyteidl_cacheservice_cacheservice_proto_rawDesc = nil + file_flyteidl_cacheservice_cacheservice_proto_goTypes = nil + file_flyteidl_cacheservice_cacheservice_proto_depIdxs = nil +} diff --git a/flyteidl/gen/pb-go/flyteidl/cacheservice/cacheservice_grpc.pb.go b/flyteidl/gen/pb-go/flyteidl/cacheservice/cacheservice_grpc.pb.go new file mode 100644 index 0000000000..c028195856 --- /dev/null +++ b/flyteidl/gen/pb-go/flyteidl/cacheservice/cacheservice_grpc.pb.go @@ -0,0 +1,265 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: flyteidl/cacheservice/cacheservice.proto + +package cacheservice + +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 + +const ( + CacheService_Get_FullMethodName = "/flyteidl.cacheservice.CacheService/Get" + CacheService_Put_FullMethodName = "/flyteidl.cacheservice.CacheService/Put" + CacheService_Delete_FullMethodName = "/flyteidl.cacheservice.CacheService/Delete" + CacheService_GetOrExtendReservation_FullMethodName = "/flyteidl.cacheservice.CacheService/GetOrExtendReservation" + CacheService_ReleaseReservation_FullMethodName = "/flyteidl.cacheservice.CacheService/ReleaseReservation" +) + +// CacheServiceClient is the client API for CacheService 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 CacheServiceClient interface { + // Retrieves cached data by key. + Get(ctx context.Context, in *GetCacheRequest, opts ...grpc.CallOption) (*GetCacheResponse, error) + // Stores or updates cached data by key. + Put(ctx context.Context, in *PutCacheRequest, opts ...grpc.CallOption) (*PutCacheResponse, error) + // Deletes cached data by key. + Delete(ctx context.Context, in *DeleteCacheRequest, opts ...grpc.CallOption) (*DeleteCacheResponse, error) + // Get or extend a reservation for a cache key + GetOrExtendReservation(ctx context.Context, in *GetOrExtendReservationRequest, opts ...grpc.CallOption) (*GetOrExtendReservationResponse, error) + // Release the reservation for a cache key + ReleaseReservation(ctx context.Context, in *ReleaseReservationRequest, opts ...grpc.CallOption) (*ReleaseReservationResponse, error) +} + +type cacheServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewCacheServiceClient(cc grpc.ClientConnInterface) CacheServiceClient { + return &cacheServiceClient{cc} +} + +func (c *cacheServiceClient) Get(ctx context.Context, in *GetCacheRequest, opts ...grpc.CallOption) (*GetCacheResponse, error) { + out := new(GetCacheResponse) + err := c.cc.Invoke(ctx, CacheService_Get_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cacheServiceClient) Put(ctx context.Context, in *PutCacheRequest, opts ...grpc.CallOption) (*PutCacheResponse, error) { + out := new(PutCacheResponse) + err := c.cc.Invoke(ctx, CacheService_Put_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cacheServiceClient) Delete(ctx context.Context, in *DeleteCacheRequest, opts ...grpc.CallOption) (*DeleteCacheResponse, error) { + out := new(DeleteCacheResponse) + err := c.cc.Invoke(ctx, CacheService_Delete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cacheServiceClient) GetOrExtendReservation(ctx context.Context, in *GetOrExtendReservationRequest, opts ...grpc.CallOption) (*GetOrExtendReservationResponse, error) { + out := new(GetOrExtendReservationResponse) + err := c.cc.Invoke(ctx, CacheService_GetOrExtendReservation_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cacheServiceClient) ReleaseReservation(ctx context.Context, in *ReleaseReservationRequest, opts ...grpc.CallOption) (*ReleaseReservationResponse, error) { + out := new(ReleaseReservationResponse) + err := c.cc.Invoke(ctx, CacheService_ReleaseReservation_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// CacheServiceServer is the server API for CacheService service. +// All implementations should embed UnimplementedCacheServiceServer +// for forward compatibility +type CacheServiceServer interface { + // Retrieves cached data by key. + Get(context.Context, *GetCacheRequest) (*GetCacheResponse, error) + // Stores or updates cached data by key. + Put(context.Context, *PutCacheRequest) (*PutCacheResponse, error) + // Deletes cached data by key. + Delete(context.Context, *DeleteCacheRequest) (*DeleteCacheResponse, error) + // Get or extend a reservation for a cache key + GetOrExtendReservation(context.Context, *GetOrExtendReservationRequest) (*GetOrExtendReservationResponse, error) + // Release the reservation for a cache key + ReleaseReservation(context.Context, *ReleaseReservationRequest) (*ReleaseReservationResponse, error) +} + +// UnimplementedCacheServiceServer should be embedded to have forward compatible implementations. +type UnimplementedCacheServiceServer struct { +} + +func (UnimplementedCacheServiceServer) Get(context.Context, *GetCacheRequest) (*GetCacheResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedCacheServiceServer) Put(context.Context, *PutCacheRequest) (*PutCacheResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Put not implemented") +} +func (UnimplementedCacheServiceServer) Delete(context.Context, *DeleteCacheRequest) (*DeleteCacheResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} +func (UnimplementedCacheServiceServer) GetOrExtendReservation(context.Context, *GetOrExtendReservationRequest) (*GetOrExtendReservationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetOrExtendReservation not implemented") +} +func (UnimplementedCacheServiceServer) ReleaseReservation(context.Context, *ReleaseReservationRequest) (*ReleaseReservationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReleaseReservation not implemented") +} + +// UnsafeCacheServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to CacheServiceServer will +// result in compilation errors. +type UnsafeCacheServiceServer interface { + mustEmbedUnimplementedCacheServiceServer() +} + +func RegisterCacheServiceServer(s grpc.ServiceRegistrar, srv CacheServiceServer) { + s.RegisterService(&CacheService_ServiceDesc, srv) +} + +func _CacheService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetCacheRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CacheServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: CacheService_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CacheServiceServer).Get(ctx, req.(*GetCacheRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CacheService_Put_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PutCacheRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CacheServiceServer).Put(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: CacheService_Put_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CacheServiceServer).Put(ctx, req.(*PutCacheRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CacheService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteCacheRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CacheServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: CacheService_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CacheServiceServer).Delete(ctx, req.(*DeleteCacheRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CacheService_GetOrExtendReservation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetOrExtendReservationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CacheServiceServer).GetOrExtendReservation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: CacheService_GetOrExtendReservation_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CacheServiceServer).GetOrExtendReservation(ctx, req.(*GetOrExtendReservationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CacheService_ReleaseReservation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReleaseReservationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CacheServiceServer).ReleaseReservation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: CacheService_ReleaseReservation_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CacheServiceServer).ReleaseReservation(ctx, req.(*ReleaseReservationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// CacheService_ServiceDesc is the grpc.ServiceDesc for CacheService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var CacheService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "flyteidl.cacheservice.CacheService", + HandlerType: (*CacheServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Get", + Handler: _CacheService_Get_Handler, + }, + { + MethodName: "Put", + Handler: _CacheService_Put_Handler, + }, + { + MethodName: "Delete", + Handler: _CacheService_Delete_Handler, + }, + { + MethodName: "GetOrExtendReservation", + Handler: _CacheService_GetOrExtendReservation_Handler, + }, + { + MethodName: "ReleaseReservation", + Handler: _CacheService_ReleaseReservation_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "flyteidl/cacheservice/cacheservice.proto", +} diff --git a/flyteidl/gen/pb-go/gateway/flyteidl/cacheservice/cacheservice.swagger.json b/flyteidl/gen/pb-go/gateway/flyteidl/cacheservice/cacheservice.swagger.json new file mode 100644 index 0000000000..79be0ba117 --- /dev/null +++ b/flyteidl/gen/pb-go/gateway/flyteidl/cacheservice/cacheservice.swagger.json @@ -0,0 +1,640 @@ +{ + "swagger": "2.0", + "info": { + "title": "flyteidl/cacheservice/cacheservice.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "CacheService" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "BlobTypeBlobDimensionality": { + "type": "string", + "enum": [ + "SINGLE", + "MULTIPART" + ], + "default": "SINGLE" + }, + "SchemaColumnSchemaColumnType": { + "type": "string", + "enum": [ + "INTEGER", + "FLOAT", + "STRING", + "BOOLEAN", + "DATETIME", + "DURATION" + ], + "default": "INTEGER" + }, + "SchemaTypeSchemaColumn": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "A unique name -within the schema type- for the column" + }, + "type": { + "$ref": "#/definitions/SchemaColumnSchemaColumnType", + "description": "The column type. This allows a limited set of types currently." + } + } + }, + "StructuredDatasetTypeDatasetColumn": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "A unique name within the schema type for the column." + }, + "literal_type": { + "$ref": "#/definitions/coreLiteralType", + "description": "The column type." + } + } + }, + "cacheserviceCachedOutput": { + "type": "object", + "properties": { + "output_literals": { + "$ref": "#/definitions/coreLiteralMap", + "title": "Output literals" + }, + "output_uri": { + "type": "string", + "title": "URI to output data" + }, + "metadata": { + "$ref": "#/definitions/flyteidlcacheserviceMetadata", + "title": "Associated metadata" + } + }, + "description": "Represents cached output, either as literals or an URI, with associated metadata." + }, + "cacheserviceDeleteCacheResponse": { + "type": "object", + "description": "Response message of cache deletion operation.\n\nEmpty, success indicated by no errors" + }, + "cacheserviceGetCacheResponse": { + "type": "object", + "properties": { + "output": { + "$ref": "#/definitions/cacheserviceCachedOutput", + "title": "Cached output" + } + }, + "description": "Response with cached data for a given key." + }, + "cacheserviceKeyMapMetadata": { + "type": "object", + "properties": { + "values": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Additional metadata as key-value pairs" + } + }, + "title": "Additional metadata as key-value pairs" + }, + "cacheservicePutCacheResponse": { + "type": "object", + "description": "Response message of cache store/update operation.\n\nEmpty, success indicated by no errors" + }, + "coreBinary": { + "type": "object", + "properties": { + "value": { + "type": "string", + "format": "byte" + }, + "tag": { + "type": "string" + } + }, + "description": "A simple byte array with a tag to help different parts of the system communicate about what is in the byte array.\nIt's strongly advisable that consumers of this type define a unique tag and validate the tag before parsing the data." + }, + "coreBlob": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/coreBlobMetadata" + }, + "uri": { + "type": "string" + } + }, + "description": "Refers to an offloaded set of files. It encapsulates the type of the store and a unique uri for where the data is.\nThere are no restrictions on how the uri is formatted since it will depend on how to interact with the store." + }, + "coreBlobMetadata": { + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/coreBlobType" + } + } + }, + "coreBlobType": { + "type": "object", + "properties": { + "format": { + "type": "string", + "title": "Format can be a free form string understood by SDK/UI etc like\ncsv, parquet etc" + }, + "dimensionality": { + "$ref": "#/definitions/BlobTypeBlobDimensionality" + } + }, + "title": "Defines type behavior for blob objects" + }, + "coreError": { + "type": "object", + "properties": { + "failed_node_id": { + "type": "string", + "description": "The node id that threw the error." + }, + "message": { + "type": "string", + "description": "Error message thrown." + } + }, + "description": "Represents an error thrown from a node." + }, + "coreIdentifier": { + "type": "object", + "properties": { + "resource_type": { + "$ref": "#/definitions/coreResourceType", + "description": "Identifies the specific type of resource that this identifier corresponds to." + }, + "project": { + "type": "string", + "description": "Name of the project the resource belongs to." + }, + "domain": { + "type": "string", + "description": "Name of the domain the resource belongs to.\nA domain can be considered as a subset within a specific project." + }, + "name": { + "type": "string", + "description": "User provided value for the resource." + }, + "version": { + "type": "string", + "description": "Specific version of the resource." + }, + "org": { + "type": "string", + "description": "Optional, org key applied to the resource." + } + }, + "description": "Encapsulation of fields that uniquely identifies a Flyte resource." + }, + "coreLiteral": { + "type": "object", + "properties": { + "scalar": { + "$ref": "#/definitions/coreScalar", + "description": "A simple value." + }, + "collection": { + "$ref": "#/definitions/coreLiteralCollection", + "description": "A collection of literals to allow nesting." + }, + "map": { + "$ref": "#/definitions/coreLiteralMap", + "description": "A map of strings to literals." + }, + "hash": { + "type": "string", + "title": "A hash representing this literal.\nThis is used for caching purposes. For more details refer to RFC 1893\n(https://github.com/flyteorg/flyte/blob/master/rfc/system/1893-caching-of-offloaded-objects.md)" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Additional metadata for literals." + } + }, + "description": "A simple value. This supports any level of nesting (e.g. array of array of array of Blobs) as well as simple primitives." + }, + "coreLiteralCollection": { + "type": "object", + "properties": { + "literals": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/coreLiteral" + } + } + }, + "description": "A collection of literals. This is a workaround since oneofs in proto messages cannot contain a repeated field." + }, + "coreLiteralMap": { + "type": "object", + "properties": { + "literals": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/coreLiteral" + } + } + }, + "description": "A map of literals. This is a workaround since oneofs in proto messages cannot contain a repeated field." + }, + "coreLiteralType": { + "type": "object", + "properties": { + "simple": { + "$ref": "#/definitions/coreSimpleType", + "description": "A simple type that can be compared one-to-one with another." + }, + "schema": { + "$ref": "#/definitions/coreSchemaType", + "description": "A complex type that requires matching of inner fields." + }, + "collection_type": { + "$ref": "#/definitions/coreLiteralType", + "description": "Defines the type of the value of a collection. Only homogeneous collections are allowed." + }, + "map_value_type": { + "$ref": "#/definitions/coreLiteralType", + "description": "Defines the type of the value of a map type. The type of the key is always a string." + }, + "blob": { + "$ref": "#/definitions/coreBlobType", + "description": "A blob might have specialized implementation details depending on associated metadata." + }, + "enum_type": { + "$ref": "#/definitions/flyteidlcoreEnumType", + "description": "Defines an enum with pre-defined string values." + }, + "structured_dataset_type": { + "$ref": "#/definitions/coreStructuredDatasetType", + "title": "Generalized schema support" + }, + "union_type": { + "$ref": "#/definitions/coreUnionType", + "description": "Defines an union type with pre-defined LiteralTypes." + }, + "metadata": { + "type": "object", + "description": "This field contains type metadata that is descriptive of the type, but is NOT considered in type-checking. This might be used by\nconsumers to identify special behavior or display extended information for the type." + }, + "annotation": { + "$ref": "#/definitions/coreTypeAnnotation", + "description": "This field contains arbitrary data that might have special semantic\nmeaning for the client but does not effect internal flyte behavior." + }, + "structure": { + "$ref": "#/definitions/coreTypeStructure", + "description": "Hints to improve type matching." + } + }, + "description": "Defines a strong type to allow type checking between interfaces." + }, + "corePrimitive": { + "type": "object", + "properties": { + "integer": { + "type": "string", + "format": "int64" + }, + "float_value": { + "type": "number", + "format": "double" + }, + "string_value": { + "type": "string" + }, + "boolean": { + "type": "boolean" + }, + "datetime": { + "type": "string", + "format": "date-time" + }, + "duration": { + "type": "string" + } + }, + "title": "Primitive Types" + }, + "coreResourceType": { + "type": "string", + "enum": [ + "UNSPECIFIED", + "TASK", + "WORKFLOW", + "LAUNCH_PLAN", + "DATASET" + ], + "default": "UNSPECIFIED", + "description": "Indicates a resource type within Flyte.\n\n - DATASET: A dataset represents an entity modeled in Flyte DataCatalog. A Dataset is also a versioned entity and can be a compilation of multiple individual objects.\nEventually all Catalog objects should be modeled similar to Flyte Objects. The Dataset entities makes it possible for the UI and CLI to act on the objects \nin a similar manner to other Flyte objects" + }, + "coreScalar": { + "type": "object", + "properties": { + "primitive": { + "$ref": "#/definitions/corePrimitive" + }, + "blob": { + "$ref": "#/definitions/coreBlob" + }, + "binary": { + "$ref": "#/definitions/coreBinary" + }, + "schema": { + "$ref": "#/definitions/flyteidlcoreSchema" + }, + "none_type": { + "$ref": "#/definitions/coreVoid" + }, + "error": { + "$ref": "#/definitions/coreError" + }, + "generic": { + "type": "object" + }, + "structured_dataset": { + "$ref": "#/definitions/coreStructuredDataset" + }, + "union": { + "$ref": "#/definitions/coreUnion" + } + } + }, + "coreSchemaType": { + "type": "object", + "properties": { + "columns": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/SchemaTypeSchemaColumn" + }, + "description": "A list of ordered columns this schema comprises of." + } + }, + "description": "Defines schema columns and types to strongly type-validate schemas interoperability." + }, + "coreSimpleType": { + "type": "string", + "enum": [ + "NONE", + "INTEGER", + "FLOAT", + "STRING", + "BOOLEAN", + "DATETIME", + "DURATION", + "BINARY", + "ERROR", + "STRUCT" + ], + "default": "NONE", + "description": "Define a set of simple types." + }, + "coreStructuredDataset": { + "type": "object", + "properties": { + "uri": { + "type": "string", + "title": "String location uniquely identifying where the data is.\nShould start with the storage location (e.g. s3://, gs://, bq://, etc.)" + }, + "metadata": { + "$ref": "#/definitions/coreStructuredDatasetMetadata" + } + } + }, + "coreStructuredDatasetMetadata": { + "type": "object", + "properties": { + "structured_dataset_type": { + "$ref": "#/definitions/coreStructuredDatasetType", + "description": "Bundle the type information along with the literal.\nThis is here because StructuredDatasets can often be more defined at run time than at compile time.\nThat is, at compile time you might only declare a task to return a pandas dataframe or a StructuredDataset,\nwithout any column information, but at run time, you might have that column information.\nflytekit python will copy this type information into the literal, from the type information, if not provided by\nthe various plugins (encoders).\nSince this field is run time generated, it's not used for any type checking." + } + } + }, + "coreStructuredDatasetType": { + "type": "object", + "properties": { + "columns": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/StructuredDatasetTypeDatasetColumn" + }, + "description": "A list of ordered columns this schema comprises of." + }, + "format": { + "type": "string", + "description": "This is the storage format, the format of the bits at rest\nparquet, feather, csv, etc.\nFor two types to be compatible, the format will need to be an exact match." + }, + "external_schema_type": { + "type": "string", + "description": "This is a string representing the type that the bytes in external_schema_bytes are formatted in.\nThis is an optional field that will not be used for type checking." + }, + "external_schema_bytes": { + "type": "string", + "format": "byte", + "description": "The serialized bytes of a third-party schema library like Arrow.\nThis is an optional field that will not be used for type checking." + } + } + }, + "coreTypeAnnotation": { + "type": "object", + "properties": { + "annotations": { + "type": "object", + "description": "A arbitrary JSON payload to describe a type." + } + }, + "description": "TypeAnnotation encapsulates registration time information about a type. This can be used for various control-plane operations. TypeAnnotation will not be available at runtime when a task runs." + }, + "coreTypeStructure": { + "type": "object", + "properties": { + "tag": { + "type": "string", + "title": "Must exactly match for types to be castable" + }, + "dataclass_type": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/coreLiteralType" + }, + "title": "dataclass_type only exists for dataclasses.\nThis is used to resolve the type of the fields of dataclass\nThe key is the field name, and the value is the literal type of the field\ne.g. For dataclass Foo, with fields a, and a is a string\nFoo.a will be resolved as a literal type of string from dataclass_type" + } + }, + "description": "Hints to improve type matching\ne.g. allows distinguishing output from custom type transformers\neven if the underlying IDL serialization matches." + }, + "coreUnion": { + "type": "object", + "properties": { + "value": { + "$ref": "#/definitions/coreLiteral" + }, + "type": { + "$ref": "#/definitions/coreLiteralType" + } + }, + "description": "The runtime representation of a tagged union value. See `UnionType` for more details." + }, + "coreUnionType": { + "type": "object", + "properties": { + "variants": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/coreLiteralType" + }, + "description": "Predefined set of variants in union." + } + }, + "description": "Defines a tagged union type, also known as a variant (and formally as the sum type).\n\nA sum type S is defined by a sequence of types (A, B, C, ...), each tagged by a string tag\nA value of type S is constructed from a value of any of the variant types. The specific choice of type is recorded by\nstoring the varaint's tag with the literal value and can be examined in runtime.\n\nType S is typically written as\nS := Apple A | Banana B | Cantaloupe C | ...\n\nNotably, a nullable (optional) type is a sum type between some type X and the singleton type representing a null-value:\nOptional X := X | Null\n\nSee also: https://en.wikipedia.org/wiki/Tagged_union" + }, + "coreVoid": { + "type": "object", + "description": "Used to denote a nil/null/None assignment to a scalar value. The underlying LiteralType for Void is intentionally\nundefined since it can be assigned to a scalar of any LiteralType." + }, + "flyteidlcacheserviceGetOrExtendReservationResponse": { + "type": "object", + "properties": { + "reservation": { + "$ref": "#/definitions/flyteidlcacheserviceReservation", + "title": "The reservation that was created or extended" + } + }, + "title": "Request to get or extend a reservation for a cache key" + }, + "flyteidlcacheserviceMetadata": { + "type": "object", + "properties": { + "source_identifier": { + "$ref": "#/definitions/coreIdentifier", + "title": "Source task or workflow identifier" + }, + "key_map": { + "$ref": "#/definitions/cacheserviceKeyMapMetadata", + "title": "Additional metadata as key-value pairs" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Creation timestamp" + }, + "last_updated_at": { + "type": "string", + "format": "date-time", + "title": "Last update timestamp" + } + }, + "description": "Metadata for cached outputs, including the source identifier and timestamps." + }, + "flyteidlcacheserviceReleaseReservationResponse": { + "type": "object", + "description": "Response message of release reservation operation.\n\nEmpty, success indicated by no errors" + }, + "flyteidlcacheserviceReservation": { + "type": "object", + "properties": { + "key": { + "type": "string", + "title": "The unique ID for the reservation - same as the cache key" + }, + "owner_id": { + "type": "string", + "title": "The unique ID of the owner for the reservation" + }, + "heartbeat_interval": { + "type": "string", + "title": "Requested reservation extension heartbeat interval" + }, + "expires_at": { + "type": "string", + "format": "date-time", + "title": "Expiration timestamp of this reservation" + } + }, + "description": "A reservation including owner, heartbeat interval, expiration timestamp, and various metadata." + }, + "flyteidlcoreEnumType": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Predefined set of enum values." + } + }, + "description": "Enables declaring enum types, with predefined string values\nFor len(values) \u003e 0, the first value in the ordered list is regarded as the default value. If you wish\nTo provide no defaults, make the first value as undefined." + }, + "flyteidlcoreSchema": { + "type": "object", + "properties": { + "uri": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/coreSchemaType" + } + }, + "description": "A strongly typed schema that defines the interface of data retrieved from the underlying storage medium." + }, + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + }, + "protobufNullValue": { + "type": "string", + "enum": [ + "NULL_VALUE" + ], + "default": "NULL_VALUE", + "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\nThe JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value." + } + } +} diff --git a/flyteidl/gen/pb_python/flyteidl/cacheservice/__init__.py b/flyteidl/gen/pb_python/flyteidl/cacheservice/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/flyteidl/gen/pb_python/flyteidl/cacheservice/cacheservice_pb2.py b/flyteidl/gen/pb_python/flyteidl/cacheservice/cacheservice_pb2.py new file mode 100644 index 0000000000..1cae31e683 --- /dev/null +++ b/flyteidl/gen/pb_python/flyteidl/cacheservice/cacheservice_pb2.py @@ -0,0 +1,65 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: flyteidl/cacheservice/cacheservice.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from flyteidl.core import literals_pb2 as flyteidl_dot_core_dot_literals__pb2 +from flyteidl.core import types_pb2 as flyteidl_dot_core_dot_types__pb2 +from flyteidl.core import identifier_pb2 as flyteidl_dot_core_dot_identifier__pb2 +from flyteidl.core import interface_pb2 as flyteidl_dot_core_dot_interface__pb2 +from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n(flyteidl/cacheservice/cacheservice.proto\x12\x15\x66lyteidl.cacheservice\x1a\x1c\x66lyteidl/core/literals.proto\x1a\x19\x66lyteidl/core/types.proto\x1a\x1e\x66lyteidl/core/identifier.proto\x1a\x1d\x66lyteidl/core/interface.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x96\x01\n\x0eKeyMapMetadata\x12I\n\x06values\x18\x01 \x03(\x0b\x32\x31.flyteidl.cacheservice.KeyMapMetadata.ValuesEntryR\x06values\x1a\x39\n\x0bValuesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\x91\x02\n\x08Metadata\x12\x46\n\x11source_identifier\x18\x01 \x01(\x0b\x32\x19.flyteidl.core.IdentifierR\x10sourceIdentifier\x12>\n\x07key_map\x18\x02 \x01(\x0b\x32%.flyteidl.cacheservice.KeyMapMetadataR\x06keyMap\x12\x39\n\ncreated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x42\n\x0flast_updated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\rlastUpdatedAt\"\xbc\x01\n\x0c\x43\x61\x63hedOutput\x12\x44\n\x0foutput_literals\x18\x01 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapH\x00R\x0eoutputLiterals\x12\x1f\n\noutput_uri\x18\x02 \x01(\tH\x00R\toutputUri\x12;\n\x08metadata\x18\x03 \x01(\x0b\x32\x1f.flyteidl.cacheservice.MetadataR\x08metadataB\x08\n\x06output\"#\n\x0fGetCacheRequest\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\"O\n\x10GetCacheResponse\x12;\n\x06output\x18\x01 \x01(\x0b\x32#.flyteidl.cacheservice.CachedOutputR\x06output\"~\n\x0fPutCacheRequest\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12;\n\x06output\x18\x02 \x01(\x0b\x32#.flyteidl.cacheservice.CachedOutputR\x06output\x12\x1c\n\toverwrite\x18\x03 \x01(\x08R\toverwrite\"\x12\n\x10PutCacheResponse\"&\n\x12\x44\x65leteCacheRequest\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\"\x15\n\x13\x44\x65leteCacheResponse\"\xbf\x01\n\x0bReservation\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x19\n\x08owner_id\x18\x02 \x01(\tR\x07ownerId\x12H\n\x12heartbeat_interval\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationR\x11heartbeatInterval\x12\x39\n\nexpires_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\texpiresAt\"\x96\x01\n\x1dGetOrExtendReservationRequest\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x19\n\x08owner_id\x18\x02 \x01(\tR\x07ownerId\x12H\n\x12heartbeat_interval\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationR\x11heartbeatInterval\"f\n\x1eGetOrExtendReservationResponse\x12\x44\n\x0breservation\x18\x01 \x01(\x0b\x32\".flyteidl.cacheservice.ReservationR\x0breservation\"H\n\x19ReleaseReservationRequest\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x19\n\x08owner_id\x18\x02 \x01(\tR\x07ownerId\"\x1c\n\x1aReleaseReservationResponse2\xa2\x04\n\x0c\x43\x61\x63heService\x12V\n\x03Get\x12&.flyteidl.cacheservice.GetCacheRequest\x1a\'.flyteidl.cacheservice.GetCacheResponse\x12V\n\x03Put\x12&.flyteidl.cacheservice.PutCacheRequest\x1a\'.flyteidl.cacheservice.PutCacheResponse\x12_\n\x06\x44\x65lete\x12).flyteidl.cacheservice.DeleteCacheRequest\x1a*.flyteidl.cacheservice.DeleteCacheResponse\x12\x85\x01\n\x16GetOrExtendReservation\x12\x34.flyteidl.cacheservice.GetOrExtendReservationRequest\x1a\x35.flyteidl.cacheservice.GetOrExtendReservationResponse\x12y\n\x12ReleaseReservation\x12\x30.flyteidl.cacheservice.ReleaseReservationRequest\x1a\x31.flyteidl.cacheservice.ReleaseReservationResponseB\xe7\x01\n\x19\x63om.flyteidl.cacheserviceB\x11\x43\x61\x63heserviceProtoP\x01ZBgithub.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/cacheservice\xa2\x02\x03\x46\x43X\xaa\x02\x15\x46lyteidl.Cacheservice\xca\x02\x15\x46lyteidl\\Cacheservice\xe2\x02!Flyteidl\\Cacheservice\\GPBMetadata\xea\x02\x16\x46lyteidl::Cacheserviceb\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flyteidl.cacheservice.cacheservice_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\031com.flyteidl.cacheserviceB\021CacheserviceProtoP\001ZBgithub.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/cacheservice\242\002\003FCX\252\002\025Flyteidl.Cacheservice\312\002\025Flyteidl\\Cacheservice\342\002!Flyteidl\\Cacheservice\\GPBMetadata\352\002\026Flyteidl::Cacheservice' + _KEYMAPMETADATA_VALUESENTRY._options = None + _KEYMAPMETADATA_VALUESENTRY._serialized_options = b'8\001' + _globals['_KEYMAPMETADATA']._serialized_start=253 + _globals['_KEYMAPMETADATA']._serialized_end=403 + _globals['_KEYMAPMETADATA_VALUESENTRY']._serialized_start=346 + _globals['_KEYMAPMETADATA_VALUESENTRY']._serialized_end=403 + _globals['_METADATA']._serialized_start=406 + _globals['_METADATA']._serialized_end=679 + _globals['_CACHEDOUTPUT']._serialized_start=682 + _globals['_CACHEDOUTPUT']._serialized_end=870 + _globals['_GETCACHEREQUEST']._serialized_start=872 + _globals['_GETCACHEREQUEST']._serialized_end=907 + _globals['_GETCACHERESPONSE']._serialized_start=909 + _globals['_GETCACHERESPONSE']._serialized_end=988 + _globals['_PUTCACHEREQUEST']._serialized_start=990 + _globals['_PUTCACHEREQUEST']._serialized_end=1116 + _globals['_PUTCACHERESPONSE']._serialized_start=1118 + _globals['_PUTCACHERESPONSE']._serialized_end=1136 + _globals['_DELETECACHEREQUEST']._serialized_start=1138 + _globals['_DELETECACHEREQUEST']._serialized_end=1176 + _globals['_DELETECACHERESPONSE']._serialized_start=1178 + _globals['_DELETECACHERESPONSE']._serialized_end=1199 + _globals['_RESERVATION']._serialized_start=1202 + _globals['_RESERVATION']._serialized_end=1393 + _globals['_GETOREXTENDRESERVATIONREQUEST']._serialized_start=1396 + _globals['_GETOREXTENDRESERVATIONREQUEST']._serialized_end=1546 + _globals['_GETOREXTENDRESERVATIONRESPONSE']._serialized_start=1548 + _globals['_GETOREXTENDRESERVATIONRESPONSE']._serialized_end=1650 + _globals['_RELEASERESERVATIONREQUEST']._serialized_start=1652 + _globals['_RELEASERESERVATIONREQUEST']._serialized_end=1724 + _globals['_RELEASERESERVATIONRESPONSE']._serialized_start=1726 + _globals['_RELEASERESERVATIONRESPONSE']._serialized_end=1754 + _globals['_CACHESERVICE']._serialized_start=1757 + _globals['_CACHESERVICE']._serialized_end=2303 +# @@protoc_insertion_point(module_scope) diff --git a/flyteidl/gen/pb_python/flyteidl/cacheservice/cacheservice_pb2.pyi b/flyteidl/gen/pb_python/flyteidl/cacheservice/cacheservice_pb2.pyi new file mode 100644 index 0000000000..ad5a5c193a --- /dev/null +++ b/flyteidl/gen/pb_python/flyteidl/cacheservice/cacheservice_pb2.pyi @@ -0,0 +1,123 @@ +from flyteidl.core import literals_pb2 as _literals_pb2 +from flyteidl.core import types_pb2 as _types_pb2 +from flyteidl.core import identifier_pb2 as _identifier_pb2 +from flyteidl.core import interface_pb2 as _interface_pb2 +from google.protobuf import duration_pb2 as _duration_pb2 +from google.protobuf import timestamp_pb2 as _timestamp_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class KeyMapMetadata(_message.Message): + __slots__ = ["values"] + class ValuesEntry(_message.Message): + __slots__ = ["key", "value"] + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + VALUES_FIELD_NUMBER: _ClassVar[int] + values: _containers.ScalarMap[str, str] + def __init__(self, values: _Optional[_Mapping[str, str]] = ...) -> None: ... + +class Metadata(_message.Message): + __slots__ = ["source_identifier", "key_map", "created_at", "last_updated_at"] + SOURCE_IDENTIFIER_FIELD_NUMBER: _ClassVar[int] + KEY_MAP_FIELD_NUMBER: _ClassVar[int] + CREATED_AT_FIELD_NUMBER: _ClassVar[int] + LAST_UPDATED_AT_FIELD_NUMBER: _ClassVar[int] + source_identifier: _identifier_pb2.Identifier + key_map: KeyMapMetadata + created_at: _timestamp_pb2.Timestamp + last_updated_at: _timestamp_pb2.Timestamp + def __init__(self, source_identifier: _Optional[_Union[_identifier_pb2.Identifier, _Mapping]] = ..., key_map: _Optional[_Union[KeyMapMetadata, _Mapping]] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., last_updated_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + +class CachedOutput(_message.Message): + __slots__ = ["output_literals", "output_uri", "metadata"] + OUTPUT_LITERALS_FIELD_NUMBER: _ClassVar[int] + OUTPUT_URI_FIELD_NUMBER: _ClassVar[int] + METADATA_FIELD_NUMBER: _ClassVar[int] + output_literals: _literals_pb2.LiteralMap + output_uri: str + metadata: Metadata + def __init__(self, output_literals: _Optional[_Union[_literals_pb2.LiteralMap, _Mapping]] = ..., output_uri: _Optional[str] = ..., metadata: _Optional[_Union[Metadata, _Mapping]] = ...) -> None: ... + +class GetCacheRequest(_message.Message): + __slots__ = ["key"] + KEY_FIELD_NUMBER: _ClassVar[int] + key: str + def __init__(self, key: _Optional[str] = ...) -> None: ... + +class GetCacheResponse(_message.Message): + __slots__ = ["output"] + OUTPUT_FIELD_NUMBER: _ClassVar[int] + output: CachedOutput + def __init__(self, output: _Optional[_Union[CachedOutput, _Mapping]] = ...) -> None: ... + +class PutCacheRequest(_message.Message): + __slots__ = ["key", "output", "overwrite"] + KEY_FIELD_NUMBER: _ClassVar[int] + OUTPUT_FIELD_NUMBER: _ClassVar[int] + OVERWRITE_FIELD_NUMBER: _ClassVar[int] + key: str + output: CachedOutput + overwrite: bool + def __init__(self, key: _Optional[str] = ..., output: _Optional[_Union[CachedOutput, _Mapping]] = ..., overwrite: bool = ...) -> None: ... + +class PutCacheResponse(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class DeleteCacheRequest(_message.Message): + __slots__ = ["key"] + KEY_FIELD_NUMBER: _ClassVar[int] + key: str + def __init__(self, key: _Optional[str] = ...) -> None: ... + +class DeleteCacheResponse(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class Reservation(_message.Message): + __slots__ = ["key", "owner_id", "heartbeat_interval", "expires_at"] + KEY_FIELD_NUMBER: _ClassVar[int] + OWNER_ID_FIELD_NUMBER: _ClassVar[int] + HEARTBEAT_INTERVAL_FIELD_NUMBER: _ClassVar[int] + EXPIRES_AT_FIELD_NUMBER: _ClassVar[int] + key: str + owner_id: str + heartbeat_interval: _duration_pb2.Duration + expires_at: _timestamp_pb2.Timestamp + def __init__(self, key: _Optional[str] = ..., owner_id: _Optional[str] = ..., heartbeat_interval: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., expires_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + +class GetOrExtendReservationRequest(_message.Message): + __slots__ = ["key", "owner_id", "heartbeat_interval"] + KEY_FIELD_NUMBER: _ClassVar[int] + OWNER_ID_FIELD_NUMBER: _ClassVar[int] + HEARTBEAT_INTERVAL_FIELD_NUMBER: _ClassVar[int] + key: str + owner_id: str + heartbeat_interval: _duration_pb2.Duration + def __init__(self, key: _Optional[str] = ..., owner_id: _Optional[str] = ..., heartbeat_interval: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ...) -> None: ... + +class GetOrExtendReservationResponse(_message.Message): + __slots__ = ["reservation"] + RESERVATION_FIELD_NUMBER: _ClassVar[int] + reservation: Reservation + def __init__(self, reservation: _Optional[_Union[Reservation, _Mapping]] = ...) -> None: ... + +class ReleaseReservationRequest(_message.Message): + __slots__ = ["key", "owner_id"] + KEY_FIELD_NUMBER: _ClassVar[int] + OWNER_ID_FIELD_NUMBER: _ClassVar[int] + key: str + owner_id: str + def __init__(self, key: _Optional[str] = ..., owner_id: _Optional[str] = ...) -> None: ... + +class ReleaseReservationResponse(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... diff --git a/flyteidl/gen/pb_python/flyteidl/cacheservice/cacheservice_pb2_grpc.py b/flyteidl/gen/pb_python/flyteidl/cacheservice/cacheservice_pb2_grpc.py new file mode 100644 index 0000000000..7b7bd54f09 --- /dev/null +++ b/flyteidl/gen/pb_python/flyteidl/cacheservice/cacheservice_pb2_grpc.py @@ -0,0 +1,209 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from flyteidl.cacheservice import cacheservice_pb2 as flyteidl_dot_cacheservice_dot_cacheservice__pb2 + + +class CacheServiceStub(object): + """ + CacheService defines operations for cache management including retrieval, storage, and deletion of cached task/workflow outputs. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Get = channel.unary_unary( + '/flyteidl.cacheservice.CacheService/Get', + request_serializer=flyteidl_dot_cacheservice_dot_cacheservice__pb2.GetCacheRequest.SerializeToString, + response_deserializer=flyteidl_dot_cacheservice_dot_cacheservice__pb2.GetCacheResponse.FromString, + ) + self.Put = channel.unary_unary( + '/flyteidl.cacheservice.CacheService/Put', + request_serializer=flyteidl_dot_cacheservice_dot_cacheservice__pb2.PutCacheRequest.SerializeToString, + response_deserializer=flyteidl_dot_cacheservice_dot_cacheservice__pb2.PutCacheResponse.FromString, + ) + self.Delete = channel.unary_unary( + '/flyteidl.cacheservice.CacheService/Delete', + request_serializer=flyteidl_dot_cacheservice_dot_cacheservice__pb2.DeleteCacheRequest.SerializeToString, + response_deserializer=flyteidl_dot_cacheservice_dot_cacheservice__pb2.DeleteCacheResponse.FromString, + ) + self.GetOrExtendReservation = channel.unary_unary( + '/flyteidl.cacheservice.CacheService/GetOrExtendReservation', + request_serializer=flyteidl_dot_cacheservice_dot_cacheservice__pb2.GetOrExtendReservationRequest.SerializeToString, + response_deserializer=flyteidl_dot_cacheservice_dot_cacheservice__pb2.GetOrExtendReservationResponse.FromString, + ) + self.ReleaseReservation = channel.unary_unary( + '/flyteidl.cacheservice.CacheService/ReleaseReservation', + request_serializer=flyteidl_dot_cacheservice_dot_cacheservice__pb2.ReleaseReservationRequest.SerializeToString, + response_deserializer=flyteidl_dot_cacheservice_dot_cacheservice__pb2.ReleaseReservationResponse.FromString, + ) + + +class CacheServiceServicer(object): + """ + CacheService defines operations for cache management including retrieval, storage, and deletion of cached task/workflow outputs. + """ + + def Get(self, request, context): + """Retrieves cached data by key. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Put(self, request, context): + """Stores or updates cached data by key. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Delete(self, request, context): + """Deletes cached data by key. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetOrExtendReservation(self, request, context): + """Get or extend a reservation for a cache key + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ReleaseReservation(self, request, context): + """Release the reservation for a cache key + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_CacheServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Get': grpc.unary_unary_rpc_method_handler( + servicer.Get, + request_deserializer=flyteidl_dot_cacheservice_dot_cacheservice__pb2.GetCacheRequest.FromString, + response_serializer=flyteidl_dot_cacheservice_dot_cacheservice__pb2.GetCacheResponse.SerializeToString, + ), + 'Put': grpc.unary_unary_rpc_method_handler( + servicer.Put, + request_deserializer=flyteidl_dot_cacheservice_dot_cacheservice__pb2.PutCacheRequest.FromString, + response_serializer=flyteidl_dot_cacheservice_dot_cacheservice__pb2.PutCacheResponse.SerializeToString, + ), + 'Delete': grpc.unary_unary_rpc_method_handler( + servicer.Delete, + request_deserializer=flyteidl_dot_cacheservice_dot_cacheservice__pb2.DeleteCacheRequest.FromString, + response_serializer=flyteidl_dot_cacheservice_dot_cacheservice__pb2.DeleteCacheResponse.SerializeToString, + ), + 'GetOrExtendReservation': grpc.unary_unary_rpc_method_handler( + servicer.GetOrExtendReservation, + request_deserializer=flyteidl_dot_cacheservice_dot_cacheservice__pb2.GetOrExtendReservationRequest.FromString, + response_serializer=flyteidl_dot_cacheservice_dot_cacheservice__pb2.GetOrExtendReservationResponse.SerializeToString, + ), + 'ReleaseReservation': grpc.unary_unary_rpc_method_handler( + servicer.ReleaseReservation, + request_deserializer=flyteidl_dot_cacheservice_dot_cacheservice__pb2.ReleaseReservationRequest.FromString, + response_serializer=flyteidl_dot_cacheservice_dot_cacheservice__pb2.ReleaseReservationResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'flyteidl.cacheservice.CacheService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class CacheService(object): + """ + CacheService defines operations for cache management including retrieval, storage, and deletion of cached task/workflow outputs. + """ + + @staticmethod + def Get(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/flyteidl.cacheservice.CacheService/Get', + flyteidl_dot_cacheservice_dot_cacheservice__pb2.GetCacheRequest.SerializeToString, + flyteidl_dot_cacheservice_dot_cacheservice__pb2.GetCacheResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Put(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/flyteidl.cacheservice.CacheService/Put', + flyteidl_dot_cacheservice_dot_cacheservice__pb2.PutCacheRequest.SerializeToString, + flyteidl_dot_cacheservice_dot_cacheservice__pb2.PutCacheResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Delete(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/flyteidl.cacheservice.CacheService/Delete', + flyteidl_dot_cacheservice_dot_cacheservice__pb2.DeleteCacheRequest.SerializeToString, + flyteidl_dot_cacheservice_dot_cacheservice__pb2.DeleteCacheResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetOrExtendReservation(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/flyteidl.cacheservice.CacheService/GetOrExtendReservation', + flyteidl_dot_cacheservice_dot_cacheservice__pb2.GetOrExtendReservationRequest.SerializeToString, + flyteidl_dot_cacheservice_dot_cacheservice__pb2.GetOrExtendReservationResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ReleaseReservation(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/flyteidl.cacheservice.CacheService/ReleaseReservation', + flyteidl_dot_cacheservice_dot_cacheservice__pb2.ReleaseReservationRequest.SerializeToString, + flyteidl_dot_cacheservice_dot_cacheservice__pb2.ReleaseReservationResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/flyteidl/gen/pb_rust/flyteidl.cacheservice.rs b/flyteidl/gen/pb_rust/flyteidl.cacheservice.rs new file mode 100644 index 0000000000..9f2122fc4e --- /dev/null +++ b/flyteidl/gen/pb_rust/flyteidl.cacheservice.rs @@ -0,0 +1,172 @@ +// @generated +/// +/// Additional metadata as key-value pairs +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct KeyMapMetadata { + /// Additional metadata as key-value pairs + #[prost(map="string, string", tag="1")] + pub values: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, +} +/// +/// Metadata for cached outputs, including the source identifier and timestamps. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Metadata { + /// Source task or workflow identifier + #[prost(message, optional, tag="1")] + pub source_identifier: ::core::option::Option, + /// Additional metadata as key-value pairs + #[prost(message, optional, tag="2")] + pub key_map: ::core::option::Option, + /// Creation timestamp + #[prost(message, optional, tag="3")] + pub created_at: ::core::option::Option<::prost_types::Timestamp>, + /// Last update timestamp + #[prost(message, optional, tag="4")] + pub last_updated_at: ::core::option::Option<::prost_types::Timestamp>, +} +/// +/// Represents cached output, either as literals or an URI, with associated metadata. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CachedOutput { + /// Associated metadata + #[prost(message, optional, tag="3")] + pub metadata: ::core::option::Option, + #[prost(oneof="cached_output::Output", tags="1, 2")] + pub output: ::core::option::Option, +} +/// Nested message and enum types in `CachedOutput`. +pub mod cached_output { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Output { + /// Output literals + #[prost(message, tag="1")] + OutputLiterals(super::super::core::LiteralMap), + /// URI to output data + #[prost(string, tag="2")] + OutputUri(::prost::alloc::string::String), + } +} +/// +/// Request to retrieve cached data by key. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCacheRequest { + /// Cache key + #[prost(string, tag="1")] + pub key: ::prost::alloc::string::String, +} +/// +/// Response with cached data for a given key. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetCacheResponse { + /// Cached output + #[prost(message, optional, tag="1")] + pub output: ::core::option::Option, +} +/// +/// Request to store/update cached data by key. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PutCacheRequest { + /// Cache key + #[prost(string, tag="1")] + pub key: ::prost::alloc::string::String, + /// Output to cache + #[prost(message, optional, tag="2")] + pub output: ::core::option::Option, + /// Overwrite flag + #[prost(bool, tag="3")] + pub overwrite: bool, +} +/// +/// Response message of cache store/update operation. +/// +/// Empty, success indicated by no errors +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PutCacheResponse { +} +/// +/// Request to delete cached data by key. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteCacheRequest { + /// Cache key + #[prost(string, tag="1")] + pub key: ::prost::alloc::string::String, +} +/// +/// Response message of cache deletion operation. +/// +/// Empty, success indicated by no errors +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteCacheResponse { +} +/// A reservation including owner, heartbeat interval, expiration timestamp, and various metadata. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Reservation { + /// The unique ID for the reservation - same as the cache key + #[prost(string, tag="1")] + pub key: ::prost::alloc::string::String, + /// The unique ID of the owner for the reservation + #[prost(string, tag="2")] + pub owner_id: ::prost::alloc::string::String, + /// Requested reservation extension heartbeat interval + #[prost(message, optional, tag="3")] + pub heartbeat_interval: ::core::option::Option<::prost_types::Duration>, + /// Expiration timestamp of this reservation + #[prost(message, optional, tag="4")] + pub expires_at: ::core::option::Option<::prost_types::Timestamp>, +} +/// +/// Request to get or extend a reservation for a cache key +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetOrExtendReservationRequest { + /// The unique ID for the reservation - same as the cache key + #[prost(string, tag="1")] + pub key: ::prost::alloc::string::String, + /// The unique ID of the owner for the reservation + #[prost(string, tag="2")] + pub owner_id: ::prost::alloc::string::String, + /// Requested reservation extension heartbeat interval + #[prost(message, optional, tag="3")] + pub heartbeat_interval: ::core::option::Option<::prost_types::Duration>, +} +/// +/// Request to get or extend a reservation for a cache key +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetOrExtendReservationResponse { + /// The reservation that was created or extended + #[prost(message, optional, tag="1")] + pub reservation: ::core::option::Option, +} +/// +/// Request to release the reservation for a cache key +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ReleaseReservationRequest { + /// The unique ID for the reservation - same as the cache key + #[prost(string, tag="1")] + pub key: ::prost::alloc::string::String, + /// The unique ID of the owner for the reservation + #[prost(string, tag="2")] + pub owner_id: ::prost::alloc::string::String, +} +/// +/// Response message of release reservation operation. +/// +/// Empty, success indicated by no errors +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ReleaseReservationResponse { +} +// @@protoc_insertion_point(module) diff --git a/flyteidl/generate_mocks.sh b/flyteidl/generate_mocks.sh index 4ada054af1..3e3974def8 100755 --- a/flyteidl/generate_mocks.sh +++ b/flyteidl/generate_mocks.sh @@ -4,3 +4,4 @@ set -x mockery -dir=gen/pb-go/flyteidl/service/ -all -output=clients/go/admin/mocks mockery -dir=gen/pb-go/flyteidl/datacatalog/ -name=DataCatalogClient -output=clients/go/datacatalog/mocks +mockery -dir=gen/pb-go/flyteidl/cacheservice/ -name=CacheServiceClient -output=clients/go/cacheservice/mocks diff --git a/flyteidl/protos/flyteidl/cacheservice/cacheservice.proto b/flyteidl/protos/flyteidl/cacheservice/cacheservice.proto new file mode 100644 index 0000000000..c85e2eb55c --- /dev/null +++ b/flyteidl/protos/flyteidl/cacheservice/cacheservice.proto @@ -0,0 +1,143 @@ +syntax = "proto3"; + +package flyteidl.cacheservice; + +import "flyteidl/core/literals.proto"; +import "flyteidl/core/types.proto"; +import "flyteidl/core/identifier.proto"; +import "flyteidl/core/interface.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/cacheservice"; + +/* + * CacheService defines operations for cache management including retrieval, storage, and deletion of cached task/workflow outputs. + */ +service CacheService { + // Retrieves cached data by key. + rpc Get (GetCacheRequest) returns (GetCacheResponse); + + // Stores or updates cached data by key. + rpc Put (PutCacheRequest) returns (PutCacheResponse); + + // Deletes cached data by key. + rpc Delete (DeleteCacheRequest) returns (DeleteCacheResponse); + + // Get or extend a reservation for a cache key + rpc GetOrExtendReservation (GetOrExtendReservationRequest) returns (GetOrExtendReservationResponse); + + // Release the reservation for a cache key + rpc ReleaseReservation (ReleaseReservationRequest) returns (ReleaseReservationResponse); +} + +/* + * Additional metadata as key-value pairs + */ +message KeyMapMetadata { + map values = 1; // Additional metadata as key-value pairs +} + +/* + * Metadata for cached outputs, including the source identifier and timestamps. + */ +message Metadata { + core.Identifier source_identifier = 1; // Source task or workflow identifier + KeyMapMetadata key_map = 2; // Additional metadata as key-value pairs + google.protobuf.Timestamp created_at = 3; // Creation timestamp + google.protobuf.Timestamp last_updated_at = 4; // Last update timestamp +} + +/* + * Represents cached output, either as literals or an URI, with associated metadata. + */ +message CachedOutput { + oneof output { + flyteidl.core.LiteralMap output_literals = 1; // Output literals + string output_uri = 2; // URI to output data + } + Metadata metadata = 3; // Associated metadata +} + +/* + * Request to retrieve cached data by key. + */ +message GetCacheRequest { + string key = 1; // Cache key +} + +/* + * Response with cached data for a given key. + */ +message GetCacheResponse { + CachedOutput output = 1; // Cached output +} + +/* + * Request to store/update cached data by key. + */ +message PutCacheRequest { + string key = 1; // Cache key + CachedOutput output = 2; // Output to cache + bool overwrite = 3; // Overwrite flag +} + +/* + * Response message of cache store/update operation. + */ +message PutCacheResponse { + // Empty, success indicated by no errors +} + +/* + * Request to delete cached data by key. + */ +message DeleteCacheRequest { + string key = 1; // Cache key +} + +/* + * Response message of cache deletion operation. + */ +message DeleteCacheResponse { + // Empty, success indicated by no errors +} + +// A reservation including owner, heartbeat interval, expiration timestamp, and various metadata. +message Reservation { + string key = 1; // The unique ID for the reservation - same as the cache key + string owner_id = 2; // The unique ID of the owner for the reservation + google.protobuf.Duration heartbeat_interval = 3; // Requested reservation extension heartbeat interval + google.protobuf.Timestamp expires_at = 4; // Expiration timestamp of this reservation +} + +/* + * Request to get or extend a reservation for a cache key + */ +message GetOrExtendReservationRequest { + string key = 1; // The unique ID for the reservation - same as the cache key + string owner_id = 2; // The unique ID of the owner for the reservation + google.protobuf.Duration heartbeat_interval = 3; // Requested reservation extension heartbeat interval +} + +/* + * Request to get or extend a reservation for a cache key + */ +message GetOrExtendReservationResponse { + Reservation reservation = 1; // The reservation that was created or extended +} + +/* + * Request to release the reservation for a cache key + */ +message ReleaseReservationRequest { + string key = 1; // The unique ID for the reservation - same as the cache key + string owner_id = 2; // The unique ID of the owner for the reservation +} + +/* + * Response message of release reservation operation. + */ +message ReleaseReservationResponse { + // Empty, success indicated by no errors +} \ No newline at end of file