From b8e17e42e05c1dc5b640a1bbf2466b1fc193d267 Mon Sep 17 00:00:00 2001 From: Leonardo Cecchi Date: Fri, 30 Aug 2024 14:33:27 +0200 Subject: [PATCH] feat: postgres interface (#42) Add an interface to interact with PostgreSQL configuration parameters Signed-off-by: Leonardo Cecchi Signed-off-by: Armando Ruocco Co-authored-by: Armando Ruocco --- .wordlist.txt | 36 +- docs/docs.md | 170 +++++++++ pkg/postgres/postgres.pb.go | 586 +++++++++++++++++++++++++++++++ pkg/postgres/postgres_grpc.pb.go | 152 ++++++++ proto/postgres.proto | 53 +++ 5 files changed, 983 insertions(+), 14 deletions(-) create mode 100644 pkg/postgres/postgres.pb.go create mode 100644 pkg/postgres/postgres_grpc.pb.go create mode 100644 proto/postgres.proto diff --git a/.wordlist.txt b/.wordlist.txt index edf9020..57613cd 100644 --- a/.wordlist.txt +++ b/.wordlist.txt @@ -1,6 +1,4 @@ AdditionalInformationEntry -alphanumerics -api BackupCapabilitiesRequest BackupCapabilitiesResult BackupCapability @@ -8,10 +6,14 @@ BackupRequest BackupResult ByteString CloudNativePG +ConfigsEntry DEREGISTER Deregister DeregisterRequest DeregisterResponse +EnrichConfiguration +EnrichConfigurationRequest +EnrichConfigurationResult FalseClass GetCapabilities GetPluginCapabilities @@ -21,9 +23,6 @@ GetPluginMetadata GetPluginMetadataRequest GetPluginMetadataResponse JSONPatch -kube -kubernetes -lifecycle LifecycleHook ManifestEntry MetadataEntry @@ -47,10 +46,15 @@ OperatorValidateClusterCreateRequest OperatorValidateClusterCreateResult ParametersEntry PluginCapability +PostgresCapabilitiesRequest +PostgresCapabilitiesResult +PostgresCapability Pre ProbeRequest ProbeResponse RPC +RPC +RPCs RPCs ReconcilerHooks ReconcilerHooksCapabilitiesRequest @@ -58,19 +62,13 @@ ReconcilerHooksCapabilitiesResult ReconcilerHooksCapability ReconcilerHooksRequest ReconcilerHooksResult -reconcilers -requeue -rfc -RPC -rpc -RPCs ScheduledBackup -SetStatusInCluster -SetStatusInClusterRequest -SetStatusInClusterResponse SetFirstRequired SetFirstRequiredRequest SetFirstRequiredResult +SetStatusInCluster +SetStatusInClusterRequest +SetStatusInClusterResponse TrueClass ValidateClusterChange ValidateClusterCreate @@ -87,11 +85,14 @@ WALService WALStatusRequest WALStatusResult alphanumerics +alphanumerics +api bignum bool boolean cncf cnpg +configs csi customizable customizations @@ -102,8 +103,11 @@ html https ietf json +kube +kubernetes kubernetes lifecycle +lifecycle lsn pluggable pluginName @@ -111,9 +115,13 @@ postgres proto reconciler reconcilers +reconcilers requeue +requeue +rfc rfc rpc +rpc sfixed sint slonik diff --git a/docs/docs.md b/docs/docs.md index e2c9140..03d6efd 100644 --- a/docs/docs.md +++ b/docs/docs.md @@ -65,6 +65,20 @@ - [OperatorLifecycle](#cnpgi-operator_lifecycle-v1-OperatorLifecycle) +- [postgres.proto](#postgres-proto) + - [EnrichConfigurationRequest](#cnpgi-identity-v1-EnrichConfigurationRequest) + - [EnrichConfigurationRequest.ConfigsEntry](#cnpgi-identity-v1-EnrichConfigurationRequest-ConfigsEntry) + - [EnrichConfigurationResult](#cnpgi-identity-v1-EnrichConfigurationResult) + - [EnrichConfigurationResult.ConfigsEntry](#cnpgi-identity-v1-EnrichConfigurationResult-ConfigsEntry) + - [PostgresCapabilitiesRequest](#cnpgi-identity-v1-PostgresCapabilitiesRequest) + - [PostgresCapabilitiesResult](#cnpgi-identity-v1-PostgresCapabilitiesResult) + - [PostgresCapability](#cnpgi-identity-v1-PostgresCapability) + - [PostgresCapability.RPC](#cnpgi-identity-v1-PostgresCapability-RPC) + + - [PostgresCapability.RPC.Type](#cnpgi-identity-v1-PostgresCapability-RPC-Type) + + - [Postgres](#cnpgi-identity-v1-Postgres) + - [reconciler.proto](#reconciler-proto) - [ReconcilerHooksCapabilitiesRequest](#cnpgi-reconciler-v1-ReconcilerHooksCapabilitiesRequest) - [ReconcilerHooksCapabilitiesResult](#cnpgi-reconciler-v1-ReconcilerHooksCapabilitiesResult) @@ -844,6 +858,162 @@ The operator type corresponds to the Kubernetes API method + +

Top

+ +## postgres.proto + + + + + +### EnrichConfigurationRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| configs | [EnrichConfigurationRequest.ConfigsEntry](#cnpgi-identity-v1-EnrichConfigurationRequest-ConfigsEntry) | repeated | This field is REQUIRED and represent the PostgreSQL configuration parameters as generated by the instance manager | + + + + + + + + +### EnrichConfigurationRequest.ConfigsEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [string](#string) | | | + + + + + + + + +### EnrichConfigurationResult + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| configs | [EnrichConfigurationResult.ConfigsEntry](#cnpgi-identity-v1-EnrichConfigurationResult-ConfigsEntry) | repeated | This field is OPTIONAL. It represent the configuration parameters that need to be changed before applying a new configuration | + + + + + + + + +### EnrichConfigurationResult.ConfigsEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [string](#string) | | | + + + + + + + + +### PostgresCapabilitiesRequest +Intentionally empty + + + + + + + + +### PostgresCapabilitiesResult + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| capabilities | [PostgresCapability](#cnpgi-identity-v1-PostgresCapability) | repeated | All the capabilities that the controller service supports. This field is OPTIONAL. | + + + + + + + + +### PostgresCapability + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| rpc | [PostgresCapability.RPC](#cnpgi-identity-v1-PostgresCapability-RPC) | | | + + + + + + + + +### PostgresCapability.RPC + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| type | [PostgresCapability.RPC.Type](#cnpgi-identity-v1-PostgresCapability-RPC-Type) | | | + + + + + + + + + + +### PostgresCapability.RPC.Type + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| TYPE_UNSPECIFIED | 0 | | +| TYPE_ENRICH_CONFIGURATION | 1 | TYPE_BACKUP indicates that the Plugin is able to enrich the PostgreSQL configuration via the EnrichConfiguration endpoint | + + + + + + + + + +### Postgres + + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| GetCapabilities | [PostgresCapabilitiesRequest](#cnpgi-identity-v1-PostgresCapabilitiesRequest) | [PostgresCapabilitiesResult](#cnpgi-identity-v1-PostgresCapabilitiesResult) | GetCapabilities gets the capabilities of the Backup service | +| EnrichConfiguration | [EnrichConfigurationRequest](#cnpgi-identity-v1-EnrichConfigurationRequest) | [EnrichConfigurationResult](#cnpgi-identity-v1-EnrichConfigurationResult) | EnrichConfiguration is called before applying the configuration to PostgreSQL | + + + + +

Top

diff --git a/pkg/postgres/postgres.pb.go b/pkg/postgres/postgres.pb.go new file mode 100644 index 0000000..e04063f --- /dev/null +++ b/pkg/postgres/postgres.pb.go @@ -0,0 +1,586 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.33.0 +// protoc v5.27.2 +// source: proto/postgres.proto + +package postgres + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PostgresCapability_RPC_Type int32 + +const ( + PostgresCapability_RPC_TYPE_UNSPECIFIED PostgresCapability_RPC_Type = 0 + // TYPE_BACKUP indicates that the Plugin is able to + // enrich the PostgreSQL configuration via the + // EnrichConfiguration endpoint + PostgresCapability_RPC_TYPE_ENRICH_CONFIGURATION PostgresCapability_RPC_Type = 1 +) + +// Enum value maps for PostgresCapability_RPC_Type. +var ( + PostgresCapability_RPC_Type_name = map[int32]string{ + 0: "TYPE_UNSPECIFIED", + 1: "TYPE_ENRICH_CONFIGURATION", + } + PostgresCapability_RPC_Type_value = map[string]int32{ + "TYPE_UNSPECIFIED": 0, + "TYPE_ENRICH_CONFIGURATION": 1, + } +) + +func (x PostgresCapability_RPC_Type) Enum() *PostgresCapability_RPC_Type { + p := new(PostgresCapability_RPC_Type) + *p = x + return p +} + +func (x PostgresCapability_RPC_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PostgresCapability_RPC_Type) Descriptor() protoreflect.EnumDescriptor { + return file_proto_postgres_proto_enumTypes[0].Descriptor() +} + +func (PostgresCapability_RPC_Type) Type() protoreflect.EnumType { + return &file_proto_postgres_proto_enumTypes[0] +} + +func (x PostgresCapability_RPC_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PostgresCapability_RPC_Type.Descriptor instead. +func (PostgresCapability_RPC_Type) EnumDescriptor() ([]byte, []int) { + return file_proto_postgres_proto_rawDescGZIP(), []int{2, 0, 0} +} + +type PostgresCapabilitiesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PostgresCapabilitiesRequest) Reset() { + *x = PostgresCapabilitiesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_postgres_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PostgresCapabilitiesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostgresCapabilitiesRequest) ProtoMessage() {} + +func (x *PostgresCapabilitiesRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_postgres_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 PostgresCapabilitiesRequest.ProtoReflect.Descriptor instead. +func (*PostgresCapabilitiesRequest) Descriptor() ([]byte, []int) { + return file_proto_postgres_proto_rawDescGZIP(), []int{0} +} + +type PostgresCapabilitiesResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // All the capabilities that the controller service supports. This + // field is OPTIONAL. + Capabilities []*PostgresCapability `protobuf:"bytes,1,rep,name=capabilities,proto3" json:"capabilities,omitempty"` +} + +func (x *PostgresCapabilitiesResult) Reset() { + *x = PostgresCapabilitiesResult{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_postgres_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PostgresCapabilitiesResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostgresCapabilitiesResult) ProtoMessage() {} + +func (x *PostgresCapabilitiesResult) ProtoReflect() protoreflect.Message { + mi := &file_proto_postgres_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 PostgresCapabilitiesResult.ProtoReflect.Descriptor instead. +func (*PostgresCapabilitiesResult) Descriptor() ([]byte, []int) { + return file_proto_postgres_proto_rawDescGZIP(), []int{1} +} + +func (x *PostgresCapabilitiesResult) GetCapabilities() []*PostgresCapability { + if x != nil { + return x.Capabilities + } + return nil +} + +type PostgresCapability struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Type: + // + // *PostgresCapability_Rpc + Type isPostgresCapability_Type `protobuf_oneof:"type"` +} + +func (x *PostgresCapability) Reset() { + *x = PostgresCapability{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_postgres_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PostgresCapability) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostgresCapability) ProtoMessage() {} + +func (x *PostgresCapability) ProtoReflect() protoreflect.Message { + mi := &file_proto_postgres_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 PostgresCapability.ProtoReflect.Descriptor instead. +func (*PostgresCapability) Descriptor() ([]byte, []int) { + return file_proto_postgres_proto_rawDescGZIP(), []int{2} +} + +func (m *PostgresCapability) GetType() isPostgresCapability_Type { + if m != nil { + return m.Type + } + return nil +} + +func (x *PostgresCapability) GetRpc() *PostgresCapability_RPC { + if x, ok := x.GetType().(*PostgresCapability_Rpc); ok { + return x.Rpc + } + return nil +} + +type isPostgresCapability_Type interface { + isPostgresCapability_Type() +} + +type PostgresCapability_Rpc struct { + Rpc *PostgresCapability_RPC `protobuf:"bytes,1,opt,name=rpc,proto3,oneof"` +} + +func (*PostgresCapability_Rpc) isPostgresCapability_Type() {} + +type EnrichConfigurationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // This field is REQUIRED and represent the PostgreSQL configuration parameters as + // generated by the instance manager + Configs map[string]string `protobuf:"bytes,1,rep,name=configs,proto3" json:"configs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *EnrichConfigurationRequest) Reset() { + *x = EnrichConfigurationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_postgres_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EnrichConfigurationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnrichConfigurationRequest) ProtoMessage() {} + +func (x *EnrichConfigurationRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_postgres_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 EnrichConfigurationRequest.ProtoReflect.Descriptor instead. +func (*EnrichConfigurationRequest) Descriptor() ([]byte, []int) { + return file_proto_postgres_proto_rawDescGZIP(), []int{3} +} + +func (x *EnrichConfigurationRequest) GetConfigs() map[string]string { + if x != nil { + return x.Configs + } + return nil +} + +type EnrichConfigurationResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // This field is OPTIONAL. It represent the configuration parameters that need + // to be changed before applying a new configuration + Configs map[string]string `protobuf:"bytes,1,rep,name=configs,proto3" json:"configs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *EnrichConfigurationResult) Reset() { + *x = EnrichConfigurationResult{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_postgres_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EnrichConfigurationResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnrichConfigurationResult) ProtoMessage() {} + +func (x *EnrichConfigurationResult) ProtoReflect() protoreflect.Message { + mi := &file_proto_postgres_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 EnrichConfigurationResult.ProtoReflect.Descriptor instead. +func (*EnrichConfigurationResult) Descriptor() ([]byte, []int) { + return file_proto_postgres_proto_rawDescGZIP(), []int{4} +} + +func (x *EnrichConfigurationResult) GetConfigs() map[string]string { + if x != nil { + return x.Configs + } + return nil +} + +type PostgresCapability_RPC struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type PostgresCapability_RPC_Type `protobuf:"varint,1,opt,name=type,proto3,enum=cnpgi.identity.v1.PostgresCapability_RPC_Type" json:"type,omitempty"` +} + +func (x *PostgresCapability_RPC) Reset() { + *x = PostgresCapability_RPC{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_postgres_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PostgresCapability_RPC) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostgresCapability_RPC) ProtoMessage() {} + +func (x *PostgresCapability_RPC) ProtoReflect() protoreflect.Message { + mi := &file_proto_postgres_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 PostgresCapability_RPC.ProtoReflect.Descriptor instead. +func (*PostgresCapability_RPC) Descriptor() ([]byte, []int) { + return file_proto_postgres_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *PostgresCapability_RPC) GetType() PostgresCapability_RPC_Type { + if x != nil { + return x.Type + } + return PostgresCapability_RPC_TYPE_UNSPECIFIED +} + +var File_proto_postgres_proto protoreflect.FileDescriptor + +var file_proto_postgres_proto_rawDesc = []byte{ + 0x0a, 0x14, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x69, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x22, 0x1d, 0x0a, 0x1b, 0x50, 0x6f, 0x73, + 0x74, 0x67, 0x72, 0x65, 0x73, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x67, 0x0a, 0x1a, 0x50, 0x6f, 0x73, 0x74, + 0x67, 0x72, 0x65, 0x73, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x49, 0x0a, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, + 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x52, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, + 0x73, 0x22, 0xe4, 0x01, 0x0a, 0x12, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x43, 0x61, + 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x3d, 0x0a, 0x03, 0x72, 0x70, 0x63, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x69, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, + 0x65, 0x73, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x50, 0x43, + 0x48, 0x00, 0x52, 0x03, 0x72, 0x70, 0x63, 0x1a, 0x86, 0x01, 0x0a, 0x03, 0x52, 0x50, 0x43, 0x12, + 0x42, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, + 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x50, 0x43, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x22, 0x3b, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x1d, 0x0a, 0x19, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x52, 0x49, 0x43, 0x48, + 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x55, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, + 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xae, 0x01, 0x0a, 0x1a, 0x45, 0x6e, 0x72, + 0x69, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x54, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, + 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x72, + 0x69, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x1a, 0x3a, 0x0a, + 0x0c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 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, 0xac, 0x01, 0x0a, 0x19, 0x45, 0x6e, + 0x72, 0x69, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x53, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, + 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x72, + 0x69, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 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, 0x32, 0xf4, 0x01, 0x0a, 0x08, 0x50, 0x6f, 0x73, + 0x74, 0x67, 0x72, 0x65, 0x73, 0x12, 0x72, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x61, 0x70, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x2e, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, + 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, + 0x74, 0x67, 0x72, 0x65, 0x73, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, + 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, + 0x74, 0x67, 0x72, 0x65, 0x73, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x12, 0x74, 0x0a, 0x13, 0x45, 0x6e, 0x72, + 0x69, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x2d, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x72, 0x69, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2c, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x72, 0x69, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x42, + 0x2f, 0x5a, 0x2d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x2d, 0x70, 0x67, 0x2f, 0x63, 0x6e, 0x70, + 0x67, 0x2d, 0x69, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_proto_postgres_proto_rawDescOnce sync.Once + file_proto_postgres_proto_rawDescData = file_proto_postgres_proto_rawDesc +) + +func file_proto_postgres_proto_rawDescGZIP() []byte { + file_proto_postgres_proto_rawDescOnce.Do(func() { + file_proto_postgres_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_postgres_proto_rawDescData) + }) + return file_proto_postgres_proto_rawDescData +} + +var file_proto_postgres_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_proto_postgres_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_proto_postgres_proto_goTypes = []interface{}{ + (PostgresCapability_RPC_Type)(0), // 0: cnpgi.identity.v1.PostgresCapability.RPC.Type + (*PostgresCapabilitiesRequest)(nil), // 1: cnpgi.identity.v1.PostgresCapabilitiesRequest + (*PostgresCapabilitiesResult)(nil), // 2: cnpgi.identity.v1.PostgresCapabilitiesResult + (*PostgresCapability)(nil), // 3: cnpgi.identity.v1.PostgresCapability + (*EnrichConfigurationRequest)(nil), // 4: cnpgi.identity.v1.EnrichConfigurationRequest + (*EnrichConfigurationResult)(nil), // 5: cnpgi.identity.v1.EnrichConfigurationResult + (*PostgresCapability_RPC)(nil), // 6: cnpgi.identity.v1.PostgresCapability.RPC + nil, // 7: cnpgi.identity.v1.EnrichConfigurationRequest.ConfigsEntry + nil, // 8: cnpgi.identity.v1.EnrichConfigurationResult.ConfigsEntry +} +var file_proto_postgres_proto_depIdxs = []int32{ + 3, // 0: cnpgi.identity.v1.PostgresCapabilitiesResult.capabilities:type_name -> cnpgi.identity.v1.PostgresCapability + 6, // 1: cnpgi.identity.v1.PostgresCapability.rpc:type_name -> cnpgi.identity.v1.PostgresCapability.RPC + 7, // 2: cnpgi.identity.v1.EnrichConfigurationRequest.configs:type_name -> cnpgi.identity.v1.EnrichConfigurationRequest.ConfigsEntry + 8, // 3: cnpgi.identity.v1.EnrichConfigurationResult.configs:type_name -> cnpgi.identity.v1.EnrichConfigurationResult.ConfigsEntry + 0, // 4: cnpgi.identity.v1.PostgresCapability.RPC.type:type_name -> cnpgi.identity.v1.PostgresCapability.RPC.Type + 1, // 5: cnpgi.identity.v1.Postgres.GetCapabilities:input_type -> cnpgi.identity.v1.PostgresCapabilitiesRequest + 4, // 6: cnpgi.identity.v1.Postgres.EnrichConfiguration:input_type -> cnpgi.identity.v1.EnrichConfigurationRequest + 2, // 7: cnpgi.identity.v1.Postgres.GetCapabilities:output_type -> cnpgi.identity.v1.PostgresCapabilitiesResult + 5, // 8: cnpgi.identity.v1.Postgres.EnrichConfiguration:output_type -> cnpgi.identity.v1.EnrichConfigurationResult + 7, // [7:9] is the sub-list for method output_type + 5, // [5:7] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_proto_postgres_proto_init() } +func file_proto_postgres_proto_init() { + if File_proto_postgres_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_postgres_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PostgresCapabilitiesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_postgres_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PostgresCapabilitiesResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_postgres_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PostgresCapability); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_postgres_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EnrichConfigurationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_postgres_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EnrichConfigurationResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_postgres_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PostgresCapability_RPC); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_proto_postgres_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*PostgresCapability_Rpc)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_postgres_proto_rawDesc, + NumEnums: 1, + NumMessages: 8, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_proto_postgres_proto_goTypes, + DependencyIndexes: file_proto_postgres_proto_depIdxs, + EnumInfos: file_proto_postgres_proto_enumTypes, + MessageInfos: file_proto_postgres_proto_msgTypes, + }.Build() + File_proto_postgres_proto = out.File + file_proto_postgres_proto_rawDesc = nil + file_proto_postgres_proto_goTypes = nil + file_proto_postgres_proto_depIdxs = nil +} diff --git a/pkg/postgres/postgres_grpc.pb.go b/pkg/postgres/postgres_grpc.pb.go new file mode 100644 index 0000000..9cc0f77 --- /dev/null +++ b/pkg/postgres/postgres_grpc.pb.go @@ -0,0 +1,152 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v5.27.2 +// source: proto/postgres.proto + +package postgres + +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 ( + Postgres_GetCapabilities_FullMethodName = "/cnpgi.identity.v1.Postgres/GetCapabilities" + Postgres_EnrichConfiguration_FullMethodName = "/cnpgi.identity.v1.Postgres/EnrichConfiguration" +) + +// PostgresClient is the client API for Postgres 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 PostgresClient interface { + // GetCapabilities gets the capabilities of the Backup service + GetCapabilities(ctx context.Context, in *PostgresCapabilitiesRequest, opts ...grpc.CallOption) (*PostgresCapabilitiesResult, error) + // EnrichConfiguration is called before applying the configuration + // to PostgreSQL + EnrichConfiguration(ctx context.Context, in *EnrichConfigurationRequest, opts ...grpc.CallOption) (*EnrichConfigurationResult, error) +} + +type postgresClient struct { + cc grpc.ClientConnInterface +} + +func NewPostgresClient(cc grpc.ClientConnInterface) PostgresClient { + return &postgresClient{cc} +} + +func (c *postgresClient) GetCapabilities(ctx context.Context, in *PostgresCapabilitiesRequest, opts ...grpc.CallOption) (*PostgresCapabilitiesResult, error) { + out := new(PostgresCapabilitiesResult) + err := c.cc.Invoke(ctx, Postgres_GetCapabilities_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *postgresClient) EnrichConfiguration(ctx context.Context, in *EnrichConfigurationRequest, opts ...grpc.CallOption) (*EnrichConfigurationResult, error) { + out := new(EnrichConfigurationResult) + err := c.cc.Invoke(ctx, Postgres_EnrichConfiguration_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// PostgresServer is the server API for Postgres service. +// All implementations must embed UnimplementedPostgresServer +// for forward compatibility +type PostgresServer interface { + // GetCapabilities gets the capabilities of the Backup service + GetCapabilities(context.Context, *PostgresCapabilitiesRequest) (*PostgresCapabilitiesResult, error) + // EnrichConfiguration is called before applying the configuration + // to PostgreSQL + EnrichConfiguration(context.Context, *EnrichConfigurationRequest) (*EnrichConfigurationResult, error) + mustEmbedUnimplementedPostgresServer() +} + +// UnimplementedPostgresServer must be embedded to have forward compatible implementations. +type UnimplementedPostgresServer struct { +} + +func (UnimplementedPostgresServer) GetCapabilities(context.Context, *PostgresCapabilitiesRequest) (*PostgresCapabilitiesResult, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetCapabilities not implemented") +} +func (UnimplementedPostgresServer) EnrichConfiguration(context.Context, *EnrichConfigurationRequest) (*EnrichConfigurationResult, error) { + return nil, status.Errorf(codes.Unimplemented, "method EnrichConfiguration not implemented") +} +func (UnimplementedPostgresServer) mustEmbedUnimplementedPostgresServer() {} + +// UnsafePostgresServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to PostgresServer will +// result in compilation errors. +type UnsafePostgresServer interface { + mustEmbedUnimplementedPostgresServer() +} + +func RegisterPostgresServer(s grpc.ServiceRegistrar, srv PostgresServer) { + s.RegisterService(&Postgres_ServiceDesc, srv) +} + +func _Postgres_GetCapabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PostgresCapabilitiesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PostgresServer).GetCapabilities(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Postgres_GetCapabilities_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PostgresServer).GetCapabilities(ctx, req.(*PostgresCapabilitiesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Postgres_EnrichConfiguration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EnrichConfigurationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PostgresServer).EnrichConfiguration(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Postgres_EnrichConfiguration_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PostgresServer).EnrichConfiguration(ctx, req.(*EnrichConfigurationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Postgres_ServiceDesc is the grpc.ServiceDesc for Postgres service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Postgres_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "cnpgi.identity.v1.Postgres", + HandlerType: (*PostgresServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetCapabilities", + Handler: _Postgres_GetCapabilities_Handler, + }, + { + MethodName: "EnrichConfiguration", + Handler: _Postgres_EnrichConfiguration_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "proto/postgres.proto", +} diff --git a/proto/postgres.proto b/proto/postgres.proto new file mode 100644 index 0000000..890831e --- /dev/null +++ b/proto/postgres.proto @@ -0,0 +1,53 @@ +syntax = "proto3"; +package cnpgi.identity.v1; +option go_package = "github.com/cloudnative-pg/cnpg-i/pkg/postgres"; + +service Postgres { + // GetCapabilities gets the capabilities of the Backup service + rpc GetCapabilities(PostgresCapabilitiesRequest) returns (PostgresCapabilitiesResult) {} + + // EnrichConfiguration is called before applying the configuration + // to PostgreSQL + rpc EnrichConfiguration(EnrichConfigurationRequest) returns (EnrichConfigurationResult) {} +} + +message PostgresCapabilitiesRequest { + // Intentionally empty +} + +message PostgresCapabilitiesResult { + // All the capabilities that the controller service supports. This + // field is OPTIONAL. + repeated PostgresCapability capabilities = 1; +} + +message PostgresCapability { + message RPC { + enum Type { + TYPE_UNSPECIFIED = 0; + + // TYPE_BACKUP indicates that the Plugin is able to + // enrich the PostgreSQL configuration via the + // EnrichConfiguration endpoint + TYPE_ENRICH_CONFIGURATION = 1; + } + + Type type = 1; + } + + oneof type { + RPC rpc = 1; + } +} + +message EnrichConfigurationRequest { + // This field is REQUIRED and represent the PostgreSQL configuration parameters as + // generated by the instance manager + map configs = 1; +} + +message EnrichConfigurationResult { + // This field is OPTIONAL. It represent the configuration parameters that need + // to be changed before applying a new configuration + map configs = 1; +}