Documentation
¶
Index ¶
- Constants
- type Environment
- func (env *Environment) AVSIInfo(_ *rpctypes.Context) (*ctypes.ResultAVSIInfo, error)
- func (env *Environment) AVSIQuery(_ *rpctypes.Context, path string, data bytes.HexBytes, height int64, ...) (*ctypes.ResultAVSIQuery, error)
- func (env *Environment) AddUnsafeRoutes(routes RoutesMap)
- func (env *Environment) GetRoutes() RoutesMap
- func (env *Environment) Health(*rpctypes.Context) (*ctypes.ResultHealth, error)
- func (env *Environment) NetInfo(*rpctypes.Context) (*ctypes.ResultNetInfo, error)
- func (env *Environment) QueryRequest(_ *rpctypes.Context, hash string) (*ctypes.ResultDvsRequest, error)
- func (env *Environment) RequestDVS(ctx *rpctypes.Context, data []byte, height int64, chainid int64, ...) (*ctypes.ResultRequest, error)
- func (env *Environment) RequestDVSAsync(ctx *rpctypes.Context, data []byte, height int64, chainID int64, ...) (*ctypes.ResultRequestDvsAsync, error)
- func (env *Environment) SearchRequest(ctx *rpctypes.Context, query string, pagePtr, perPagePtr *int) (*ctypes.ResultDvsRequestSearch, error)
- func (env *Environment) UnsafeDialPeers(_ *rpctypes.Context, peers []string, persistent, unconditional, private bool) (*ctypes.ResultDialPeers, error)
- func (env *Environment) UnsafeDialSeeds(_ *rpctypes.Context, seeds []string) (*ctypes.ResultDialSeeds, error)
- type RoutesMap
Constants ¶
const ( // SubscribeTimeout is the maximum time we wait to subscribe for an event. // must be less than the server's write timeout (see rpcserver.DefaultConfig) SubscribeTimeout = 5 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Environment ¶
type Environment struct {
// external, thread safe interfaces
ProxyAppQuery proxy.AppConnQuery
DVSReactor security.DVSReactor
P2PPeers peers
P2PTransport transport
DvsRequestIndexer requestindex.DvsRequestIndexer
Logger log.Logger
Config cfg.RPCConfig
}
---------------------------------------------- Environment contains objects and interfaces used by the RPC. It is expected to be setup once during startup.
func (*Environment) AVSIInfo ¶
func (env *Environment) AVSIInfo(_ *rpctypes.Context) (*ctypes.ResultAVSIInfo, error)
AVSIInfo gets some info about the application.
func (*Environment) AVSIQuery ¶
func (env *Environment) AVSIQuery( _ *rpctypes.Context, path string, data bytes.HexBytes, height int64, prove bool, ) (*ctypes.ResultAVSIQuery, error)
AVSIQuery queries the application for some information.
func (*Environment) AddUnsafeRoutes ¶
func (env *Environment) AddUnsafeRoutes(routes RoutesMap)
AddUnsafeRoutes adds unsafe routes.
func (*Environment) GetRoutes ¶
func (env *Environment) GetRoutes() RoutesMap
Routes is a map of available routes.
func (*Environment) Health ¶
func (env *Environment) Health(*rpctypes.Context) (*ctypes.ResultHealth, error)
Health gets node health. Returns empty result (200 OK) on success, no response - in case of an error.
func (*Environment) NetInfo ¶
func (env *Environment) NetInfo(*rpctypes.Context) (*ctypes.ResultNetInfo, error)
NetInfo returns network info.
func (*Environment) QueryRequest ¶
func (env *Environment) QueryRequest(_ *rpctypes.Context, hash string) (*ctypes.ResultDvsRequest, error)
QueryRequest allows you to query for a DVS request result. It returns a
func (*Environment) RequestDVS ¶
func (*Environment) RequestDVSAsync ¶
func (*Environment) SearchRequest ¶
func (env *Environment) SearchRequest( ctx *rpctypes.Context, query string, pagePtr, perPagePtr *int, ) (*ctypes.ResultDvsRequestSearch, error)
SearchRequest allows you to query for multiple DVS request results. It returns a
func (*Environment) UnsafeDialPeers ¶
func (env *Environment) UnsafeDialPeers( _ *rpctypes.Context, peers []string, persistent, unconditional, private bool, ) (*ctypes.ResultDialPeers, error)
UnsafeDialPeers dials the given peers (comma-separated id@IP:PORT), optionally making them persistent.
func (*Environment) UnsafeDialSeeds ¶
func (env *Environment) UnsafeDialSeeds(_ *rpctypes.Context, seeds []string) (*ctypes.ResultDialSeeds, error)
UnsafeDialSeeds dials the given seeds (comma-separated id@IP:PORT).