github.com/whiteboxio/flow@v0.0.3-0.20190918184116-508d75d68a2c/pkg/types/cfg.go (about) 1 package types 2 3 // Cfg is the global config structure, aggregates all other kinds of 4 // config blocks. 5 type Cfg struct { 6 Actors map[string]CfgBlockActor 7 Pipeline map[string]CfgBlockPipeline 8 System CfgBlockSystem 9 } 10 11 // CfgBlockSystem represents the system part of the config: the block 12 // representing settings for admin interface, metrics collection, threadiness 13 // etc. 14 type CfgBlockSystem struct { 15 Admin CfgBlockSystemAdmin 16 Maxprocs int 17 Metrics CfgBlockSystemMetrics 18 } 19 20 // CfgBlockSystemAdmin represents settings for admin interface. 21 type CfgBlockSystemAdmin struct { 22 Bind string 23 Enabled bool 24 } 25 26 // CfgBlockSystemMetrics represents system metrics module settings: sending 27 // interval and the receiver. 28 type CfgBlockSystemMetrics struct { 29 Enabled bool 30 Interval int 31 Receiver CfgBlockSystemMetricsReceiver 32 } 33 34 // CfgBlockSystemMetricsReceiver represents settings for system metrics 35 // receiver: it's type and parameters. 36 type CfgBlockSystemMetricsReceiver struct { 37 Params map[string]Value 38 Type string 39 } 40 41 // CfgBlockActor represents a singular component config: it's module name, 42 // parameter list and (if applicable) plugin name and the corresponding 43 // builder function. 44 type CfgBlockActor struct { 45 Builder string 46 Module string 47 Params map[string]Value 48 } 49 50 // CfgBlockPipeline represents a singular pipeline config: one of 3: connection, 51 // a link set or a routing map. 52 type CfgBlockPipeline struct { 53 Connect []string 54 }