Documentation ¶
Index ¶
Constants ¶
View Source
const MaxNATSMsgSize = datasize.MB
MaxNATSMsgSize is the maximum size of message that NATS will accept.
Variables ¶
View Source
var Fs = afero.NewOsFs()
Fs abstracts away filesystem access for the config package. It should only be modified by tests.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Name string `toml:"name"` Mode string `toml:"mode"` NATSAddress string `toml:"nats_address"` NATSSubject []string `toml:"nats_subject"` NATSSubjectMonitor string `toml:"nats_subject_monitor"` NATSSubjectJunkyard string `toml:"nats_subject_junkyard"` InfluxDBAddress string `toml:"influxdb_address"` InfluxDBProtocol string `toml:"influxdb_protocol"` InfluxDBPort int `toml:"influxdb_port"` InfluxDBUser string `toml:"-"` InfluxDBPass string `toml:"-"` DBName string `toml:"influxdb_dbname"` BatchMaxCount int `toml:"batch_max_count"` BatchMaxSize datasize.ByteSize `toml:"batch_max_size"` BatchMaxAge Duration `toml:"batch_max_age"` Port int `toml:"port"` Workers int `toml:"workers"` WriteTimeout Duration `toml:"write_timeout"` WriterRetryBatches int `toml:"writer_retry_batches"` WriterRetryInterval Duration `toml:"writer_retry_interval"` WriterRetryTimeout Duration `toml:"writer_retry_timeout"` ReadBufferSize datasize.ByteSize `toml:"read_buffer_size"` NATSMaxPendingSize datasize.ByteSize `toml:"nats_max_pending_size"` Rule []Rule `toml:"rule"` MaxTimeDelta Duration `toml:"max_time_delta"` StatsInterval Duration `toml:"stats_interval"` ProbePort int `toml:"probe_port"` PprofPort int `toml:"pprof_port"` Debug bool `toml:"debug"` DownsamplePeriod Duration `toml:"downsample_period"` DownsampleSuffix string `toml:"downsample_suffix"` }
Config represents the configuration for a single influx-spout component.
func NewConfigFromFile ¶
NewConfigFromFile parses the specified configuration file and returns a Config.
type Duration ¶
Duration is used to support parsing of time durations directly into time.Duration instances. Use the embedded Duration field to access to the underlying time.Duration.
func NewDuration ¶
NewDuration returns a new config.Duration which wraps a time.Duration.
func (*Duration) UnmarshalText ¶
UnmarshalText implements the TextUnmarshaler interface.
Click to show internal directories.
Click to hide internal directories.