Documentation ¶
Index ¶
- func Logger(l *zap.Logger) func(next http.Handler) http.Handler
- func RollbackToHeight(app rollbackToHeight) http.HandlerFunc
- func Run(ctx context.Context, address string, n *NodeApi) error
- func WalletLoadKeys(app walletLoadKeys) http.HandlerFunc
- type App
- func (a *App) Accounts() ([]account, error)
- func (a *App) BlocksFirst() (*proto.Block, error)
- func (a *App) BlocksGenerators() (Generators, error)
- func (a *App) BlocksLast() (*proto.Block, error)
- func (a *App) BlocksScoreAt(at proto.Height) (*Score, error)
- func (a *App) DebugSyncEnabled(enabled bool)
- func (a *App) LoadKeys(apiKey string, password []byte) error
- func (a *App) Miner() (*MinerInfo, error)
- func (a *App) NodeProcesses() map[string]int
- func (a *App) PeersAll() (*PeersAll, error)
- func (a *App) PeersConnect(ctx context.Context, apiKey string, addr string) (*PeersConnectResponse, error)
- func (a *App) PeersConnected() (*PeersConnectedResponse, error)
- func (a *App) PeersSpawned() *PeersSpawnedResponse
- func (a *App) PeersSuspended() (*PeersSuspendedResponse, error)
- func (a *App) PoolTransactions() int
- func (a *App) RollbackToHeight(apiKey string, height proto.Height) error
- func (a *App) TransactionsBroadcast(ctx context.Context, b []byte) error
- type AuthError
- type BadRequestError
- type BlockHeightResponse
- type Generator
- type Generators
- type InternalError
- type MinerInfo
- type Next
- type NodeApi
- func (a *NodeApi) BlockAt(w http.ResponseWriter, r *http.Request)
- func (a *NodeApi) BlockHeight(w http.ResponseWriter, _ *http.Request)
- func (a *NodeApi) BlockIDAt(w http.ResponseWriter, r *http.Request)
- func (a *NodeApi) BlockScoreAt(w http.ResponseWriter, r *http.Request)
- func (a *NodeApi) BlocksFirst(w http.ResponseWriter, _ *http.Request)
- func (a *NodeApi) BlocksGenerators(w http.ResponseWriter, _ *http.Request)
- func (a *NodeApi) BlocksLast(w http.ResponseWriter, _ *http.Request)
- func (a *NodeApi) DebugSyncEnabled(w http.ResponseWriter, r *http.Request)
- func (a *NodeApi) MinerInfo(w http.ResponseWriter, _ *http.Request)
- func (a *NodeApi) PeersAll(w http.ResponseWriter, _ *http.Request)
- func (a *NodeApi) PeersConnect(w http.ResponseWriter, r *http.Request)
- func (a *NodeApi) PeersConnected(w http.ResponseWriter, _ *http.Request)
- func (a *NodeApi) PeersSpawned(w http.ResponseWriter, _ *http.Request)
- func (a *NodeApi) PeersSuspended(w http.ResponseWriter, _ *http.Request)
- func (a *NodeApi) TransactionsBroadcast(w http.ResponseWriter, r *http.Request)
- func (a *NodeApi) WalletAccounts(w http.ResponseWriter, _ *http.Request)
- type Peer
- type PeersAll
- type PeersConnectRequest
- type PeersConnectResponse
- type PeersConnectedResponse
- type PeersConnectedRow
- type PeersSpawnedResponse
- type PeersSuspendedResponse
- type Scheduler
- type SchedulerEmits
- type Score
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Logger ¶
Logger is a middleware that logs the start and end of each request, along with some useful data about what was requested, what the response status was, and how long it took to return.
func RollbackToHeight ¶ added in v0.5.0
func RollbackToHeight(app rollbackToHeight) http.HandlerFunc
func WalletLoadKeys ¶ added in v0.5.0
func WalletLoadKeys(app walletLoadKeys) http.HandlerFunc
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (*App) BlocksGenerators ¶
func (a *App) BlocksGenerators() (Generators, error)
func (*App) DebugSyncEnabled ¶ added in v0.5.0
func (*App) NodeProcesses ¶ added in v0.5.0
func (*App) PeersConnect ¶
func (*App) PeersConnected ¶
func (a *App) PeersConnected() (*PeersConnectedResponse, error)
func (*App) PeersSpawned ¶
func (a *App) PeersSpawned() *PeersSpawnedResponse
func (*App) PeersSuspended ¶
func (a *App) PeersSuspended() (*PeersSuspendedResponse, error)
func (*App) PoolTransactions ¶ added in v0.5.0
func (*App) RollbackToHeight ¶ added in v0.5.0
TODO Here should be internal message with rollback action
type BadRequestError ¶
type BadRequestError struct {
// contains filtered or unexported fields
}
type BlockHeightResponse ¶
type BlockHeightResponse struct {
Height uint64 `json:"height"`
}
type Generators ¶
type Generators []Generator
type InternalError ¶
type InternalError struct {
// contains filtered or unexported fields
}
type NodeApi ¶
type NodeApi struct {
// contains filtered or unexported fields
}
func (*NodeApi) BlockHeight ¶
func (a *NodeApi) BlockHeight(w http.ResponseWriter, _ *http.Request)
func (*NodeApi) BlockIDAt ¶ added in v0.5.0
func (a *NodeApi) BlockIDAt(w http.ResponseWriter, r *http.Request)
func (*NodeApi) BlockScoreAt ¶
func (a *NodeApi) BlockScoreAt(w http.ResponseWriter, r *http.Request)
func (*NodeApi) BlocksFirst ¶
func (a *NodeApi) BlocksFirst(w http.ResponseWriter, _ *http.Request)
func (*NodeApi) BlocksGenerators ¶
func (a *NodeApi) BlocksGenerators(w http.ResponseWriter, _ *http.Request)
func (*NodeApi) BlocksLast ¶
func (a *NodeApi) BlocksLast(w http.ResponseWriter, _ *http.Request)
func (*NodeApi) DebugSyncEnabled ¶ added in v0.5.0
func (a *NodeApi) DebugSyncEnabled(w http.ResponseWriter, r *http.Request)
func (*NodeApi) MinerInfo ¶ added in v0.7.0
func (a *NodeApi) MinerInfo(w http.ResponseWriter, _ *http.Request)
func (*NodeApi) PeersConnect ¶
func (a *NodeApi) PeersConnect(w http.ResponseWriter, r *http.Request)
func (*NodeApi) PeersConnected ¶
func (a *NodeApi) PeersConnected(w http.ResponseWriter, _ *http.Request)
func (*NodeApi) PeersSpawned ¶
func (a *NodeApi) PeersSpawned(w http.ResponseWriter, _ *http.Request)
func (*NodeApi) PeersSuspended ¶
func (a *NodeApi) PeersSuspended(w http.ResponseWriter, _ *http.Request)
func (*NodeApi) TransactionsBroadcast ¶
func (a *NodeApi) TransactionsBroadcast(w http.ResponseWriter, r *http.Request)
func (*NodeApi) WalletAccounts ¶ added in v0.7.0
func (a *NodeApi) WalletAccounts(w http.ResponseWriter, _ *http.Request)
type PeersConnectRequest ¶
type PeersConnectResponse ¶
type PeersConnectedResponse ¶
type PeersConnectedResponse struct {
Peers []PeersConnectedRow `json:"peers"`
}
type PeersConnectedRow ¶
type PeersSpawnedResponse ¶
type PeersSuspendedResponse ¶
type PeersSuspendedResponse struct {
Peers []string `json:"peers"`
}
type SchedulerEmits ¶
Click to show internal directories.
Click to hide internal directories.