Documentation ¶
Index ¶
- Constants
- Variables
- func CallREST(client *http.Client, rpcUrl string, method string, rpcReq []byte) (string, error)
- func CallRPC(client *http.Client, rpcUrl string, rpcReq []byte, resData interface{}) error
- func NewHttpClient(tls *tls.Config) *http.Client
- func RandomInt(min int, max int) int
- type ClientStatus
- type NodeStatus
- type RpcError
Constants ¶
View Source
const ( HttpClientRequestTimeout = 10 * time.Second HttpClientRequestDialerTimeout = 10 * time.Second TLSHandshakeTimeout = 10 * time.Second Peer2PeerValidationRetryLimit = 3 // Message to DAPP / Clients of blockchain NodeIsBeingShutdown = "node is being shutdown, try after sometime" NodeIsBeingStarted = "node is being started, try after sometime" SomeParticipantsDown = "Some participant nodes are down" NodeIsNotReadyToAcceptRequest = "node is not ready to accept request" )
Variables ¶
View Source
var ErrNodeDown = errors.New("node is not up")
Functions ¶
func NewHttpClient ¶
NewHttpClient returns a new customized http client
Types ¶
type ClientStatus ¶
type ClientStatus uint8
ClientStatus indicates the combined status of both blockchain client and privacy manager processes
const ( Up ClientStatus // indicates both blockchain client and privacy manager are up Down // indicates that both blockchain client and privacy manager are down )
type NodeStatus ¶
type NodeStatus uint8
NodeStatus indicates the status of node hibernator
const ( ShutdownInprogress NodeStatus // indicates that node hibernator is shutting down both blockchain client and privacy manager StartupInprogress // indicates that node hibernator is starting up both blockchain client and privacy manager ConsensusWait OK // default status of node hibernator when its not doing anything )
Click to show internal directories.
Click to hide internal directories.