parent
daf9d72347
commit
f1a5bc2c14
|
@ -70,7 +70,7 @@ type (
|
||||||
rate time.Duration
|
rate time.Duration
|
||||||
cc bool
|
cc bool
|
||||||
tor bool
|
tor bool
|
||||||
daily bool
|
daily bool
|
||||||
json bool
|
json bool
|
||||||
ca x509.CertPool
|
ca x509.CertPool
|
||||||
d4error uint8
|
d4error uint8
|
||||||
|
@ -113,17 +113,17 @@ var (
|
||||||
tmpretry, _ = time.ParseDuration("30s")
|
tmpretry, _ = time.ParseDuration("30s")
|
||||||
tmprate, _ = time.ParseDuration("200ms")
|
tmprate, _ = time.ParseDuration("200ms")
|
||||||
|
|
||||||
confdir = flag.String("c", "", "configuration directory")
|
confdir = flag.String("c", "", "configuration directory")
|
||||||
debug = flag.Bool("v", false, "Set to True, true, TRUE, 1, or t to enable verbose output on stdout - Don't use in production")
|
debug = flag.Bool("v", false, "Set to True, true, TRUE, 1, or t to enable verbose output on stdout - Don't use in production")
|
||||||
ce = flag.Bool("ce", true, "Set to True, true, TRUE, 1, or t to enable TLS on network destination")
|
ce = flag.Bool("ce", true, "Set to True, true, TRUE, 1, or t to enable TLS on network destination")
|
||||||
ct = flag.Duration("ct", tmpct, "Set timeout in human format")
|
ct = flag.Duration("ct", tmpct, "Set timeout in human format")
|
||||||
cka = flag.Duration("cka", tmpcka, "Keep Alive time human format, 0 to disable")
|
cka = flag.Duration("cka", tmpcka, "Keep Alive time human format, 0 to disable")
|
||||||
retry = flag.Duration("rt", tmpretry, "Time in human format before retry after connection failure, set to 0 to exit on failure")
|
retry = flag.Duration("rt", tmpretry, "Time in human format before retry after connection failure, set to 0 to exit on failure")
|
||||||
rate = flag.Duration("rl", tmprate, "Rate limiter: time in human format before retry after EOF")
|
rate = flag.Duration("rl", tmprate, "Rate limiter: time in human format before retry after EOF")
|
||||||
cc = flag.Bool("cc", false, "Check TLS certificate against rootCA.crt")
|
cc = flag.Bool("cc", false, "Check TLS certificate against rootCA.crt")
|
||||||
torflag = flag.Bool("tor", false, "Use a SOCKS5 tor proxy on 9050")
|
torflag = flag.Bool("tor", false, "Use a SOCKS5 tor proxy on 9050")
|
||||||
dailyflag = flag.Bool("daily", false, "Sets up filewatcher to watch a new %Y%M%D folder at midnight")
|
dailyflag = flag.Bool("daily", false, "Sets up filewatcher to watch a new %Y%M%D folder at midnight")
|
||||||
jsonflag = flag.Bool("json", false, "The files watched are json files")
|
jsonflag = flag.Bool("json", false, "The files watched are json files")
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -522,7 +522,7 @@ func setReaderWriters(d4 *d4S, force bool) bool {
|
||||||
}
|
}
|
||||||
case "folder":
|
case "folder":
|
||||||
var err error
|
var err error
|
||||||
(*d4).src, err = inputreader.NewFileWatcherReader((*d4).conf.folderstr, (*d4).json, (*d4).daily)
|
(*d4).src, err = inputreader.NewFileWatcherReader((*d4).conf.folderstr, (*d4).json, (*d4).daily, logger)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Could not create File Watcher %q \n", err)
|
log.Printf("Could not create File Watcher %q \n", err)
|
||||||
return false
|
return false
|
||||||
|
|
3
go.mod
3
go.mod
|
@ -2,8 +2,9 @@ module github.com/D4-project/d4-goclient
|
||||||
|
|
||||||
go 1.13
|
go 1.13
|
||||||
|
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/D4-project/d4-golang-utils v0.1.13
|
github.com/D4-project/d4-golang-utils v0.1.14
|
||||||
github.com/gofrs/uuid v4.0.0+incompatible // indirect
|
github.com/gofrs/uuid v4.0.0+incompatible // indirect
|
||||||
github.com/gomodule/redigo v2.0.0+incompatible
|
github.com/gomodule/redigo v2.0.0+incompatible
|
||||||
golang.org/x/net v0.0.0-20210119194325-5f4716e94777
|
golang.org/x/net v0.0.0-20210119194325-5f4716e94777
|
||||||
|
|
2
go.sum
2
go.sum
|
@ -1,5 +1,7 @@
|
||||||
github.com/D4-project/d4-golang-utils v0.1.13 h1:pqa72t2HrbL3QZUGnK0o8wtWOuslkkz8F5E0BzKjwio=
|
github.com/D4-project/d4-golang-utils v0.1.13 h1:pqa72t2HrbL3QZUGnK0o8wtWOuslkkz8F5E0BzKjwio=
|
||||||
github.com/D4-project/d4-golang-utils v0.1.13/go.mod h1:qXVZ3kCL72i3uYe29t7aEy9dU0bNqtFvcoNE1dJu0zo=
|
github.com/D4-project/d4-golang-utils v0.1.13/go.mod h1:qXVZ3kCL72i3uYe29t7aEy9dU0bNqtFvcoNE1dJu0zo=
|
||||||
|
github.com/D4-project/d4-golang-utils v0.1.14 h1:APwN+i4qyDrxT8gvlbeV/VXfNas2GvPWOnkTGX1K2Lo=
|
||||||
|
github.com/D4-project/d4-golang-utils v0.1.14/go.mod h1:qXVZ3kCL72i3uYe29t7aEy9dU0bNqtFvcoNE1dJu0zo=
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
|
github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
|
||||||
github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw=
|
github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw=
|
||||||
|
|
Loading…
Reference in New Issue