Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Shards []Shard `json:"shards"`
}
Config represents the data inside of the shard config file with multiple shard entries
func ParseConfigFile ¶
ParseConfigFile opens the shards file and parses the json information into the Config struct.
type Shard ¶
type Shard struct { Index int `json:"index"` Name string `json:"name"` Address string `json:"address"` }
Shard represents the config entry for a single shard
type Shards ¶
Shards represents the configuration of a server, but it also includes the amount of shards and the address listings.
func (*Shards) GetShardIndex ¶
GetShardIndex is the sharding function which desides in which the shard the key-value should go into
Click to show internal directories.
Click to hide internal directories.