Documentation
¶
Index ¶
- func GenSign(clusterId uint64, d int64, token string) string
- func SendReply(w http.ResponseWriter, rep *Reply)
- func VerifySign(clusterId uint64, d, token, s string) bool
- type Peer
- type PeerBrief
- type PeerBriefReply
- type PeerInfo
- type PeerInfoReply
- type Range
- type RangeBrief
- type RangeBriefReply
- type RangeLocateRequest
- type RangeLocateResponse
- type RangeStatHeap
- type RangeStatsInfo
- type Reply
- type Route
- type Task
- type TaskResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SendReply ¶
func SendReply(w http.ResponseWriter, rep *Reply)
func VerifySign ¶
Types ¶
type PeerBrief ¶
type PeerBrief struct {
Id uint64 `json:"id,omitempty"`
Index uint64 `json:"index,omitempty"`
Term uint64 `json:"term,omitempty"`
Commit uint64 `json:"commit,omitempty"`
StartKey string `json:"start_key,omitempty"`
EndKey string `json:"end_key,omitempty"`
NodeId uint64 `json:"node_id,omitempty"`
NodeAddress string `json:"node_address,omitempty"`
NodeState int32 `json:"node_state,omitempty"`
}
type PeerBriefReply ¶
type PeerInfo ¶
type PeerInfo struct {
Id uint64 `json:"id,omitempty"`
// Range key range [start_key, end_key).
StartKey []byte `json:"start_key,omitempty"`
EndKey []byte `json:"end_key,omitempty"`
RangeEpoch *metapb.RangeEpoch `json:"range_epoch,omitempty"`
Peer *Peer `json:"peers,omitempty"`
// Range state
State string `json:"state,omitempty"`
}
type PeerInfoReply ¶
type RangeBrief ¶
type RangeBrief struct {
Id uint64 `json:"id,omitempty"`
StartKey string `json:"start_key,omitempty"`
EndKey string `json:"end_key,omitempty"`
State int32 `json:"state,omitempty"`
LastHbTime string `json:"last_hb_time,omitempty"`
DownPeers []uint64 `json:"down_peers,omitempty"`
Peers []uint64 `json:"peers,omitempty"`
Leader uint64 `json:"leader,omitempty"`
}
type RangeBriefReply ¶
type RangeBriefReply struct {
Code int `json:"code"`
Message string `json:"message"`
Data []*RangeBrief `json:"data"`
}
type RangeLocateRequest ¶
type RangeLocateRequest struct {
DbName string `json:"db_name"`
TableName string `json:"table_name"`
}
func GetRangeLocateRequest ¶
func GetRangeLocateRequest(r *http.Request) (*RangeLocateRequest, error)
type RangeLocateResponse ¶
type RangeLocateResponse struct {
Routes []*Route `json:"routes"`
}
type RangeStatHeap ¶
type RangeStatHeap []RangeStatsInfo
func (RangeStatHeap) Len ¶
func (h RangeStatHeap) Len() int
func (RangeStatHeap) Less ¶
func (h RangeStatHeap) Less(i, j int) bool
func (*RangeStatHeap) Pop ¶
func (h *RangeStatHeap) Pop() interface{}
func (*RangeStatHeap) Push ¶
func (h *RangeStatHeap) Push(x interface{})
func (RangeStatHeap) Swap ¶
func (h RangeStatHeap) Swap(i, j int)
type RangeStatsInfo ¶
type RangeStatsInfo struct {
RangeId uint64 `json:"range_id,omitempty"`
LeaderId uint64 `json:"leader_id,omitempty"`
TableId uint64 `json:"table_id,omitempty"`
NodeAddr string `json:"node_addr,omitempty"`
BytesWritten uint64 `json:"bytes_written,omitempty"`
BytesRead uint64 `json:"bytes_read,omitempty"`
KeysWritten uint64 `json:"keys_written,omitempty"`
KeysRead uint64 `json:"keys_read,omitempty"`
ApproximateSize uint64 `json:"approximate_size,omitempty"`
WriteOps uint64 `json:"write_ops,omitempty"`
}
type Reply ¶
type TaskResponse ¶
type TaskResponse []*Task
Click to show internal directories.
Click to hide internal directories.