Documentation ¶
Overview ¶
Package node contains functionality for interacting with Vega data nodes.
Index ¶
- type DataNode
- func (n *DataNode) AssetByID(req *dataapipb.AssetByIDRequest) (*dataapipb.AssetByIDResponse, error)
- func (n *DataNode) LastBlockData() (*vegaapipb.LastBlockHeightResponse, error)
- func (n *DataNode) MarketDataByID(req *dataapipb.MarketDataByIDRequest) (*dataapipb.MarketDataByIDResponse, error)
- func (n *DataNode) Markets(req *dataapipb.MarketsRequest) (*dataapipb.MarketsResponse, error)
- func (n *DataNode) MustDialConnection(ctx context.Context)
- func (n *DataNode) ObserveEventBus(ctx context.Context) (vegaapipb.CoreService_ObserveEventBusClient, error)
- func (n *DataNode) PartyAccounts(req *dataapipb.PartyAccountsRequest) (*dataapipb.PartyAccountsResponse, error)
- func (n *DataNode) PositionsByParty(req *dataapipb.PositionsByPartyRequest) (*dataapipb.PositionsByPartyResponse, error)
- func (n *DataNode) SubmitTransaction(req *vegaapipb.SubmitTransactionRequest) (*vegaapipb.SubmitTransactionResponse, error)
- func (n *DataNode) Target() string
- func (n *DataNode) WaitForStateChange(ctx context.Context, state connectivity.State) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataNode ¶ added in v0.41.0
type DataNode struct {
// contains filtered or unexported fields
}
DataNode stores state for a Vega Data node.
func NewDataNode ¶ added in v0.41.0
NewDataNode returns a new node.
func (*DataNode) AssetByID ¶ added in v0.41.0
func (n *DataNode) AssetByID(req *dataapipb.AssetByIDRequest) (*dataapipb.AssetByIDResponse, error)
AssetByID returns the specified asset.
func (*DataNode) LastBlockData ¶ added in v0.41.0
func (n *DataNode) LastBlockData() (*vegaapipb.LastBlockHeightResponse, error)
LastBlockData gets the latest blockchain data, height, hash and pow parameters.
func (*DataNode) MarketDataByID ¶ added in v0.41.0
func (n *DataNode) MarketDataByID(req *dataapipb.MarketDataByIDRequest) (*dataapipb.MarketDataByIDResponse, error)
MarketDataByID returns market data for the specified market.
func (*DataNode) Markets ¶ added in v0.41.0
func (n *DataNode) Markets(req *dataapipb.MarketsRequest) (*dataapipb.MarketsResponse, error)
Markets returns all markets.
func (*DataNode) MustDialConnection ¶
MustDialConnection tries to establish a connection to one of the nodes from a list of locations. It is idempotent, where each call will block the caller until a connection is established.
func (*DataNode) ObserveEventBus ¶ added in v0.41.0
func (n *DataNode) ObserveEventBus(ctx context.Context) (vegaapipb.CoreService_ObserveEventBusClient, error)
ObserveEventBus opens a stream.
func (*DataNode) PartyAccounts ¶ added in v0.41.0
func (n *DataNode) PartyAccounts(req *dataapipb.PartyAccountsRequest) (*dataapipb.PartyAccountsResponse, error)
PartyAccounts returns accounts for the given party.
func (*DataNode) PositionsByParty ¶ added in v0.41.0
func (n *DataNode) PositionsByParty(req *dataapipb.PositionsByPartyRequest) (*dataapipb.PositionsByPartyResponse, error)
PositionsByParty returns positions for the given party.
func (*DataNode) SubmitTransaction ¶ added in v0.41.0
func (n *DataNode) SubmitTransaction(req *vegaapipb.SubmitTransactionRequest) (*vegaapipb.SubmitTransactionResponse, error)
SubmitTransaction submits a signed v2 transaction.