Documentation ¶
Index ¶
- func BatchConvertBlockHash(geyserBlocks ...*geyser_pb.SubscribeUpdateBlock) []*rpc.GetBlockResult
- func BatchConvertTransaction(geyserTxns ...*geyser_pb.SubscribeUpdateTransaction) []*solana.Transaction
- func ConvertBlockHash(geyserBlock *geyser_pb.SubscribeUpdateBlock) *rpc.GetBlockResult
- func ConvertTransaction(geyserTx *geyser_pb.SubscribeUpdateTransaction) *solana.Transaction
- type Client
- type StreamClient
- func (s *StreamClient) AppendAccounts(filterName string, accounts ...string) error
- func (s *StreamClient) GetAccounts(filterName string) []string
- func (s *StreamClient) Stop()
- func (s *StreamClient) SubscribeAccountDataSlice(req []*geyser_pb.SubscribeRequestAccountsDataSlice) error
- func (s *StreamClient) SubscribeAccounts(filterName string, req *geyser_pb.SubscribeRequestFilterAccounts) error
- func (s *StreamClient) SubscribeBlocks(filterName string, req *geyser_pb.SubscribeRequestFilterBlocks) error
- func (s *StreamClient) SubscribeBlocksMeta(filterName string, req *geyser_pb.SubscribeRequestFilterBlocksMeta) error
- func (s *StreamClient) SubscribeEntry(filterName string, req *geyser_pb.SubscribeRequestFilterEntry) error
- func (s *StreamClient) SubscribeSlots(filterName string, req *geyser_pb.SubscribeRequestFilterSlots) error
- func (s *StreamClient) SubscribeTransaction(filterName string, req *geyser_pb.SubscribeRequestFilterTransactions) error
- func (s *StreamClient) SubscribeTransactionStatus(filterName string, req *geyser_pb.SubscribeRequestFilterTransactions) error
- func (s *StreamClient) UnsubscribeAccountDataSlice() error
- func (s *StreamClient) UnsubscribeAccounts(filterName string, accounts ...string) error
- func (s *StreamClient) UnsubscribeAccountsByID(filterName string) error
- func (s *StreamClient) UnsubscribeAllAccounts(filterName string) error
- func (s *StreamClient) UnsubscribeBlocks(filterName string) error
- func (s *StreamClient) UnsubscribeBlocksMeta(filterName string) error
- func (s *StreamClient) UnsubscribeEntry(filterName string) error
- func (s *StreamClient) UnsubscribeSlots(filterName string) error
- func (s *StreamClient) UnsubscribeTransaction(filterName string) error
- func (s *StreamClient) UnsubscribeTransactionStatus(filterName string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BatchConvertBlockHash ¶
func BatchConvertBlockHash(geyserBlocks ...*geyser_pb.SubscribeUpdateBlock) []*rpc.GetBlockResult
func BatchConvertTransaction ¶
func BatchConvertTransaction(geyserTxns ...*geyser_pb.SubscribeUpdateTransaction) []*solana.Transaction
func ConvertBlockHash ¶
func ConvertBlockHash(geyserBlock *geyser_pb.SubscribeUpdateBlock) *rpc.GetBlockResult
ConvertBlockHash converts a Geyser type block to a github.com/gagliardetto/solana-go Solana block.
func ConvertTransaction ¶
func ConvertTransaction(geyserTx *geyser_pb.SubscribeUpdateTransaction) *solana.Transaction
Types ¶
type Client ¶
type Client struct { Ctx context.Context Geyser geyser_pb.GeyserClient ErrCh chan error // contains filtered or unexported fields }
func (*Client) AddStreamClient ¶
func (c *Client) AddStreamClient(ctx context.Context, streamName string, opts ...grpc.CallOption) error
AddStreamClient creates a new Geyser subscribe stream client.
func (*Client) GetStreamClient ¶
func (c *Client) GetStreamClient(streamName string) *StreamClient
type StreamClient ¶
type StreamClient struct { Ctx context.Context Ch chan *geyser_pb.SubscribeUpdate ErrCh chan error // contains filtered or unexported fields }
func (*StreamClient) AppendAccounts ¶
func (s *StreamClient) AppendAccounts(filterName string, accounts ...string) error
AppendAccounts appends accounts to an existing subscription and sends the request.
func (*StreamClient) GetAccounts ¶
func (s *StreamClient) GetAccounts(filterName string) []string
func (*StreamClient) Stop ¶
func (s *StreamClient) Stop()
func (*StreamClient) SubscribeAccountDataSlice ¶
func (s *StreamClient) SubscribeAccountDataSlice(req []*geyser_pb.SubscribeRequestAccountsDataSlice) error
SubscribeAccountDataSlice subscribes to account data slice updates.
func (*StreamClient) SubscribeAccounts ¶
func (s *StreamClient) SubscribeAccounts(filterName string, req *geyser_pb.SubscribeRequestFilterAccounts) error
SubscribeAccounts subscribes to account updates. Note: This will overwrite existing subscriptions for the given ID. To add new accounts without overwriting, use AppendAccounts.
func (*StreamClient) SubscribeBlocks ¶
func (s *StreamClient) SubscribeBlocks(filterName string, req *geyser_pb.SubscribeRequestFilterBlocks) error
SubscribeBlocks subscribes to block updates.
func (*StreamClient) SubscribeBlocksMeta ¶
func (s *StreamClient) SubscribeBlocksMeta(filterName string, req *geyser_pb.SubscribeRequestFilterBlocksMeta) error
SubscribeBlocksMeta subscribes to block metadata updates.
func (*StreamClient) SubscribeEntry ¶
func (s *StreamClient) SubscribeEntry(filterName string, req *geyser_pb.SubscribeRequestFilterEntry) error
SubscribeEntry subscribes to entry updates.
func (*StreamClient) SubscribeSlots ¶
func (s *StreamClient) SubscribeSlots(filterName string, req *geyser_pb.SubscribeRequestFilterSlots) error
SubscribeSlots subscribes to slot updates.
func (*StreamClient) SubscribeTransaction ¶
func (s *StreamClient) SubscribeTransaction(filterName string, req *geyser_pb.SubscribeRequestFilterTransactions) error
SubscribeTransaction subscribes to transaction updates.
func (*StreamClient) SubscribeTransactionStatus ¶
func (s *StreamClient) SubscribeTransactionStatus(filterName string, req *geyser_pb.SubscribeRequestFilterTransactions) error
SubscribeTransactionStatus subscribes to transaction status updates.
func (*StreamClient) UnsubscribeAccountDataSlice ¶
func (s *StreamClient) UnsubscribeAccountDataSlice() error
func (*StreamClient) UnsubscribeAccounts ¶
func (s *StreamClient) UnsubscribeAccounts(filterName string, accounts ...string) error
UnsubscribeAccounts unsubscribes specific accounts.
func (*StreamClient) UnsubscribeAccountsByID ¶
func (s *StreamClient) UnsubscribeAccountsByID(filterName string) error
UnsubscribeAccountsByID unsubscribes from account updates by ID.
func (*StreamClient) UnsubscribeAllAccounts ¶
func (s *StreamClient) UnsubscribeAllAccounts(filterName string) error
func (*StreamClient) UnsubscribeBlocks ¶
func (s *StreamClient) UnsubscribeBlocks(filterName string) error
func (*StreamClient) UnsubscribeBlocksMeta ¶
func (s *StreamClient) UnsubscribeBlocksMeta(filterName string) error
func (*StreamClient) UnsubscribeEntry ¶
func (s *StreamClient) UnsubscribeEntry(filterName string) error
func (*StreamClient) UnsubscribeSlots ¶
func (s *StreamClient) UnsubscribeSlots(filterName string) error
UnsubscribeSlots unsubscribes from slot updates.
func (*StreamClient) UnsubscribeTransaction ¶
func (s *StreamClient) UnsubscribeTransaction(filterName string) error
UnsubscribeTransaction unsubscribes from transaction updates.
func (*StreamClient) UnsubscribeTransactionStatus ¶
func (s *StreamClient) UnsubscribeTransactionStatus(filterName string) error