Server implements the zero server.
| 35 | |
| 36 | // Server implements the zero server. |
| 37 | type Server struct { |
| 38 | x.SafeMutex |
| 39 | Node *node |
| 40 | orc *Oracle |
| 41 | |
| 42 | NumReplicas int |
| 43 | state *pb.MembershipState |
| 44 | nextRaftId uint64 |
| 45 | |
| 46 | // nextUint is the uint64 which we can hand out next. See maxLease for the |
| 47 | // max ID leased via Zero quorum. |
| 48 | nextUint map[pb.NumLeaseType]uint64 |
| 49 | readOnlyTs uint64 |
| 50 | leaseLock sync.Mutex // protects nextUID, nextTxnTs, nextNsID and corresponding proposals. |
| 51 | rateLimiter *x.RateLimiter |
| 52 | |
| 53 | // groupMap map[uint32]*Group |
| 54 | nextGroup uint32 |
| 55 | leaderChangeCh chan struct{} |
| 56 | closer *z.Closer // Used to tell stream to close. |
| 57 | connectLock sync.Mutex // Used to serialize connect requests from servers. |
| 58 | |
| 59 | // tls client config used to connect with zero internally |
| 60 | tlsClientConfig *tls.Config |
| 61 | |
| 62 | moveOngoing chan struct{} |
| 63 | blockCommitsOn *sync.Map |
| 64 | |
| 65 | checkpointPerGroup map[uint32]uint64 |
| 66 | // embedding the pb.UnimplementedZeroServer struct to ensure forward compatibility of the server. |
| 67 | pb.UnimplementedZeroServer |
| 68 | } |
| 69 | |
| 70 | // Init initializes the zero server. |
| 71 | func (s *Server) Init() { |
nothing calls this directly
no outgoing calls
no test coverage detected