Documentation ¶
Overview ¶
Package sse is the SSE Client for preconf-share
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { Data *MatchMakerEvent // Will be nil if an error occurred during poll Error error }
Event represents a matchmaker event sent from sse subscription
type InternalClient ¶
type InternalClient struct {
BaseURL string // BaseURL is the base URL for the matchmaker
}
InternalClient is a client for the matchmaker
func (*InternalClient) Subscribe ¶
func (c *InternalClient) Subscribe(eventChan chan<- Event) (SSESubscription, error)
Subscribe to matchmaker events and returns a type that can be used to control the subscription
type MatchMakerEvent ¶
type MatchMakerEvent struct { Hash common.Hash `json:"hash"` Logs []types.Log `json:"logs,omitempty"` Txs []PendingTransaction `json:"txs,omitempty"` }
MatchMakerEvent represents the pending transaction hints sent by matchmaker
type PendingTransaction ¶
type PendingTransaction struct { To common.Address `json:"to"` FunctionSelector [4]byte `json:"functionSelector,omitempty"` CallData []byte `json:"callData,omitempty"` MevGasPrice *hexutil.Big `json:"mevGasPrice,omitempty"` GasUsed *hexutil.Big `json:"gasUsed,omitempty"` }
PendingTransaction represents the hits revealed by the matchmaker about the transaction / bundle
type SSEClient ¶
type SSEClient interface { // Subscribe to events and returns a subscription Subscribe(eventChan chan<- Event) (SSESubscription, error) }
SSEClient is the SSE Client abstraction
type SSESubscription ¶
type SSESubscription interface {
// To stop the subscription
Stop()
}
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
Subscription represents a subscription to matchmaker events
func (*Subscription) Stop ¶
func (s *Subscription) Stop()
Stop stops the subscription to matchmaker events
Click to show internal directories.
Click to hide internal directories.