You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cmd/configure.go
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,7 @@ import (
4
4
"context"
5
5
"log"
6
6
"strconv"
7
+
"strings"
7
8
"time"
8
9
9
10
"github.com/replicase/pgcapture/pkg/decode"
@@ -27,6 +28,7 @@ var (
27
28
ConfigPulsarTrackerReplicateStatebool
28
29
ConfigDecodePluginstring
29
30
ConfigBatchTXSizeint
31
+
ConfigTables []string
30
32
)
31
33
32
34
funcinit() {
@@ -44,6 +46,7 @@ func init() {
44
46
configure.Flags().BoolVarP(&ConfigPulsarTrackerReplicateState, "PulsarTrackerReplicateState", "", false, "the replicate state for the pg2pulsar, optional")
45
47
configure.Flags().StringVarP(&ConfigDecodePlugin, "DecodePlugin", "", decode.PGOutputPlugin, "the logical decoding plugin name")
46
48
configure.Flags().IntVarP(&ConfigBatchTXSize, "BatchTxSize", "", 100, "the max number of tx in a pipeline")
49
+
configure.Flags().StringSliceVar(&ConfigTables, "Tables", nil, "tables to capture (e.g., public.users,public.orders); empty for all tables (pgoutput plugin only)")
Copy file name to clipboardExpand all lines: cmd/pg2pulsar.go
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,7 @@ var (
14
14
SinkPulsarURLstring
15
15
SinkPulsarTopicstring
16
16
DecodePluginstring
17
+
SourceTables []string
17
18
)
18
19
19
20
funcinit() {
@@ -23,6 +24,7 @@ func init() {
23
24
pg2pulsar.Flags().StringVarP(&SinkPulsarURL, "PulsarURL", "", "", "connection url to sink pulsar cluster")
24
25
pg2pulsar.Flags().StringVarP(&SinkPulsarTopic, "PulsarTopic", "", "", "the sink pulsar topic name and as well as the logical replication slot name")
25
26
pg2pulsar.Flags().StringVar(&DecodePlugin, "DecodePlugin", decode.PGOutputPlugin, "the logical decoding plugin name")
27
+
pg2pulsar.Flags().StringSliceVar(&SourceTables, "Tables", nil, "tables to capture (e.g., public.users,public.orders); empty for all tables (pgoutput plugin only)")
26
28
pg2pulsar.MarkFlagRequired("PGConnURL")
27
29
pg2pulsar.MarkFlagRequired("PGReplURL")
28
30
pg2pulsar.MarkFlagRequired("PulsarURL")
@@ -33,7 +35,7 @@ var pg2pulsar = &cobra.Command{
33
35
Use: "pg2pulsar",
34
36
Short: "Capture logical replication logs to a Pulsar Topic from a PostgreSQL logical replication slot",
0 commit comments