Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Query ¶
type Query struct {
C chan QueryReply
}
Query can be used as a special request that directly read the value of key without go through replication protocol in Replica
func (*Query) Reply ¶
func (r *Query) Reply(reply QueryReply)
type Read ¶
Read can be used as a special request that directly read the value of key without go through replication protocol in Replica
type Transaction ¶
type Transaction struct {
Command db.Command
Properties map[string]string
Timestamp time.Time
NodeID identity.NodeID // forward by node
ID string
C chan TransactionReply // reply channel created by request receiver
}
Transaction is client reqeust with http response channel
func (*Transaction) Reply ¶
func (r *Transaction) Reply(reply TransactionReply)
TransactionReply replies to current client session
func (Transaction) String ¶
func (r Transaction) String() string
type TransactionReply ¶
type TransactionReply struct {
Command db.Command
Value db.Value
Properties map[string]string
Delay time.Duration
Err error
}
TransactionReply includes all info that might replies to back the client for the coresponding reqeust
func NewReply ¶
func NewReply(delay time.Duration) TransactionReply
func (TransactionReply) String ¶
func (r TransactionReply) String() string
Click to show internal directories.
Click to hide internal directories.