Documentation
¶
Index ¶
- Variables
- func FileIsNotExist(path string) bool
- func GetPid(file string) (string, error)
- func HashCode(in string) int32
- func HashPath(path string) string
- func HashString(in string) string
- func InitLog(logConfig, logFile string)
- func PrintErr()
- func SavePid(file string) error
- type Config
- type GetProcessor
- type NetLayout
- type Processor
Constants ¶
This section is empty.
Variables ¶
View Source
var ( WriteBuffer = 64 BlockBuffer = 64 Expired float64 = 24 )
Functions ¶
func FileIsNotExist ¶
Types ¶
type Config ¶
type Config struct { //ip Host string Port int //data path VarPath string //log path LogPath string //is master db IsMaster bool //connect timeout,0 is none Timeout int //The num of expiration time ExpiredNum int // The expiration type //0 none 1 hour 2 day ExpiredType int //Write buffer in Mbs,default is 64mb WriteBuffer int //Block buffer in Mbs,default is 64mb BlockBuffer int AllowManager bool HttpHost string HttpPort int }
config
type GetProcessor ¶
type Processor ¶
type Processor interface { // Parameters: // - Key Get(key []byte) (r []byte, err error) // Parameters: // - Key // - Value Set(key []byte, value []byte) (err error) // Parameters: // - Key Exists(key []byte) (r bool, err error) // Parameters: // - Key Delete(key []byte) (err error) // Parameters: // - Keys // - Values BatchSet(keys [][]byte, values [][]byte) (err error) QGet() (r []byte, err error) // Parameters: // - Value QSet(value []byte) (err error) // Parameters: // - Value BatchQSet(value [][]byte) (err error) // Parameters: // - Size BatchQGet(size int) (r [][]byte, err error) // Parameters: // - KeyStart // - KeyEnd // - Limit Scan(key_start []byte, key_end []byte, limit int) (ks [][]byte, vs [][]byte, err error) }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.