Documentation ¶
Index ¶
- Variables
- type AccountResult
- type Client
- func (c *Client) AccountSubscribe(ctx context.Context, account string, commitment rpc.CommitmentType) error
- func (c *Client) AccountSubscribeWithOpts(ctx context.Context, account string, commitment rpc.CommitmentType, ...) error
- func (c *Client) Close()
- func (c *Client) Connect(ctx context.Context) (err error)
- func (c *Client) ConnectWithOptions(ctx context.Context, opt *Options) (err error)
- func (c *Client) GetSubscriptions() map[uint64]struct{}
- func (c *Client) Messages() <-chan MessageWS
- type Connection
- type Logger
- type MessageError
- type MessageWS
- type Options
- type SubscriptionMeta
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultHandshakeTimeout = 45 * time.Second
View Source
var ErrReachedMaxConnectionsLimit = fmt.Errorf("reached max connections limit")
View Source
var ErrReachedMaxSubscriptionsLimit = fmt.Errorf("reached max subscriptions limit")
View Source
var ErrReachedMaxSubscriptionsPerClientLimit = fmt.Errorf("reached max subscriptions per client limit")
Functions ¶
This section is empty.
Types ¶
type AccountResult ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AccountSubscribe ¶
func (c *Client) AccountSubscribe( ctx context.Context, account string, commitment rpc.CommitmentType, ) error
AccountSubscribe subscribes to an account to receive notifications when the lamports or data for a given account public key changes.
func (*Client) AccountSubscribeWithOpts ¶
func (c *Client) AccountSubscribeWithOpts( ctx context.Context, account string, commitment rpc.CommitmentType, encoding solana.EncodingType, ) error
AccountSubscribe subscribes to an account to receive notifications when the lamports or data for a given account public key changes.
func (*Client) Connect ¶
Connect creates a new websocket client connecting to the provided endpoint.
func (*Client) ConnectWithOptions ¶
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) GetSubscriptions ¶
type Connection ¶
func NewConnection ¶
func NewConnection(conn *websocket.Conn, maxSubscriptions int, logger Logger) *Connection
func (*Connection) Close ¶
func (c *Connection) Close()
func (*Connection) ID ¶
func (c *Connection) ID() uint64
type MessageError ¶
type MessageError struct {
// contains filtered or unexported fields
}
type SubscriptionMeta ¶
Click to show internal directories.
Click to hide internal directories.