@@ -41,21 +41,21 @@ type Config struct {
4141
4242// ParseFlags parses the configuration flags specific to PostgreSQL and TimescaleDB
4343func ParseFlags (cfg * Config ) * Config {
44- flag .StringVar (& cfg .host , "pg- host" , "localhost" , "The PostgreSQL host" )
45- flag .IntVar (& cfg .port , "pg- port" , 5432 , "The PostgreSQL port" )
46- flag .StringVar (& cfg .user , "pg- user" , "postgres" , "The PostgreSQL user" )
47- flag .StringVar (& cfg .password , "pg- password" , "" , "The PostgreSQL password" )
48- flag .StringVar (& cfg .database , "pg- database" , "postgres" , "The PostgreSQL database" )
49- flag .StringVar (& cfg .schema , "pg- schema" , "" , "The PostgreSQL schema" )
50- flag .StringVar (& cfg .sslMode , "pg- ssl-mode" , "disable" , "The PostgreSQL connection ssl mode" )
51- flag .StringVar (& cfg .table , "pg- table" , "metrics" , "The PostgreSQL table" )
52- flag .StringVar (& cfg .copyTable , "pg- copy-table" , "metrics_copy" , "The PostgreSQL table" )
53- flag .IntVar (& cfg .maxOpenConns , "pg- max-open-conns" , 50 , "The max number of open connections to the database" )
54- flag .IntVar (& cfg .maxIdleConns , "pg- max-idle-conns" , 10 , "The max number of idle connections to the database" )
55- flag .BoolVar (& cfg .pgPrometheusNormalize , "pg- prometheus-normalized-schema" , true , "Insert metric samples into normalized schema" )
56- flag .BoolVar (& cfg .pgPrometheusLogSamples , "pg- prometheus-log-samples" , false , "Log raw samples to stdout" )
57- flag .DurationVar (& cfg .pgPrometheusChunkInterval , "pg- prometheus-chunk-interval" , time .Hour * 12 , "The size of a time-partition chunk in TimescaleDB" )
58- flag .BoolVar (& cfg .useTimescaleDb , "pg- use-timescaledb" , true , "Use timescaleDB" )
44+ flag .StringVar (& cfg .host , "pg. host" , "localhost" , "The PostgreSQL host" )
45+ flag .IntVar (& cfg .port , "pg. port" , 5432 , "The PostgreSQL port" )
46+ flag .StringVar (& cfg .user , "pg. user" , "postgres" , "The PostgreSQL user" )
47+ flag .StringVar (& cfg .password , "pg. password" , "" , "The PostgreSQL password" )
48+ flag .StringVar (& cfg .database , "pg. database" , "postgres" , "The PostgreSQL database" )
49+ flag .StringVar (& cfg .schema , "pg. schema" , "" , "The PostgreSQL schema" )
50+ flag .StringVar (& cfg .sslMode , "pg. ssl-mode" , "disable" , "The PostgreSQL connection ssl mode" )
51+ flag .StringVar (& cfg .table , "pg. table" , "metrics" , "The PostgreSQL table" )
52+ flag .StringVar (& cfg .copyTable , "pg. copy-table" , "metrics_copy" , "The PostgreSQL table" )
53+ flag .IntVar (& cfg .maxOpenConns , "pg. max-open-conns" , 50 , "The max number of open connections to the database" )
54+ flag .IntVar (& cfg .maxIdleConns , "pg. max-idle-conns" , 10 , "The max number of idle connections to the database" )
55+ flag .BoolVar (& cfg .pgPrometheusNormalize , "pg. prometheus-normalized-schema" , true , "Insert metric samples into normalized schema" )
56+ flag .BoolVar (& cfg .pgPrometheusLogSamples , "pg. prometheus-log-samples" , false , "Log raw samples to stdout" )
57+ flag .DurationVar (& cfg .pgPrometheusChunkInterval , "pg. prometheus-chunk-interval" , time .Hour * 12 , "The size of a time-partition chunk in TimescaleDB" )
58+ flag .BoolVar (& cfg .useTimescaleDb , "pg. use-timescaledb" , true , "Use timescaleDB" )
5959 return cfg
6060}
6161
0 commit comments