kmdb

package module
v0.0.0-...-6294f52 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2014 License: Apache-2.0 Imports: 10 Imported by: 0

README

kmdb

KongMing database for simple graph

Documentation

Index

Constants

View Source
const (
	ASTERISK_BYTE byte = '*'
	DOLLAR_BYTE   byte = '$'
	PLUS_BYTE     byte = '+'
	MINUS_BYTE    byte = '-'
	COLON_BYTE    byte = ':'
	CR_BYTE       byte = '\r'
	LF_BYTE       byte = '\n'
)
View Source
const KMDB_VERSION = "1.0.0"

Variables

This section is empty.

Functions

func DecodeCommand

func DecodeCommand(buf []byte, comm *Command) error

func ProtobufDecode

func ProtobufDecode(buf []byte, msg proto.Message) error

func ProtobufEncode

func ProtobufEncode(msg proto.Message) ([]byte, error)

Types

type BulkReply

type BulkReply []byte

type Command

type Command struct {
	// contains filtered or unexported fields
}

type CommandBatch

type CommandBatch struct {
	// contains filtered or unexported fields
}

type Config

type Config struct {
	Listen struct {
		Ip   string
		Port int
	}

	Store struct {
		Dir     string
		PidFile string
	}

	Type struct {
		Primary bool
		SlaveOf string
	}
}

func LoadConfig

func LoadConfig(file string) *Config

type Error

type Error string

func (Error) Error

func (e Error) Error() string

type ErrorReply

type ErrorReply string

type IntegerReply

type IntegerReply int

type KMDB

type KMDB struct {
	Db           *gorocksdb.DB
	Options      *gorocksdb.Options
	ReadOptions  *gorocksdb.ReadOptions
	WriteOptions *gorocksdb.WriteOptions
	Primary      bool
}

func Open

func Open(config *Config) *KMDB

func (*KMDB) Close

func (self *KMDB) Close()

func (*KMDB) Del

func (self *KMDB) Del(key []byte) error

func (*KMDB) Get

func (self *KMDB) Get(key []byte) ([]byte, error)

func (*KMDB) Put

func (self *KMDB) Put(key, value []byte) error

type MultiBulkReply

type MultiBulkReply struct {
	// contains filtered or unexported fields
}

type Operation

type Operation int
const (
	PING Operation = iota
	GET
	PUT
	DEL
)

type Sencondary

type Sencondary struct {
	Db      gorocksdb.DB
	SlaveOf string
}

type StatusReply

type StatusReply string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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