Documentation
¶
Overview ¶
Package sync provides Client and Server APIs that ensures robust network connectivity between all peers in the DKG. It supports cluster_definition verification, soft shutdown and reconnect on connection loss.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the client side of the sync protocol. It retries establishing a connection to a sync server, it sends period pings (including definition hash signatures), supports reestablishing on relay circuit recycling, and supports soft shutdown.
func (*Client) AwaitConnected ¶
AwaitConnected blocks until the connection with the server has been established or returns a context error.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements the server side of the sync protocol. It accepts connections from clients, verifies definition hash signatures, and supports waiting for shutdown by all clients.
func (*Server) AwaitAllConnected ¶
AwaitAllConnected blocks until all peers have established a connection with this server or returns an error.
func (*Server) AwaitAllShutdown ¶
AwaitAllShutdown blocks until all peers have successfully shutdown or returns an error. It may only be called after AwaitAllConnected.