Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Instances instanceMap
Instances is a map of instance IDs to InstanceConfig
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct {
// Enabled cluster mode (Cluster mode does not work yet)
Enabled bool `yaml:"enabled" json:"enabled"`
// Path to store the nodes cluster ID
IDPath string `yaml:"id_path" json:"id_path"`
// Cluster management configuration
ClusterManagement ClusterManagement `yaml:"management" json:"management"`
}
Cluster struct for the application
type ClusterManagement ¶
type ClusterManagement struct {
// The management database
DB int `yaml:"db" json:"db"`
}
ClusterManagement struct for the application
type Configuration ¶
type Configuration struct {
Server Server `yaml:"server" json:"server"`
// Cluster configuration
Cluster Cluster `yaml:"cluster" json:"cluster"`
// Redis configuration
Redis Redis `yaml:"redis" json:"redis"`
// Instance configurations
Instances []InstanceConfig `yaml:"instances" json:"instances"`
}
Configuration struct for the application
var (
Context *Configuration // The configuration context
)
type InstanceConfig ¶
type InstanceConfig struct {
// The ID of the instance
ID int `yaml:"id" json:"id"`
// Namespaces for the application
Namespaces []NamespaceConfig `yaml:"namespaces" json:"namespaces"`
}
InstanceConfig struct for the application
type InstanceMapConfig ¶
type InstanceMapConfig struct {
Config InstanceConfig
Namespaces namespaceMap
}
type NamespaceConfig ¶
type NamespaceConfig struct {
// The name of the namespace
Name string `yaml:"name" json:"name"`
// Options for this namespace
NamespaceOptions `yaml:"options" json:"options"`
}
NamespaceConfig struct for the application
type NamespaceOptions ¶
type NamespaceOptions struct {
// Timeout for the next client to accept the lock after it has been unlocked
NextInQueueTimeout string `yaml:"next_in_queue_timeout" json:"next_in_queue_timeout"`
}
NamespaceOptions struct for the application
type Redis ¶
type Redis struct {
// The port on which the Redis server is listening
Port int `yaml:"port" json:"port"`
// The host of the Redis server
Host string `yaml:"host" json:"host"`
// The password for the Redis server (If applicable)
Password string `yaml:"password" json:"password"`
// The maximum number of database instances
MaxDBInstances int `yaml:"max_db_instances" json:"max_db_instances"`
}
Redis struct for the Badger database configuration
type Server ¶
type Server struct {
// The port on which the server will listen
Port int `yaml:"port" json:"port"`
// The host on which the server will listen
Host string `yaml:"host" json:"host"`
// The log format (json or text)
LogFormat string `yaml:"log_format" json:"log_format"`
// Timezone the server
Timezone string `yaml:"timezone" json:"timezone"`
}
Server struct for the application
Click to show internal directories.
Click to hide internal directories.