configuration

package
v0.5.0-rc.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2014 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminConfig added in v0.4.0

type AdminConfig struct {
	Port   int
	Assets string
}

type ApiConfig added in v0.4.0

type ApiConfig struct {
	SslPort     int    `toml:"ssl-port"`
	SslCertPath string `toml:"ssl-cert"`
	Port        int
}

type ClusterConfig added in v0.4.0

type ClusterConfig struct {
	SeedServers               []string `toml:"seed-servers"`
	ProtobufPort              int      `toml:"protobuf_port"`
	ProtobufTimeout           duration `toml:"protobuf_timeout"`
	ProtobufHeartbeatInterval duration `toml:"protobuf_heartbeat"`
	WriteBufferSize           int      `toml"write-buffer-size"`
	QueryShardBufferSize      int      `toml:"query-shard-buffer-size"`
}

type Configuration

type Configuration struct {
	AdminHttpPort             int
	AdminAssetsDir            string
	ApiHttpSslPort            int
	ApiHttpCertPath           string
	ApiHttpPort               int
	RaftServerPort            int
	SeedServers               []string
	DataDir                   string
	RaftDir                   string
	ProtobufPort              int
	ProtobufTimeout           duration
	ProtobufHeartbeatInterval duration
	Hostname                  string
	LogFile                   string
	LogLevel                  string
	BindAddress               string
	LevelDbMaxOpenFiles       int
	ShortTermShard            *ShardConfiguration
	LongTermShard             *ShardConfiguration
	ReplicationFactor         int
	WalDir                    string
	WalFlushAfterRequests     int
	WalBookmarkAfterRequests  int
	WalIndexAfterRequests     int
	WalRequestsPerLogFile     int
	LocalStoreWriteBufferSize int
	PerServerWriteBufferSize  int
	QueryShardBufferSize      int
}

func LoadConfiguration

func LoadConfiguration(fileName string) *Configuration

func (*Configuration) AdminHttpPortString

func (self *Configuration) AdminHttpPortString() string

func (*Configuration) ApiHttpPortString

func (self *Configuration) ApiHttpPortString() string

func (*Configuration) ApiHttpSslPortString added in v0.4.1

func (self *Configuration) ApiHttpSslPortString() string

func (*Configuration) HostnameOrDetect added in v0.4.0

func (self *Configuration) HostnameOrDetect() string

func (*Configuration) ProtobufConnectionString added in v0.4.0

func (self *Configuration) ProtobufConnectionString() string

func (*Configuration) ProtobufPortString added in v0.4.0

func (self *Configuration) ProtobufPortString() string

type LevelDbConfiguration added in v0.4.4

type LevelDbConfiguration struct {
	MaxOpenFiles int `toml:"max-open-files"`
}

type LoggingConfig added in v0.4.0

type LoggingConfig struct {
	File  string
	Level string
}

type RaftConfig added in v0.4.0

type RaftConfig struct {
	Port int
	Dir  string
}

type ShardConfiguration added in v0.5.0

type ShardConfiguration struct {
	Duration string

	Split       int
	SplitRandom string `toml:"split-random"`
	// contains filtered or unexported fields
}

func (*ShardConfiguration) HasRandomSplit added in v0.5.0

func (self *ShardConfiguration) HasRandomSplit() bool

func (*ShardConfiguration) ParseAndValidate added in v0.5.0

func (self *ShardConfiguration) ParseAndValidate(defaultShardDuration time.Duration) error

func (*ShardConfiguration) ParsedDuration added in v0.5.0

func (self *ShardConfiguration) ParsedDuration() *time.Duration

func (*ShardConfiguration) SplitRegex added in v0.5.0

func (self *ShardConfiguration) SplitRegex() *regexp.Regexp

type ShardingDefinition added in v0.5.0

type ShardingDefinition struct {
	ReplicationFactor int                `toml:"replication-factor"`
	ShortTerm         ShardConfiguration `toml:"short-term"`
	LongTerm          ShardConfiguration `toml:"long-term"`
}

type StorageConfig added in v0.4.0

type StorageConfig struct {
	Dir             string
	WriteBufferSize int `toml:"write-buffer-size"`
}

type TomlConfiguration added in v0.4.0

type TomlConfiguration struct {
	Admin       AdminConfig
	Api         ApiConfig
	Raft        RaftConfig
	Storage     StorageConfig
	Cluster     ClusterConfig
	Logging     LoggingConfig
	LevelDb     LevelDbConfiguration
	Hostname    string
	BindAddress string             `toml:"bind-address"`
	Sharding    ShardingDefinition `toml:"sharding"`
	WalConfig   WalConfig          `toml:"wal"`
}

type WalConfig added in v0.5.0

type WalConfig struct {
	Dir                   string `toml:"dir"`
	FlushAfterRequests    int    `toml:"flush-after"`
	BookmarkAfterRequests int    `toml:"bookmark-after"`
	IndexAfterRequests    int    `toml:"index-after"`
	RequestsPerLogFile    int    `toml:"requests-per-log-file"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL