Documentation ¶
Index ¶
- Variables
- func NewBenchmarkConfig() bconfig
- type Benchmarker
- type Client
- func (c *Client) AddTxDelete(key kv_store.Key, table string)
- func (c *Client) AddTxGet(key kv_store.Key, table string)
- func (c *Client) AddTxPut(key kv_store.Key, value kv_store.Value, table string)
- func (c *Client) Delete(key kv_store.Key, table string)
- func (c *Client) Get(key kv_store.Key, table string) kv_store.Value
- func (c *Client) GetAsync(key kv_store.Key, table string)
- func (c *Client) JSONGet(key kv_store.Key, table string) kv_store.Value
- func (c *Client) JSONPut(key kv_store.Key, value kv_store.Value, table string)
- func (c *Client) JSONTX(commands []kv_store.Command) bool
- func (c *Client) PrepTx()
- func (c *Client) Put(key kv_store.Key, value kv_store.Value, table string)
- func (c *Client) PutAsync(key kv_store.Key, value kv_store.Value, table string)
- func (c *Client) PutTx(keys []kv_store.Key, values []kv_store.Value, tables []string) bool
- func (c *Client) RESTDelete(key kv_store.Key, table string) bool
- func (c *Client) RESTGet(key kv_store.Key, table string) kv_store.Value
- func (c *Client) RESTPut(key kv_store.Key, value kv_store.Value, table string)
- func (c *Client) RequestDone() int
- func (c *Client) SendTX() bool
- func (c *Client) Start()
- func (c *Client) Stop()
- type DB
- type History
- type Node
- type Read
- type ReadReply
- type Reply
- type Request
- type Stat
- type Transaction
- func (tx *Transaction) AreAllCommitted() bool
- func (tx *Transaction) AreAllWaiting() bool
- func (tx *Transaction) CanSendP3() bool
- func (r *Transaction) CloseExecChannel()
- func (r *Transaction) GetExecChannel() chan TxExec
- func (t *Transaction) MakeCommittedWaitingFlags(slots []int)
- func (r *Transaction) MakeExecChannel(numkeys int)
- func (tx *Transaction) MarkCommitted(key kv_store.Key)
- func (tx *Transaction) MarkWaiting(key kv_store.Key)
- func (tx *Transaction) P3Sent()
- func (r *Transaction) ReadyToExec(slot int, key kv_store.Key)
- func (r *Transaction) Reply(reply TransactionReply)
- func (t Transaction) String() string
- type TransactionReply
- type TxExec
Constants ¶
This section is empty.
Variables ¶
var ( //Used for Object Handover decisions HandoverN int HandoverInterval int )
Functions ¶
func NewBenchmarkConfig ¶
func NewBenchmarkConfig() bconfig
Types ¶
type Benchmarker ¶
type Benchmarker struct { *History // contains filtered or unexported fields }
func NewBenchmarker ¶
func NewBenchmarker(db DB) *Benchmarker
type Client ¶
type Client struct { ID ids.ID // client id use the same id as servers in local site N int sync.RWMutex sync.WaitGroup // contains filtered or unexported fields }
Client main access point of bench lib
func (*Client) RESTDelete ¶
RESTDelete access server's REST API with url = http://ip:port/key
func (*Client) RESTGet ¶
RESTGet access server's REST API with url = http://ip:port/key
func (*Client) RESTPut ¶
RESTPut access server's REST API with url = http://ip:port/key and request body of value
func (*Client) RequestDone ¶
RequestDone returns the total number of succeed async reqeusts
type History ¶
History client operation history mapped by key
func (*History) Linearizable ¶
Linearizable concurrently checks if each partition of the history is linearizable
type Node ¶
type Node interface { netwrk.Socket kv_store.Store ID() ids.ID Run() Retry(r Request) Forward(id ids.ID, r Request) Register(m interface{}, f interface{}) GetTX(txid ids.TXID) *Transaction }
Node is the primary access point for every replica it includes networking, state machine and RESTful API server
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 Reply ¶
Reply includes all info that might replies to back the client for the corresponding request
type Stat ¶
type Transaction ¶
type Transaction struct { TxID ids.TXID CommandID ids.CommandID Commands []kv_store.Command CmdMeta []kv_store.TxCommandMeta ClientID ids.ID Timestamp int64 // contains filtered or unexported fields }
Transaction contains arbitrary number of commands in one request
func NewInProgressTX ¶
func (*Transaction) AreAllCommitted ¶
func (tx *Transaction) AreAllCommitted() bool
func (*Transaction) AreAllWaiting ¶
func (tx *Transaction) AreAllWaiting() bool
func (*Transaction) CanSendP3 ¶
func (tx *Transaction) CanSendP3() bool
func (*Transaction) CloseExecChannel ¶
func (r *Transaction) CloseExecChannel()
func (*Transaction) GetExecChannel ¶
func (r *Transaction) GetExecChannel() chan TxExec
func (*Transaction) MakeCommittedWaitingFlags ¶
func (t *Transaction) MakeCommittedWaitingFlags(slots []int)
func (*Transaction) MakeExecChannel ¶
func (r *Transaction) MakeExecChannel(numkeys int)
func (*Transaction) MarkCommitted ¶
func (tx *Transaction) MarkCommitted(key kv_store.Key)
func (*Transaction) MarkWaiting ¶
func (tx *Transaction) MarkWaiting(key kv_store.Key)
func (*Transaction) P3Sent ¶
func (tx *Transaction) P3Sent()
func (*Transaction) ReadyToExec ¶
func (r *Transaction) ReadyToExec(slot int, key kv_store.Key)
Reply replies to the current request
func (*Transaction) Reply ¶
func (r *Transaction) Reply(reply TransactionReply)
Reply replies to the current request
func (Transaction) String ¶
func (t Transaction) String() string