-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.go
39 lines (33 loc) · 1.09 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package zongzi
type Host struct {
ID string `json:"id"`
Created uint64 `json:"created"`
Updated uint64 `json:"updated"`
Status HostStatus `json:"status"`
Tags map[string]string `json:"tags"`
ApiAddress string `json:"apiAddress"`
RaftAddress string `json:"raftAddress"`
ShardTypes []string `json:"shardTypes"`
}
type Shard struct {
ID uint64 `json:"id"`
Created uint64 `json:"created"`
Updated uint64 `json:"updated"`
Status ShardStatus `json:"status"`
Tags map[string]string `json:"tags"`
Leader uint64 `json:"leader"`
Name string `json:"name"`
Term uint64 `json:"term"`
Type string `json:"type"`
}
type Replica struct {
ID uint64 `json:"id"`
Created uint64 `json:"created"`
Updated uint64 `json:"updated"`
Status ReplicaStatus `json:"status"`
Tags map[string]string `json:"tags"`
HostID string `json:"hostID"`
IsNonVoting bool `json:"isNonVoting"`
IsWitness bool `json:"isWitness"`
ShardID uint64 `json:"shardID"`
}