Documentation ¶
Index ¶
- type Arguments
- type BaseMessageRequest
- type BaseMessageResponse
- type BlockDigestMessageResponse
- type BlockHeaderMessageResponse
- type BlockMessageResponse
- type ListSubscriptionsMessageRequest
- type ListSubscriptionsMessageResponse
- type SubscribeMessageRequest
- type SubscribeMessageResponse
- type SubscriptionEntry
- type UnsubscribeMessageRequest
- type UnsubscribeMessageResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseMessageRequest ¶
type BaseMessageRequest struct {
Action string `json:"action"` // Action type of the request
}
BaseMessageRequest represents a base structure for incoming messages.
type BaseMessageResponse ¶
type BaseMessageResponse struct { Action string `json:"action,omitempty"` // Action type of the response Success bool `json:"success"` // Indicates success or failure ErrorMessage string `json:"error_message,omitempty"` // Error message, if any }
BaseMessageResponse represents a base structure for outgoing messages.
type BlockDigestMessageResponse ¶
type BlockDigestMessageResponse struct { // The sealed or finalized block digest according to the block status // in the request. Block *flow.BlockDigest `json:"block_digest"` }
BlockDigestMessageResponse is the response message for 'block_digests' topic.
type BlockHeaderMessageResponse ¶
type BlockHeaderMessageResponse struct { // The sealed or finalized block headers according to the block status // in the request. Header *flow.Header `json:"header"` }
BlockHeaderMessageResponse is the response message for 'block_headers' topic.
type BlockMessageResponse ¶
type BlockMessageResponse struct { // The sealed or finalized blocks according to the block status // in the request. Block *flow.Block `json:"block"` }
BlockMessageResponse is the response message for 'blocks' topic.
type ListSubscriptionsMessageRequest ¶
type ListSubscriptionsMessageRequest struct {
BaseMessageRequest
}
ListSubscriptionsMessageRequest represents a request to list active subscriptions.
type ListSubscriptionsMessageResponse ¶
type ListSubscriptionsMessageResponse struct { BaseMessageResponse Subscriptions []*SubscriptionEntry `json:"subscriptions,omitempty"` }
ListSubscriptionsMessageResponse is the structure used to respond to list_subscriptions requests. It contains a list of active subscriptions for the current WebSocket connection.
type SubscribeMessageRequest ¶
type SubscribeMessageRequest struct { BaseMessageRequest Topic string `json:"topic"` // Topic to subscribe to Arguments Arguments `json:"arguments"` // Additional arguments for subscription }
SubscribeMessageRequest represents a request to subscribe to a topic.
type SubscribeMessageResponse ¶
type SubscribeMessageResponse struct { BaseMessageResponse Topic string `json:"topic"` // Topic of the subscription ID string `json:"id"` // Unique subscription ID }
SubscribeMessageResponse represents the response to a subscription request.
type SubscriptionEntry ¶
type SubscriptionEntry struct { Topic string `json:"topic,omitempty"` // Topic of the subscription ID string `json:"id,omitempty"` // Unique subscription ID }
SubscriptionEntry represents an active subscription entry.
type UnsubscribeMessageRequest ¶
type UnsubscribeMessageRequest struct { BaseMessageRequest ID string `json:"id"` // Unique subscription ID }
UnsubscribeMessageRequest represents a request to unsubscribe from a topic.
type UnsubscribeMessageResponse ¶
type UnsubscribeMessageResponse struct { BaseMessageResponse ID string `json:"id"` // Unique subscription ID }
UnsubscribeMessageResponse represents the response to an unsubscription request.