Documentation
¶
Index ¶
Constants ¶
const ServiceTypePriorityQueue = "pqueue"
ServiceTypePriorityQueue defines a priority queue service type identifier.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinaryMarshaller ¶
BinaryMarshaller is the marshaling interface for binary data.
type DataStorage ¶
type DataStorage interface {
WaitFlush()
CachedStore2(key1 string, data1 []byte, key2 string, data2 []byte)
CachedStore(key string, data []byte)
DeleteDataWithPrefix(prefix string) int
StoreData(key string, data []byte) error
FlushCache()
DeleteData(key ...string) error
DeleteCacheData(id ...string)
IterData(prefix string) ItemIterator
GetData(id string) []byte
GetStats() map[string]interface{}
Close()
IsClosed() bool
}
DataStorage is an abstracted interface over the key/value storage currently the main purpose is to to prepend prefixes to the data key.
type IResponse ¶
type IResponse interface {
// GetResponse returns serialized string of data that can be returned to the client.
StringResponse() string
// WriteResponse writes the response data directly into writer.
WriteResponse(buf *bufio.Writer) error
// IsError tells if this response is actually an error.
IsError() bool
}
IResponse is a standard interface to any returned data.
type IResponseItem ¶
IResponseItem is an existing data response.
type IServer ¶
type IServer interface {
Start()
Stop()
}
IServer is a server interface that can be started or stopped.
type ISvc ¶
type ISvc interface {
NewContext(ResponseWriter) ServiceContext
StartUpdate()
Info() ServiceInfo
Close()
}
ISvc a service interface used to start/stop and receive basic service info.
type ItemIterator ¶
type ItemIterator interface {
Next()
Valid() bool
Close()
GetValue() []byte
GetKey() []byte
GetTrimKey() []byte
}
ItemIterator is an iterator interface over key/value storage.
type ResponseWriter ¶
ResponseWriter is a writer of IResponse object.
type ServiceContext ¶
ServiceContext is a user protocol parser in scope of a single connection.
type ServiceInfo ¶
ServiceInfo provide the most basic current information about service.