Documentation ¶
Index ¶
Constants ¶
View Source
const UnhealthyNodeCheckInterval = time.Minute * 10 // TODO Configurable in toml?
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ABCIClient ¶
type ABCIClient interface { ABCIQueryWithOptions(ctx context.Context, path string, data bytes.HexBytes, opts client.ABCIQueryOptions) (*core.ResultABCIQuery, error) Status(context.Context) (*core.ResultStatus, error) CheckTx(ctx context.Context, tx tm.Tx) (*core.ResultCheckTx, error) BroadcastTxAsync(context.Context, tm.Tx) (*core.ResultBroadcastTx, error) BroadcastTxSync(context.Context, tm.Tx) (*core.ResultBroadcastTx, error) }
ABCIClient is a subset of from TM/rpc/client.ABCIClient.
type ConnectionContext ¶
type ConnectionContext interface { GetNetworkGroup() NetworkGroup GetNodeType() config.NodeType GetMetrics() *NodeMetrics GetAddress() string GetBasePort() int SetNodeUrl(addr *url.URL) GetABCIClient() ABCIClient GetAPIClient() APIClient IsHealthy() bool ReportError(err error) ReportErrorStatus(status NodeStatus) ClearErrors() }
type ConnectionInitializer ¶
type ConnectionInitializer interface { ConnectionManager InitClients(client.Client, StatusChecker) error ConnectDirectly(other ConnectionManager) error }
func NewConnectionManager ¶
type ConnectionManager ¶
type ConnectionManager interface {
SelectConnection(partitionId string, allowFollower bool) (ConnectionContext, error)
}
type FakeClient ¶
type FakeClient = struct { ABCI ABCIClient API APIClient }
type FakeConnectionManager ¶
type FakeConnectionManager interface { ConnectionManager SetClients(clients map[string]FakeClient) }
func NewFakeConnectionManager ¶
func NewFakeConnectionManager(partitions []string) FakeConnectionManager
type NetworkGroup ¶
type NetworkGroup int
const ( Local NetworkGroup = iota SamePartition OtherPartition )
type NodeMetrics ¶
type NodeMetrics struct {
// contains filtered or unexported fields
}
type NodeStatus ¶
type NodeStatus int
const ( Up NodeStatus = iota // Healthy & ready to go Down // Not reachable OutOfService // Reachable but not ready to go (IE. still syncing up) Unknown // Not checked yet )
type StatusChecker ¶
type StatusChecker interface {
IsStatusOk(connCtx ConnectionContext) bool
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.