Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AresServerConfig ¶
type AresServerConfig struct {
// HTTP port for serving.
Port int `yaml:"port"`
// HTTP port for debugging.
DebugPort int `yaml:"debug_port"`
// Directory path that stores the data and schema on local disk.
RootPath string `yaml:"root_path"`
// Total memory size ares can use.
TotalMemorySize int64 `yaml:"total_memory_size"`
// Whether to turn off scheduler.
SchedulerOff bool `yaml:"scheduler_off"`
// Build version of the server currently running
Version string `yaml:"version"`
Query QueryConfig `yaml:"query"`
DiskStore DiskStoreConfig `yaml:"disk_store"`
HTTP HTTPConfig `yaml:"http"`
Cluster ClusterConfig `yaml:"cluster"`
Clients ClientsConfig `yaml:"clients"`
}
AresServerConfig is config specific for ares server.
type ClientsConfig ¶
type ClientsConfig struct {
Controller *ControllerConfig `yaml:"controller,omitempty"`
}
ClientsConfig is the config for all clients
type ClusterConfig ¶
type ControllerConfig ¶
type ControllerConfig struct {
Host string `yaml:"host"`
Port int `yaml:"port"`
Headers http.Header `yaml:"headers"`
}
ControllerConfig is the config for ares-controller client
type DiskStoreConfig ¶
type DiskStoreConfig struct {
WriteSync bool `yaml:"write_sync"`
}
DiskStoreConfig is the static configuration for disk store.
type HTTPConfig ¶
type HTTPConfig struct {
MaxConnections int `yaml:"max_connections"`
ReadTimeOutInSeconds int `yaml:"read_time_out_in_seconds"`
WriteTimeOutInSeconds int `yaml:"write_time_out_in_seconds"`
}
HTTPConfig is the static configuration for main http server (query and schema).
type LoggerFactory ¶
type LoggerFactory interface {
// GetDefaultLogger returns the default logger.
GetDefaultLogger() bark.Logger
// GetLogger returns logger given the logger name.
GetLogger(name string) bark.Logger
}
LoggerFactory defines the log factory ares needs.
func NewLoggerFactory ¶
func NewLoggerFactory() LoggerFactory
NewLoggerFactory creates a default logrus LoggerFactory implementation.
type LogrusLoggerFactory ¶
type LogrusLoggerFactory struct {
// contains filtered or unexported fields
}
LogrusLoggerFactory is the standard logrus implementation of LoggerFactory
func (*LogrusLoggerFactory) GetDefaultLogger ¶
func (r *LogrusLoggerFactory) GetDefaultLogger() bark.Logger
GetDefaultLogger returns the default logrus logger.
type Metrics ¶
Metrics is the interface for stats reporting based on tally. The application call NewRootScope() at start up time to get the root scope and calls closer.Close() before shutdown.
func NewNoopMetrics ¶
func NewNoopMetrics() Metrics
NewNoopMetrics returns a Metrics that will do nothing for reporting.
type QueryConfig ¶
type QueryConfig struct {
// how much portion of the device memory we are allowed use
DeviceMemoryUtilization float32 `yaml:"device_memory_utilization"`
// timeout in seconds for choosing device
DeviceChoosingTimeout int `yaml:"device_choosing_timeout"`
TimezoneTable TimezoneConfig `yaml:"timezone_table"`
}
QueryConfig is the static configuration for query.
type TimezoneConfig ¶
type TimezoneConfig struct {
// table to lookup timezone columns
TableName string `yaml:"table_name"`
}
TimezoneConfig is the static config for timezone column support