Documentation ¶
Index ¶
- Constants
- Variables
- func AddTag(id int, tag string) error
- func CreateInstance(meta *InstanceMeta) error
- func DestroyInstance(id int) error
- func ExecCommand(id int, req *REDIS.Request) (*REDIS.Resp, error)
- func GenPassword() string
- func GenerateToken() string
- func GetAvailableInstanceID() int
- func GetInstanceAOFPath(id int) string
- func GetInstanceConfig(id int, timeout time.Duration) (*REDIS.Config, error)
- func GetInstanceConfigChanges(id int) ([]REDIS.ConfigPropDiff, error)
- func GetInstanceConfigFilePath(id int) string
- func GetInstanceConfigHash(id int) (string, error)
- func GetInstanceDataDirPath(id int) string
- func GetInstanceIDList() []int
- func GetInstanceIDListByState(state State) ([]int, error)
- func GetInstanceInfo(id int, timeout time.Duration, all bool) (*REDIS.Info, error)
- func GetInstanceLogDirPath(id int) string
- func GetInstanceLogFilePath(id int) string
- func GetInstanceMetaFilePath(id int) string
- func GetInstancePID(id int) int
- func GetInstancePIDFilePath(id int) string
- func GetInstancePort(id int) int
- func GetInstanceRDBPath(id int) string
- func GetInstanceStartDate(id int) int64
- func GetInstanceVersion(id int) version.Version
- func GetRedisVersion() (version.Version, error)
- func GetStatesFilePath() string
- func HasInstanceData(id int) bool
- func HasInstances() bool
- func HasSUAuth() bool
- func Init(conf string) []error
- func IsFailoverMethod(method FailoverMethod) bool
- func IsInstanceExist(id int) bool
- func IsMaster() bool
- func IsMinion() bool
- func IsOutdated(id int) bool
- func IsSentinel() bool
- func IsSentinelActive() bool
- func IsSentinelMonitors(id int) bool
- func IsSyncDaemonActive() bool
- func IsSyncDaemonInstalled() bool
- func IsValidTag(tag string) bool
- func KillInstance(id int) error
- func ParseIDDBPair(pair string) (int, int, error)
- func ParseTag(tag string) (string, string)
- func ReadInstanceConfig(id int) (*REDIS.Config, error)
- func RegenerateInstanceConfig(id int) error
- func ReloadConfig() []error
- func ReloadInstanceConfig(id int) []error
- func RemoveTag(id int, tag string) error
- func ReopenLog() error
- func SaveSUAuth(auth *SuperuserAuth, rewrite bool) error
- func SaveStates(file string) error
- func SentinelCheck(id int) (string, bool)
- func SentinelInfo(id int) (*SENTINEL.Info, error)
- func SentinelMasterIP(id int) (string, error)
- func SentinelMasterSwitch(id int) error
- func SentinelReset() error
- func SentinelStart() []error
- func SentinelStartMonitoring(id int) error
- func SentinelStop() error
- func SentinelStopMonitoring(id int) error
- func SetLogOutput(file, minLevel string, bufIO bool) error
- func Shutdown(code int)
- func StartInstance(id int, controlLoading bool) error
- func StopInstance(id int, force bool) error
- func UpdateInstance(newMeta *InstanceMeta) error
- func ValidateTemplates() []error
- type FailoverMethod
- type IDSInfo
- type InstanceAuth
- type InstanceConfigInfo
- type InstanceInfo
- type InstanceMeta
- type InstancePreferencies
- type MetaCache
- type MetaCacheItem
- type RedisVersionInfo
- type ReplicationType
- type State
- func (s State) IsAbandoned() bool
- func (s State) IsDead() bool
- func (s State) IsHang() bool
- func (s State) IsIdle() bool
- func (s State) IsLoading() bool
- func (s State) IsMasterDown() bool
- func (s State) IsMasterUp() bool
- func (s State) IsSaving() bool
- func (s State) IsStopped() bool
- func (s State) IsSyncing() bool
- func (s State) IsWorks() bool
- func (s State) NoReplica() bool
- func (s State) WithErrors() bool
- func (s State) WithReplica() bool
- type StateInfo
- type StatesInfo
- type Stats
- type StatsClients
- type StatsInstances
- type StatsKeys
- type StatsMemory
- type StatsOverall
- type Storage
- func (s Storage) Delete(key string)
- func (s Storage) Get(key string) string
- func (s Storage) GetB(key string) (bool, error)
- func (s Storage) GetF(key string) (float64, error)
- func (s Storage) GetI(key string) (int, error)
- func (s Storage) GetU(key string) (uint64, error)
- func (s Storage) Has(key string) bool
- func (s Storage) IsEmpty() bool
- func (s Storage) Set(key, value string)
- func (s Storage) SetB(key string, value bool)
- func (s Storage) SetF(key string, value float64)
- func (s Storage) SetI(key string, value int)
- func (s Storage) SetU(key string, value uint64)
- type SuperuserAuth
- type SystemStatus
- type TemplateSource
Constants ¶
const ( MIN_INSTANCES = 16 MAX_INSTANCES = 1024 MIN_PASS_LENGTH = 6 MAX_PASS_LENGTH = 64 MIN_DESC_LENGTH = 6 MAX_DESC_LENGTH = 64 MIN_PORT = 1025 MAX_PORT = 65535 MIN_PROCS = 10240 MIN_SOMAXCONN = 2047 MIN_STOP_DELAY = 1 // 1 Sec MAX_STOP_DELAY = 5 * 60 // 5 Min MIN_START_DELAY = 1 // 1 Sec MAX_START_DELAY = 5 * 60 // 5 Min MIN_THREADS = 1 MAX_THREADS = 32 MIN_CYCLE_TIME = 15 * 60 // 15 Min MAX_CYCLE_TIME = 24 * 60 * 60 // 1 Day MIN_CHANGES_NUM = 1 MAX_TAGS = 3 MIN_SYNC_WAIT = 60 // 1 Min MAX_SYNC_WAIT = 3 * 60 * 60 // 3 Hours MAX_FULL_START_DELAY = 30 * 60 // 30 Min MAX_SWITCH_WAIT = 15 * 60 // 15 Min TOKEN_LENGTH = 64 MIN_SENTINEL_VERSION = 5 MIN_NICE = -20 MAX_NICE = 19 MIN_IONICE_CLASS = 0 MAX_IONICE_CLASS = 3 MIN_IONICE_CLASSDATA = 0 MAX_IONICE_CLASSDATA = 7 )
Limits
const ( ROLE_MASTER = "master" ROLE_MINION = "minion" ROLE_SENTINEL = "sentinel" )
const ( SU_DATA_FILE = "su.dat" REDIS_VERSION_DATA_FILE = "redis.dat" STATES_DATA_FILE = "states.dat" IDS_DATA_FILE = "ids.dat" )
const ( MAIN_MAX_INSTANCES = "main:max-instances" MAIN_ALLOW_ID_REUSE = "main:allow-id-reuse" MAIN_DISABLE_CONFIGURATION_CHECK = "main:disable-configuration-check" MAIN_DISABLE_FILESYSTEM_CHECK = "main:disable-filesystem-check" MAIN_WARN_USED_MEMORY = "main:warn-used-memory" MAIN_DIR = "main:dir" MAIN_MIN_PASS_LENGTH = "main:min-pass-length" MAIN_STRICT_SECURE = "main:strict-secure" MAIN_HOSTNAME = "main:hostname" LOG_LEVEL = "log:level" REDIS_BINARY = "redis:binary" REDIS_USER = "redis:user" REDIS_START_PORT = "redis:start-port" REDIS_SAVE_ON_STOP = "redis:save-on-stop" REDIS_NICE = "redis:nice" REDIS_IONICE_CLASS = "redis:ionice-class" REDIS_IONICE_CLASSDATA = "redis:ionice-classdata" SENTINEL_BINARY = "sentinel:binary" SENTINEL_PORT = "sentinel:port" SENTINEL_QUORUM = "sentinel:quorum" SENTINEL_DOWN_AFTER = "sentinel:down-after-milliseconds" SENTINEL_PARALLEL_SYNCS = "sentinel:parallel-syncs" SENTINEL_FAILOVER_TIMEOUT = "sentinel:failover-timeout" TEMPLATES_REDIS = "templates:redis" TEMPLATES_SENTINEL = "templates:sentinel" PATH_META_DIR = "path:meta-dir" PATH_CONFIG_DIR = "path:config-dir" PATH_DATA_DIR = "path:data-dir" PATH_PID_DIR = "path:pid-dir" PATH_LOG_DIR = "path:log-dir" REPLICATION_ROLE = "replication:role" REPLICATION_MASTER_IP = "replication:master-ip" REPLICATION_MASTER_PORT = "replication:master-port" REPLICATION_AUTH_TOKEN = "replication:auth-token" REPLICATION_FAILOVER_METHOD = "replication:failover-method" REPLICATION_DEFAULT_ROLE = "replication:default-role" REPLICATION_CHECK_READONLY_MODE = "replication:check-readonly-mode" REPLICATION_ALLOW_REPLICAS = "replication:allow-replicas" REPLICATION_ALLOW_COMMANDS = "replication:allow-commands" REPLICATION_ALWAYS_PROPAGATE = "replication:always-propagate" REPLICATION_MAX_SYNC_WAIT = "replication:max-sync-wait" REPLICATION_INIT_SYNC_DELAY = "replication:init-sync-delay" DELAY_START = "delay:start" DELAY_STOP = "delay:stop" )
const ( REDIS_USER_ADMIN = "admin" REDIS_USER_SYNC = "sync" REDIS_USER_SERVICE = "service" REDIS_USER_SENTINEL = "sentinel" )
const (
BIN_RUNUSER = "/sbin/runuser"
)
const DEFAULT_FILE_PERMS = 0600
DEFAULT_FILE_PERMS is default permissions for files created by core
const META_VERSION = 1
META_VERSION is current meta version
const (
PID_SENTINEL = "sentinel.pid"
)
const VERSION = "A1"
VERSION is current core version
Variables ¶
var ( ErrUnprivileged = errors.New("RDS core requires root privileges") ErrSUAuthAlreadyExist = errors.New("Superuser credentials already generated") ErrSUAuthIsEmpty = errors.New("Superuser auth data can't be empty") ErrSUAuthNoData = errors.New("Superuser auth data doesn't exist") ErrCantDiffConfigs = errors.New("Instance should works for configs comparison") ErrEmptyIDDBPair = errors.New("ID/DB value is empty") ErrCantReadPID = errors.New("Can't read PID from PID file") ErrStateFileNotDefined = errors.New("You must define path to states file") ErrInstanceStillWorks = errors.New("Instance still works") ErrSentinelRoleSetNotAllowed = errors.New("This node must have master role for switching instance role") ErrSentinelWrongInstanceRole = errors.New("Instance must have a replica role") ErrIncompatibleFailover = errors.New("Action can't be done due to incompatibility with failover method defined in the configuration file") ErrSentinelWrongVersion = errors.New("Sentinel monitoring requires Redis 5 or greater") ErrSentinelCantStart = errors.New("Can't start Sentinel process") ErrSentinelCantStop = errors.New("Can't stop Sentinel process") ErrSentinelIsStopped = errors.New("Sentinel is stopped") ErrSentinelCantSetRole = errors.New("Can't set instance role - instance still have slave (replica) role") ErrMetaIsNil = errors.New("Meta struct is nil") ErrMetaNoID = errors.New("Meta must have valid ID") ErrMetaNoDesc = errors.New("Meta must have valid description") ErrMetaNoAuth = errors.New("Meta doesn't have auth info") ErrMetaNoPrefs = errors.New("Meta doesn't have instance preferencies") ErrMetaNoConfigInfo = errors.New("Meta doesn't have info about Redis configuration file") ErrMetaInvalidVersion = errors.New("Meta must have valid version") ErrInvalidRedisVersionCache = errors.New("Cache is invalid") ErrCantParseRedisVersion = errors.New("Can't parse version of redis-server") ErrCantReadRedisCreationDate = errors.New("Can't read creation date of redis-server file") ErrCantReadDaemonizeOption = errors.New("Can't read 'daemonize' option value from instance configuration file") ErrCantDaemonizeInstance = errors.New("Impossible to run instance - 'daemonize' property set to 'no' in configuration file") ErrUnknownReplicationType = errors.New("Unsupported replication type") ErrUnknownTemplateSource = errors.New("Unknown template source") )
var Config *knf.Config
Config is application config data
var User *system.User
User is current user info
Functions ¶
func CreateInstance ¶
func CreateInstance(meta *InstanceMeta) error
CreateInstance create instance by instance meta
func ExecCommand ¶
ExecCommand executes Redis command on given instance
func GenPassword ¶
func GenPassword() string
GenPassword generates secure password with random length (16-28)
func GenerateToken ¶
func GenerateToken() string
GenerateToken generates unique token for sync daemon
func GetAvailableInstanceID ¶
func GetAvailableInstanceID() int
GetAvailableInstanceID returns available instance ID
func GetInstanceAOFPath ¶
GetInstanceAOFPath returns path to the append only file
func GetInstanceConfig ¶
GetInstanceConfig read and parse instance in-memory config
func GetInstanceConfigChanges ¶
func GetInstanceConfigChanges(id int) ([]REDIS.ConfigPropDiff, error)
GetInstanceConfigChanges returns difference between file config and in-memory config
func GetInstanceConfigFilePath ¶
GetInstanceConfigFilePath returns path to config file for instance with given ID
func GetInstanceConfigHash ¶
GetInstanceConfigHash returns Redis config file SHA-256 hash
func GetInstanceDataDirPath ¶
GetInstanceDataDirPath returns path to data directory for instance with given ID
func GetInstanceIDList ¶
func GetInstanceIDList() []int
GetInstanceIDList returns sorted slice with all instance ID's
func GetInstanceIDListByState ¶
GetInstanceIDListByState returns sorted slice with instance ID's filtered by state
func GetInstanceInfo ¶
GetInstanceInfo returns info from instance
func GetInstanceLogDirPath ¶
GetInstanceLogDirPath returns path to logs directory for instance with given ID
func GetInstanceLogFilePath ¶
GetInstanceLogFilePath returns path to log file for instance with given ID
func GetInstanceMetaFilePath ¶
GetInstanceMetaFilePath returns path to meta file for instance with given ID
func GetInstancePIDFilePath ¶
GetInstancePIDFilePath returns path to PID file for instance with given ID
func GetInstancePort ¶
GetInstancePort returns port used by redis for given instance
func GetInstanceRDBPath ¶
GetInstanceRDBPath returns path to the instance dump file
func GetInstanceStartDate ¶
GetInstanceStartDate returns timestamp when instance was started
func GetInstanceVersion ¶
GetInstanceVersion return instance Redis version
func GetRedisVersion ¶
GetRedisVersion returns current installed Redis version
func GetStatesFilePath ¶
func GetStatesFilePath() string
GetStatesFilePath returns path to global states file
func HasInstanceData ¶
HasInstanceData returns true if instance data is present on FS
func HasInstances ¶
func HasInstances() bool
HasInstances returns true if that at least one instance exists
func IsFailoverMethod ¶
func IsFailoverMethod(method FailoverMethod) bool
IsFailoverMethod returns true if given failover method is used
func IsInstanceExist ¶
IsInstanceExist returns true if instance exists
func IsMaster ¶
func IsMaster() bool
IsMaster returns true if role of current RDS node has role "master"
func IsMinion ¶
func IsMinion() bool
IsMinion returns true if role of current RDS node has role "minion"
func IsSentinel ¶
func IsSentinel() bool
IsSentinel returns true if role of current RDS node has role "sentinel"
func IsSentinelActive ¶
func IsSentinelActive() bool
IsSentinelActive returns true if Sentinel is works
func IsSentinelMonitors ¶
IsSentinelMonitors returns true if Sentinel monitoring instance with given ID
func IsSyncDaemonActive ¶
func IsSyncDaemonActive() bool
IsSyncDaemonActive returns true if sync daemon is works
func IsSyncDaemonInstalled ¶
func IsSyncDaemonInstalled() bool
IsSyncDaemonInstalled returns true if sync daemon is installed
func ParseIDDBPair ¶
ParseIDDBPair parse ID/DB pair (id:db id/db)
func ReadInstanceConfig ¶
ReadInstanceConf read and parse redis config for given instance
func RegenerateInstanceConfig ¶
RegenerateInstanceConfig regenerate redis config file for given instance
func ReloadInstanceConfig ¶
ReloadInstanceConfig reload instance config
func ReopenLog ¶
func ReopenLog() error
ReopenLog reopen log (close+open) file for log rotation purposes
func SaveSUAuth ¶
func SaveSUAuth(auth *SuperuserAuth, rewrite bool) error
SaveSUAuth save superuser auth data
func SentinelCheck ¶
SentinelCheck returns message about checking Sentinel quorum status
func SentinelInfo ¶
SentinelInfo returns info from Sentinel about master, replicas and sentinels
func SentinelMasterIP ¶
SentinelMasterIP returns IP of master instance
func SentinelMasterSwitch ¶
SentinelMasterSwitch can be used if you want to set role of current local instance to master. This command temporary set slave priority to 1 and force failover.
func SentinelReset ¶
func SentinelReset() error
SentinelReset reset master state in Sentinel for all instances
func SentinelStartMonitoring ¶
SentinelStartMonitoring add instance to Sentinel monitoring
func SentinelStopMonitoring ¶
SentinelStopMonitoring remove instance from Sentinel monitoring
func SetLogOutput ¶
SetLogOutput setup log output
func StartInstance ¶
StartInstance starting instance If controlLoading set to true, instance marked as started only after starting, finishing loading and syncing with master
func UpdateInstance ¶
func UpdateInstance(newMeta *InstanceMeta) error
UpdateInstance update instance meta For security purposes only some part of fields from given meta is used for update
func ValidateTemplates ¶ added in v1.2.0
func ValidateTemplates() []error
ValidateTemplates validates templates for Redis and Sentinel
Types ¶
type FailoverMethod ¶
type FailoverMethod string
const ( FAILOVER_METHOD_STANDBY FailoverMethod = "standby" FAILOVER_METHOD_SENTINEL FailoverMethod = "sentinel" )
type InstanceAuth ¶
type InstanceAuth struct { User string `json:"user"` Pepper string `json:"pepper"` Hash string `json:"hash"` }
func NewInstanceAuth ¶
func NewInstanceAuth(password string) (*InstanceAuth, error)
NewAuthInfo generates new instance auth struct
type InstanceConfigInfo ¶
type InstanceInfo ¶
type InstanceInfo struct { Meta *InstanceMeta `json:"meta"` State State `json:"state"` }
type InstanceMeta ¶
type InstanceMeta struct { Tags []string `json:"tags,omitempty"` // List of tags Desc string `json:"desc"` // Description UUID string `json:"uuid"` // UUID Compatible string `json:"compatible,omitempty"` // Compatible redis version MetaVersion int `json:"meta_version"` // Meta information version ID int `json:"id"` // Instance ID Created int64 `json:"created"` // Date of creation (unix timestamp) Preferencies *InstancePreferencies `json:"preferencies"` // Config data Config *InstanceConfigInfo `json:"config"` // Config info (hash + creation date) Auth *InstanceAuth `json:"auth"` // Instance auth info Storage Storage `json:"storage,omitempty"` // Core version agnostic data storage }
func GetInstanceMeta ¶
func GetInstanceMeta(id int) (*InstanceMeta, error)
GetInstanceMeta returns meta info struct for given instance
func NewInstanceMeta ¶
func NewInstanceMeta(instancePassword, servicePassword string) (*InstanceMeta, error)
NewInstanceMeta generates meta struct for new instance
func (*InstanceMeta) Validate ¶
func (m *InstanceMeta) Validate() error
Validate validate meta struct
type InstancePreferencies ¶
type InstancePreferencies struct { AdminPassword string `json:"admin_password,omitempty"` // Admin user password SyncPassword string `json:"sync_password,omitempty"` // Sync user password ServicePassword string `json:"service_password,omitempty"` // Service user password SentinelPassword string `json:"sentinel_password"` // Sentinel user password ReplicationType ReplicationType `json:"replication_type"` // Replication type IsSaveDisabled bool `json:"is_save_disabled"` // Disabled saves flag }
type MetaCache ¶
type MetaCache struct {
// contains filtered or unexported fields
}
MetaCache is instance metadata cache
func NewMetaCache ¶
NewMetaCache creates new meta cache
func (*MetaCache) Get ¶
func (c *MetaCache) Get(key int) (*InstanceMeta, bool)
Get returns meta from cache if exist
func (*MetaCache) Set ¶
func (c *MetaCache) Set(key int, meta *InstanceMeta)
Set adds metadata to cache
type MetaCacheItem ¶
type MetaCacheItem struct {
// contains filtered or unexported fields
}
MetaCacheItem contains instance metadata and date of creation
type RedisVersionInfo ¶
type ReplicationType ¶
type ReplicationType string
const ( REPL_TYPE_REPLICA ReplicationType = "replica" REPL_TYPE_STANDBY ReplicationType = "standby" )
func (ReplicationType) IsReplica ¶
func (t ReplicationType) IsReplica() bool
IsReplica returns true if replication type is replica
func (ReplicationType) IsStandby ¶
func (t ReplicationType) IsStandby() bool
IsStandby returns true if replication type is standby
type State ¶
type State uint16
const ( INSTANCE_STATE_UNKNOWN State = 0 INSTANCE_STATE_STOPPED State = 1 << iota INSTANCE_STATE_WORKS INSTANCE_STATE_DEAD INSTANCE_STATE_IDLE // Extended INSTANCE_STATE_SYNCING // Extended INSTANCE_STATE_LOADING // Extended INSTANCE_STATE_SAVING // Extended INSTANCE_STATE_HANG // Extended INSTANCE_STATE_ABANDONED // Extended INSTANCE_STATE_MASTER_UP // Extended INSTANCE_STATE_MASTER_DOWN // Extended INSTANCE_STATE_NO_REPLICA // Extended INSTANCE_STATE_WITH_REPLICA // Extended INSTANCE_STATE_WITH_ERRORS // Extended )
func GetInstanceState ¶
GetInstanceState returns state of instance
func (State) IsAbandoned ¶ added in v1.3.0
IsAbandoned returns true if instance abandoned (no traffic for long time)
func (State) IsMasterDown ¶ added in v1.3.0
IsMasterDown returns true if instance master is down
func (State) IsMasterUp ¶ added in v1.3.0
IsMasterUp returns true if instance master is up
func (State) WithErrors ¶ added in v1.3.0
func (State) WithReplica ¶ added in v1.3.0
type StatesInfo ¶
func ReadStates ¶
func ReadStates(file string) (*StatesInfo, error)
ReadStates read states info from file
type Stats ¶
type Stats struct { Instances *StatsInstances `json:"instances"` Clients *StatsClients `json:"clients"` Memory *StatsMemory `json:"memory"` Overall *StatsOverall `json:"overall"` Keys *StatsKeys `json:"keys"` }
type StatsClients ¶
type StatsInstances ¶
type StatsInstances struct { Total uint64 `json:"total_instances"` // Total number of instances Active uint64 `json:"active_instances"` // Working instances Dead uint64 `json:"dead_instances"` // Dead instances BgSave uint64 `json:"bgsave_instances"` // Instances which save data in the background Syncing uint64 `json:"syncing_instances"` // Instances which currently sync data with master or replica AOFRewrite uint64 `json:"aof_rewrite_instances"` // Instances which currently rewrite aof data SaveFailed uint64 `json:"save_failed_instances"` // Instances with failed save ActiveMaster uint64 `json:"active_master_instances"` // Instances with active sync as a master ActiveReplica uint64 `json:"active_replica_instances"` // Instances with active sync as a replica Outdated uint64 `json:"outdated_instances"` // Outdated instances (newer version is installed but not used) }
type StatsMemory ¶
type StatsMemory struct { SystemMemory uint64 `json:"system_memory"` SystemSwap uint64 `json:"system_swap"` UsedMemory uint64 `json:"used_memory"` UsedMemoryRSS uint64 `json:"used_memory_rss"` UsedMemoryLua uint64 `json:"used_memory_lua"` UsedSwap uint64 `json:"used_swap"` IsSwapEnabled bool `json:"is_swap_enabled"` }
type StatsOverall ¶
type StatsOverall struct { TotalConnectionsReceived uint64 `json:"total_connections_received"` TotalCommandsProcessed uint64 `json:"total_commands_processed"` InstantaneousOpsPerSec uint64 `json:"instantaneous_ops_per_sec"` InstantaneousInputKbps uint64 `json:"instantaneous_input_kbps"` InstantaneousOutputKbps uint64 `json:"instantaneous_output_kbps"` RejectedConnections uint64 `json:"rejected_connections"` ExpiredKeys uint64 `json:"expired_keys"` EvictedKeys uint64 `json:"evicted_keys"` KeyspaceHits uint64 `json:"keyspace_hits"` KeyspaceMisses uint64 `json:"keyspace_misses"` PubsubChannels uint64 `json:"pubsub_channels"` PubsubPatterns uint64 `json:"pubsub_patterns"` }
type Storage ¶
Storage is version agnostic KV data storage
type SuperuserAuth ¶
func NewSUAuth ¶
func NewSUAuth() (string, *SuperuserAuth, error)
NewSUAuth generates new superuser auth data
type SystemStatus ¶
type SystemStatus struct { HasProblems bool HasTHPIssues bool HasKernelIssues bool HasLimitsIssues bool HasFSIssues bool }
func GetSystemConfigurationStatus ¶
func GetSystemConfigurationStatus(force bool) (SystemStatus, error)
GetSystemConfigurationStatus returns system configuration status
type TemplateSource ¶ added in v1.2.0
type TemplateSource string
const ( TEMPLATE_SOURCE_REDIS TemplateSource = "redis.conf" TEMPLATE_SOURCE_SENTINEL TemplateSource = "sentinel.conf" )