config

package
v0.0.0-...-fbbe109 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2016 License: MIT Imports: 14 Imported by: 1

Documentation

Index

Constants

View Source
const RotateSizeCoef = 3 //TODO make configurable

Variables

This section is empty.

Functions

func Marshal

func Marshal(conf *Config) []byte

func Merge

func Merge(def, override *Config)

func Parse

func Parse(conf Config) (mconf memcached.Config, err error)

Types

type AOFConfig

type AOFConfig struct {
	Name         string        `json:"name,omitempty"`
	Sync         time.Duration `json:"sync,omitempty"`
	BufSize      string        `json:"buf-size,omitempty"`
	FixCorrupted bool          `json:"fix-corrupted,omitempty"`
}

type Config

type Config struct {
	Port           int    `json:"port,omitempty"`
	Host           string `json:"host,omitempty"`
	LogDestination string `json:"log-destination,omitempty"` // Stdout, stderr, or filepath.
	LogLevel       string `json:"log-level,omitempty"`
	// Size values 10g, 128m, 1024k, 1000000b
	CacheSize   string    `json:"cache-size,omitempty"`
	MaxItemSize string    `json:"max-item-size,omitempty"`
	AOF         AOFConfig `json:"aof,omitempty"`
}

func Default

func Default() *Config

Jump to

Keyboard shortcuts

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