Documentation
¶
Index ¶
Constants ¶
View Source
const ( ClusterNone = "" ClusterStatic = "static" ClusterGossip = "gossip" )
Cluster types.
View Source
const DefaultDiagnosticsInterval = time.Duration(0)
DefaultDiagnosticsInterval is the default sync frequency diagnostic metrics. A value of 0 disables diagnostics.
Variables ¶
This section is empty.
Functions ¶
func NewStatsClient ¶ added in v0.4.0
func NewStatsClient(name string, host string) (pilosa.StatsClient, error)
NewStatsClient creates a stats client from the config
Types ¶
type Command ¶
type Command struct {
Server *pilosa.Server
// Configuration.
Config *Config
// Gossip transport
GossipTransport *gossip.Transport
// Standard input/output
*pilosa.CmdIO
// Started will be closed once Command.Run is finished.
Started chan struct{}
// Done will be closed when Command.Close() is called
Done chan struct{}
// contains filtered or unexported fields
}
Command represents the state of the pilosa server command.
func NewCommand ¶
NewCommand returns a new instance of Main.
func (*Command) SetupNetworking ¶ added in v0.9.0
SetupNetworking sets up internode communication based on the configuration.
func (*Command) SetupServer ¶
SetupServer uses the cluster configuration to set up this server.
type Config ¶ added in v0.9.0
type Config struct {
// DataDir is the directory where Pilosa stores both indexed data and
// running state such as cluster topology information.
DataDir string `toml:"data-dir"`
// Bind is the host:port on which Pilosa will listen.
Bind string `toml:"bind"`
// MaxWritesPerRequest limits the number of mutating commands that can be in
// a single request to the server. This includes SetBit, ClearBit,
// SetRowAttrs & SetColumnAttrs.
MaxWritesPerRequest int `toml:"max-writes-per-request"`
// LogPath configures where Pilosa will write logs.
LogPath string `toml:"log-path"`
// Verbose toggles verbose logging which can be useful for debugging.
Verbose bool `toml:"verbose"`
// TLS
TLS TLSConfig
Cluster struct {
// Disabled controls whether clustering functionality is enabled.
Disabled bool `toml:"disabled"`
Coordinator bool `toml:"coordinator"`
ReplicaN int `toml:"replicas"`
Hosts []string `toml:"hosts"`
LongQueryTime toml.Duration `toml:"long-query-time"`
} `toml:"cluster"`
// Gossip config is based around memberlist.Config.
Gossip gossip.Config `toml:"gossip"`
AntiEntropy struct {
Interval toml.Duration `toml:"interval"`
} `toml:"anti-entropy"`
Metric struct {
// Service can be statsd, expvar, or none.
Service string `toml:"service"`
// Host tells the statsd client where to write.
Host string `toml:"host"`
PollInterval toml.Duration `toml:"poll-interval"`
// Diagnostics toggles sending some limited diagnostic information to
// Pilosa's developers.
Diagnostics bool `toml:"diagnostics"`
} `toml:"metric"`
}
Config represents the configuration for the command.
type TLSConfig ¶ added in v0.9.0
type TLSConfig struct {
// CertificatePath contains the path to the certificate (.crt or .pem file)
CertificatePath string `toml:"certificate-path"`
// CertificateKeyPath contains the path to the certificate key (.key file)
CertificateKeyPath string `toml:"certificate-key-path"`
// SkipVerify disables verification for self-signed certificates
SkipVerify bool `toml:"skip-verify"`
}
TLSConfig contains TLS configuration
Click to show internal directories.
Click to hide internal directories.