Documentation ¶
Index ¶
- Constants
- Variables
- func BootServer(version string, readyChannel chan *BucketsDb)
- func CheckPortAvail(port string) bool
- func EnvInit()
- func ProcessUnixCommands()
- func SendError(writer http.ResponseWriter, message string, status int)
- type AuthSecret
- type BackupData
- type BadgerLogger
- type BucketStats
- type BucketsDb
- type Environment
- func (e *Environment) GetBackupGoRoutineNumber() int
- func (e *Environment) GetBackupGraceHours() int
- func (e *Environment) GetBloomFalsePercentage() float64
- func (e *Environment) GetBoolEnv(key string) bool
- func (e *Environment) GetBucketArray(key string) []BucketName
- func (e *Environment) GetEnv(key string, fallback string) string
- func (e *Environment) GetFloat(key string, dflt float64) float64
- func (e *Environment) GetInt(key string, dflt int) int
- func (e *Environment) GetIntArray(key string) []int
- func (e *Environment) LookupEnv(key string) (string, bool)
- type ServerState
- type Stats
Constants ¶
View Source
const ( DEBUG loggingLevel = iota INFO WARNING ERROR )
Variables ¶
View Source
var StatsInstance = &Stats{}
Functions ¶
func BootServer ¶
func ProcessUnixCommands ¶
func ProcessUnixCommands()
Types ¶
type AuthSecret ¶
type AuthSecret struct {
// contains filtered or unexported fields
}
func NewAuthSecret ¶
func NewAuthSecret(secret string) *AuthSecret
func (*AuthSecret) Middleware ¶
func (mw *AuthSecret) Middleware(next http.Handler) http.Handler
type BackupData ¶
type BadgerLogger ¶
type BadgerLogger struct {
// contains filtered or unexported fields
}
func DefaultLogger ¶
func DefaultLogger(level loggingLevel) *BadgerLogger
func (*BadgerLogger) Debugf ¶
func (l *BadgerLogger) Debugf(f string, v ...interface{})
func (*BadgerLogger) Errorf ¶
func (l *BadgerLogger) Errorf(f string, v ...interface{})
func (*BadgerLogger) Infof ¶
func (l *BadgerLogger) Infof(f string, v ...interface{})
func (*BadgerLogger) Warningf ¶
func (l *BadgerLogger) Warningf(f string, v ...interface{})
type BucketStats ¶
type BucketStats struct {
// contains filtered or unexported fields
}
type BucketsDb ¶
type BucketsDb struct { DbBucket map[common.BucketName]*badger.DB ServerState ServerState Jobs []*common.ScpJob // contains filtered or unexported fields }
var BucketsInstance *BucketsDb
func (*BucketsDb) WaitTillStarted ¶
func (b *BucketsDb) WaitTillStarted()
func (*BucketsDb) WaitTillStopped ¶
func (b *BucketsDb) WaitTillStopped()
type Environment ¶
type Environment struct {
// contains filtered or unexported fields
}
var EnvironmentInstance Environment = Environment{ // contains filtered or unexported fields }
func (*Environment) GetBackupGoRoutineNumber ¶
func (e *Environment) GetBackupGoRoutineNumber() int
func (*Environment) GetBackupGraceHours ¶
func (e *Environment) GetBackupGraceHours() int
func (*Environment) GetBloomFalsePercentage ¶
func (e *Environment) GetBloomFalsePercentage() float64
func (*Environment) GetBoolEnv ¶
func (e *Environment) GetBoolEnv(key string) bool
GetBoolEnv - reads an Environment variable and converts to a boolean.
true values are: "1", "t", "T", "true", "TRUE", "True" false values are: "0", "f", "F", "false", "FALSE", "False" any other value will panic with an appropriate message
func (*Environment) GetBucketArray ¶
func (e *Environment) GetBucketArray(key string) []BucketName
func (*Environment) GetEnv ¶
func (e *Environment) GetEnv(key string, fallback string) string
GetEnv -- Gets the value of the Environment. If not specified and no default in the .env file it will return fallback
func (*Environment) GetIntArray ¶
func (e *Environment) GetIntArray(key string) []int
type ServerState ¶
type ServerState int
const Running ServerState = 1
const Starting ServerState = 0
const Stopped ServerState = 2
type Stats ¶
type Stats struct { Backups map[common.BucketName]*BackupData LastBKRunLoop time.Time LastBKStart time.Time // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.