Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func ConnectWithOptions ¶
func ConnectWithOptions(ctx context.Context, rpcEndpoint string, opt *Options) (c *Client, err error)
ConnectWithOptions creates a new websocket client connecting to the provided endpoint with a http header if available The http header can be helpful to pass basic authentication params as prescribed ref https://github.com/gorilla/websocket/issues/209
func (*Client) SlotSubscribe ¶
func (cl *Client) SlotSubscribe() (*SlotSubscription, error)
SlotSubscribe subscribes to receive notification anytime a slot is processed by the validator.
func (*Client) SlotsUpdatesSubscribe ¶
func (cl *Client) SlotsUpdatesSubscribe() (*SlotsUpdatesSubscription, error)
SlotsUpdatesSubscribe (UNSTABLE) subscribes to receive a notification from the validator on a variety of updates on every slot.
This subscription is unstable; the format of this subscription may change in the future and it may not always be supported.
type SlotResult ¶
type SlotSubscription ¶
type SlotSubscription struct {
// contains filtered or unexported fields
}
func (*SlotSubscription) Recv ¶
func (sw *SlotSubscription) Recv() (*SlotResult, error)
func (*SlotSubscription) Unsubscribe ¶
func (sw *SlotSubscription) Unsubscribe()
type SlotsUpdatesResult ¶
type SlotsUpdatesResult struct { // The parent slot. Parent uint64 `json:"parent"` // The newly updated slot. Slot uint64 `json:"slot"` // The Unix timestamp of the update. Timestamp *int64 `json:"timestamp"` // The update type. Type SlotsUpdatesType `json:"type"` // Extra stats provided when a bank is frozen. Stats *BankStats `json:"stats"` }
type SlotsUpdatesSubscription ¶
type SlotsUpdatesSubscription struct {
// contains filtered or unexported fields
}
func (*SlotsUpdatesSubscription) Recv ¶
func (sw *SlotsUpdatesSubscription) Recv() (*SlotsUpdatesResult, error)
func (*SlotsUpdatesSubscription) Unsubscribe ¶
func (sw *SlotsUpdatesSubscription) Unsubscribe()
type SlotsUpdatesType ¶
type SlotsUpdatesType string
const ( SlotsUpdatesFirstShredReceived SlotsUpdatesType = "firstShredReceived" SlotsUpdatesCompleted SlotsUpdatesType = "completed" SlotsUpdatesCreatedBank SlotsUpdatesType = "createdBank" SlotsUpdatesFrozen SlotsUpdatesType = "frozen" SlotsUpdatesDead SlotsUpdatesType = "dead" SlotsUpdatesOptimisticConfirmation SlotsUpdatesType = "optimisticConfirmation" SlotsUpdatesRoot SlotsUpdatesType = "root" )
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
func (*Subscription) Recv ¶
func (s *Subscription) Recv() (interface{}, error)
func (*Subscription) Unsubscribe ¶
func (s *Subscription) Unsubscribe()
Click to show internal directories.
Click to hide internal directories.