提交 2e268539 编写于 作者: U utsavoza

Add flag to support ssl connections

上级 3b70b1ab
...@@ -54,6 +54,7 @@ func runImport(args []string) error { ...@@ -54,6 +54,7 @@ func runImport(args []string) error {
test := flagset.Bool("test", false, `if set to true, only pipeline is created and sync is not started. test := flagset.Bool("test", false, `if set to true, only pipeline is created and sync is not started.
Useful for checking your configuration`) Useful for checking your configuration`)
sacPath := flagset.String("sac_path", "./ServiceAccountKey.json", "Path to firebase service account credentials file") sacPath := flagset.String("sac_path", "./ServiceAccountKey.json", "Path to firebase service account credentials file")
ssl := flagset.Bool("ssl", false, "Enable SSL connection to the source.")
requestSize := flagset.Int64("request_size", 2<<19, "Http request size in bytes, specifically for bulk requests to ES.") requestSize := flagset.Int64("request_size", 2<<19, "Http request size in bytes, specifically for bulk requests to ES.")
bulkRequests := flagset.Int("bulk_requests", 1000, "Number of bulk requests to send during a network request to ES.") bulkRequests := flagset.Int("bulk_requests", 1000, "Number of bulk requests to send during a network request to ES.")
...@@ -93,16 +94,16 @@ func runImport(args []string) error { ...@@ -93,16 +94,16 @@ func runImport(args []string) error {
"tail": *tail, "tail": *tail,
"typeName": *typeName, "typeName": *typeName,
"replication_slot": *replicationSlot, "replication_slot": *replicationSlot,
// "timeout": *timeout, "srcRegex": *srcRegex,
"srcRegex": *srcRegex, "sacPath": *sacPath,
"sacPath": *sacPath, "ssl": *ssl,
"_transform_": *transformFile, "_transform_": *transformFile,
} }
var destConfig = map[string]interface{}{ var destConfig = map[string]interface{}{
"uri": destURL, "uri": destURL,
"_name_": "elasticsearch", "_name_": "elasticsearch",
"request_size": *requestSize, "request_size": *requestSize,
"bulk_requests": *bulkRequests, "bulk_requests": *bulkRequests,
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册