Documentation ¶
Index ¶
Constants ¶
const ( // DefaultBindAddress is the default address for raft, cluster, snapshot, etc.. DefaultBindAddress = ":8088" // DefaultHostname is the default hostname used if we are unable to determine // the hostname from the system DefaultHostname = "localhost" )
Variables ¶
This section is empty.
Functions ¶
func DefaultHost ¶
Types ¶
type Command ¶
type Command struct { Version string Branch string Commit string BuildTime string Closed chan struct{} Stdin io.Reader Stdout io.Writer Stderr io.Writer Server *Server // contains filtered or unexported fields }
Command represents the command executed by "influxd run".
func (*Command) ParseConfig ¶
ParseConfig parses the config at path. Returns a demo configuration if path is blank.
func (*Command) ParseFlags ¶
ParseFlags parses the command line flags from args and returns an options set.
type Config ¶
type Config struct { Meta *meta.Config `toml:"meta"` Data tsdb.Config `toml:"data"` Cluster cluster.Config `toml:"cluster"` Retention retention.Config `toml:"retention"` Precreator precreator.Config `toml:"shard-precreation"` Admin admin.Config `toml:"admin"` Monitor monitor.Config `toml:"monitor"` Subscriber subscriber.Config `toml:"subscriber"` HTTPD httpd.Config `toml:"http"` GraphiteInputs []graphite.Config `toml:"graphite"` CollectdInputs []collectd.Config `toml:"collectd"` OpenTSDBInputs []opentsdb.Config `toml:"opentsdb"` UDPInputs []udp.Config `toml:"udp"` ContinuousQuery continuous_querier.Config `toml:"continuous_queries"` // Server reporting ReportingDisabled bool `toml:"reporting-disabled"` // BindAddress is the address that all TCP services use (Raft, Snapshot, Cluster, etc.) BindAddress string `toml:"bind-address"` // Hostname is the hostname portion to use when registering local // addresses. This hostname must be resolvable from other nodes. Hostname string `toml:"hostname"` Join string `toml:"join"` }
Config represents the configuration format for the influxd binary.
func NewConfig ¶
func NewConfig() *Config
NewConfig returns an instance of Config with reasonable defaults.
func NewDemoConfig ¶
NewDemoConfig returns the config that runs when no config is specified.
func (*Config) ApplyEnvOverrides ¶
ApplyEnvOverrides apply the environment configuration on top of the config.
type Options ¶
type Options struct { ConfigPath string PIDFile string Hostname string CPUProfile string MemProfile string }
Options represents the command line options that can be parsed.
func (*Options) GetConfigPath ¶
GetConfigPath returns the config path from the options. It will return a path by searching in this order:
- The CLI option in ConfigPath
- The environment variable INFLUXDB_CONFIG_PATH
- The first influxdb.conf file on the path: - ~/.influxdb - /etc/influxdb
type PrintConfigCommand ¶
PrintConfigCommand represents the command executed by "influxd config".
func NewPrintConfigCommand ¶
func NewPrintConfigCommand() *PrintConfigCommand
NewPrintConfigCommand return a new instance of PrintConfigCommand.
func (*PrintConfigCommand) Run ¶
func (cmd *PrintConfigCommand) Run(args ...string) error
Run parses and prints the current config loaded.
type Server ¶
type Server struct { BindAddress string Listener net.Listener Logger *log.Logger MetaClient *meta.Client TSDBStore *tsdb.Store QueryExecutor *influxql.QueryExecutor PointsWriter *cluster.PointsWriter Subscriber *subscriber.Service Services []Service // These references are required for the tcp muxer. ClusterService *cluster.Service SnapshotterService *snapshotter.Service CopierService *copier.Service Monitor *monitor.Monitor // Profiling CPUProfile string MemProfile string // contains filtered or unexported fields }
Server represents a container for the metadata and storage data and services. It is built using a Config and it manages the startup and shutdown of all services in the proper order.
func (*Server) Err ¶
Err returns an error channel that multiplexes all out of band errors received from all services.
func (*Server) HTTPAddr ¶
HTTPAddr returns the HTTP address used by other nodes for HTTP queries and writes.
func (*Server) MetaServers ¶
MetaServers returns the meta node HTTP addresses used by this server.
func (*Server) SetLogOutput ¶
SetLogOutput sets the logger used for all messages. It must not be called after the Open method has been called.