Documentation ¶
Index ¶
- func CreateHeadersMiddleware(headers map[string]string) func(next http.Handler) http.Handler
- func CreateLoggerMiddleware(l *zap.Logger) func(next http.Handler) http.Handler
- func JsonContentTypeMiddleware(next http.Handler) http.Handler
- func Run(ctx context.Context, address string, n *NodeApi) error
- func RunWithOpts(ctx context.Context, address string, n *NodeApi, opts *RunOptions) error
- type App
- func (a *App) Accounts() ([]account, error)
- func (a *App) Addresses() ([]string, error)
- func (a *App) BlocksFirst() (*Block, error)
- func (a *App) BlocksGenerators() (Generators, error)
- func (a *App) BlocksLast() (*Block, error)
- func (a *App) BlocksScoreAt(at proto.Height) (Score, error)
- func (a *App) DebugSyncEnabled(enabled bool)
- func (a *App) EthereumDAppMethods(addr proto.WavesAddress) (ethabi.MethodsMap, error)
- func (a *App) LoadKeys(apiKey string, password []byte) error
- func (a *App) Miner() MinerInfo
- func (a *App) NodeProcesses() map[string]int
- func (a *App) PeersAll() (PeersKnown, error)
- func (a *App) PeersConnect(ctx context.Context, apiKey string, addr string) (*PeersConnectResponse, error)
- func (a *App) PeersConnected() PeersConnectedResponse
- func (a *App) PeersKnown() (PeersKnown, error)
- func (a *App) PeersSpawned() PeersSpawnedResponse
- func (a *App) PeersSuspended() []SuspendedPeerInfo
- 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 Block
- type ErrorHandler
- type Generator
- type Generators
- type HandleErrorFunc
- type HandlerFunc
- type MinerInfo
- type Next
- type NodeApi
- func (a *NodeApi) Addresses(w http.ResponseWriter, _ *http.Request) error
- func (a *NodeApi) BlockAt(w http.ResponseWriter, r *http.Request) error
- func (a *NodeApi) BlockHeight(w http.ResponseWriter, _ *http.Request) error
- func (a *NodeApi) BlockIDAt(w http.ResponseWriter, r *http.Request) error
- func (a *NodeApi) BlockScoreAt(w http.ResponseWriter, r *http.Request) error
- func (a *NodeApi) BlocksFirst(w http.ResponseWriter, _ *http.Request) error
- func (a *NodeApi) BlocksGenerators(w http.ResponseWriter, _ *http.Request) error
- func (a *NodeApi) BlocksLast(w http.ResponseWriter, _ *http.Request) error
- func (a *NodeApi) EthereumDAppABI(w http.ResponseWriter, r *http.Request) error
- func (a *NodeApi) GoMinerInfo(w http.ResponseWriter, _ *http.Request) error
- func (a *NodeApi) PeersAll(w http.ResponseWriter, _ *http.Request) error
- func (a *NodeApi) PeersConnect(w http.ResponseWriter, r *http.Request) error
- func (a *NodeApi) PeersConnected(w http.ResponseWriter, _ *http.Request) error
- func (a *NodeApi) PeersKnown(w http.ResponseWriter, _ *http.Request) error
- func (a *NodeApi) PeersSpawned(w http.ResponseWriter, _ *http.Request) error
- func (a *NodeApi) PeersSuspended(w http.ResponseWriter, _ *http.Request) error
- func (a *NodeApi) TransactionsBroadcast(_ http.ResponseWriter, r *http.Request) error
- func (a *NodeApi) WalletAccounts(w http.ResponseWriter, _ *http.Request) error
- type Peer
- type PeerInfo
- type PeersConnectRequest
- type PeersConnectResponse
- type PeersConnectedResponse
- type PeersKnown
- type PeersSpawnedResponse
- type RateLimiterOptions
- type RunOptions
- type Scheduler
- type SchedulerEmits
- type Score
- type SuspendedPeerInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateHeadersMiddleware ¶ added in v0.9.0
func CreateLoggerMiddleware ¶ added in v0.9.0
CreateLoggerMiddleware creates 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 JsonContentTypeMiddleware ¶ added in v0.9.0
func RunWithOpts ¶ added in v0.9.0
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (*App) BlocksFirst ¶
func (*App) BlocksGenerators ¶
func (a *App) BlocksGenerators() (Generators, error)
func (*App) BlocksLast ¶
func (*App) DebugSyncEnabled ¶ added in v0.5.0
func (*App) EthereumDAppMethods ¶ added in v0.10.0
func (a *App) EthereumDAppMethods(addr proto.WavesAddress) (ethabi.MethodsMap, error)
func (*App) NodeProcesses ¶ added in v0.5.0
func (*App) PeersAll ¶
func (a *App) PeersAll() (PeersKnown, error)
PeersAll is a list of all known not banned and not suspended peers with a publicly available declared address
func (*App) PeersConnect ¶
func (*App) PeersConnected ¶
func (a *App) PeersConnected() PeersConnectedResponse
func (*App) PeersKnown ¶ added in v0.9.0
func (a *App) PeersKnown() (PeersKnown, error)
func (*App) PeersSpawned ¶
func (a *App) PeersSpawned() PeersSpawnedResponse
func (*App) PeersSuspended ¶
func (a *App) PeersSuspended() []SuspendedPeerInfo
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 ErrorHandler ¶ added in v0.9.0
type ErrorHandler struct {
// contains filtered or unexported fields
}
func NewErrorHandler ¶ added in v0.9.0
func NewErrorHandler(logger *zap.Logger) ErrorHandler
func (*ErrorHandler) Handle ¶ added in v0.9.0
func (eh *ErrorHandler) Handle(w http.ResponseWriter, r *http.Request, err error)
type Generators ¶
type Generators []Generator
type HandleErrorFunc ¶ added in v0.9.0
type HandleErrorFunc func(w http.ResponseWriter, r *http.Request, err error)
type HandlerFunc ¶ added in v0.9.0
type HandlerFunc func(w http.ResponseWriter, r *http.Request) error
func RollbackToHeight ¶ added in v0.5.0
func RollbackToHeight(app rollbackToHeight) HandlerFunc
func WalletLoadKeys ¶ added in v0.5.0
func WalletLoadKeys(app walletLoadKeys) HandlerFunc
type NodeApi ¶
type NodeApi struct {
// contains filtered or unexported fields
}
func (*NodeApi) BlockHeight ¶
func (*NodeApi) BlockScoreAt ¶
func (*NodeApi) BlocksFirst ¶
func (*NodeApi) BlocksGenerators ¶
func (*NodeApi) BlocksLast ¶
func (*NodeApi) EthereumDAppABI ¶ added in v0.10.0
func (*NodeApi) GoMinerInfo ¶ added in v0.9.0
func (*NodeApi) PeersConnect ¶
func (*NodeApi) PeersConnected ¶
func (*NodeApi) PeersKnown ¶ added in v0.9.0
func (*NodeApi) PeersSpawned ¶
func (*NodeApi) PeersSuspended ¶
func (*NodeApi) TransactionsBroadcast ¶
func (*NodeApi) WalletAccounts ¶ added in v0.7.0
type PeersConnectRequest ¶
type PeersConnectResponse ¶
type PeersConnectedResponse ¶
type PeersConnectedResponse struct {
Peers []PeerInfo `json:"peers"`
}
type PeersKnown ¶ added in v0.9.0
type PeersKnown struct {
Peers []Peer `json:"peers"`
}
type PeersSpawnedResponse ¶
type RateLimiterOptions ¶ added in v0.9.0
type RunOptions ¶ added in v0.9.0
type RunOptions struct { RateLimiterOpts *RateLimiterOptions LogHttpRequestOpts bool CollectMetrics bool UseRealIPMiddleware bool EnableHeartbeatRoute bool RouteNotFoundHandler func(w http.ResponseWriter, r *http.Request) }
func DefaultRunOptions ¶ added in v0.9.0
func DefaultRunOptions() *RunOptions
type SchedulerEmits ¶
type SuspendedPeerInfo ¶ added in v0.9.0
Source Files ¶
Click to show internal directories.
Click to hide internal directories.