mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-08 17:41:31 +02:00
make id and payload columns configurable
This commit is contained in:
@@ -682,7 +682,19 @@ var PostgresCRDResourceValidation = apiextv1.CustomResourceValidation{
|
||||
Type: "object",
|
||||
AdditionalProperties: &apiextv1.JSONSchemaPropsOrBool{
|
||||
Schema: &apiextv1.JSONSchemaProps{
|
||||
Type: "string",
|
||||
Type: "object",
|
||||
Required: []string{"eventType"},
|
||||
Properties: map[string]apiextv1.JSONSchemaProps{
|
||||
"eventType": {
|
||||
Type: "string",
|
||||
},
|
||||
"idColumn": {
|
||||
Type: "string",
|
||||
},
|
||||
"payloadColumn": {
|
||||
Type: "string",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -229,8 +229,14 @@ type ConnectionPooler struct {
|
||||
}
|
||||
|
||||
type Stream struct {
|
||||
Database string `json:"database"`
|
||||
Tables map[string]string `json:"tables"`
|
||||
Filter map[string]string `json:"filter,omitempty"`
|
||||
BatchSize uint32 `json:"batchSize,omitempty"`
|
||||
Database string `json:"database"`
|
||||
Tables map[string]StreamTable `json:"tables"`
|
||||
Filter map[string]string `json:"filter,omitempty"`
|
||||
BatchSize uint32 `json:"batchSize,omitempty"`
|
||||
}
|
||||
|
||||
type StreamTable struct {
|
||||
EventType string `json:"eventType"`
|
||||
IdColumn string `json:"idColumn,omitempty" defaults:"id"`
|
||||
PayloadColumn string `json:"payloadColumn,omitempty" defaults:"payload"`
|
||||
}
|
||||
|
||||
@@ -1143,7 +1143,7 @@ func (in *Stream) DeepCopyInto(out *Stream) {
|
||||
*out = *in
|
||||
if in.Tables != nil {
|
||||
in, out := &in.Tables, &out.Tables
|
||||
*out = make(map[string]string, len(*in))
|
||||
*out = make(map[string]StreamTable, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
@@ -1168,6 +1168,22 @@ func (in *Stream) DeepCopy() *Stream {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *StreamTable) DeepCopyInto(out *StreamTable) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StreamTable.
|
||||
func (in *StreamTable) DeepCopy() *StreamTable {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(StreamTable)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *TLSDescription) DeepCopyInto(out *TLSDescription) {
|
||||
*out = *in
|
||||
|
||||
Reference in New Issue
Block a user