mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 04:54:05 -05:00
* sse implementation that sheds stuck clients * Radek and James feedback * Refactor event streamer code for readability * less-flaky test signaling * test case where queue fills; fixes * add changelog entry * james and preston feedback * swap our Subscription interface with an alias * event.Data can be nil for the payload attr event * deepsource --------- Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
26 lines
967 B
Go
26 lines
967 B
Go
// Package events defines a gRPC events service implementation,
|
|
// following the official API standards https://ethereum.github.io/beacon-apis/#/.
|
|
// This package includes the events endpoint.
|
|
package events
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/prysmaticlabs/prysm/v5/beacon-chain/blockchain"
|
|
"github.com/prysmaticlabs/prysm/v5/beacon-chain/cache"
|
|
opfeed "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/feed/operation"
|
|
statefeed "github.com/prysmaticlabs/prysm/v5/beacon-chain/core/feed/state"
|
|
)
|
|
|
|
// Server defines a server implementation of the gRPC events service,
|
|
// providing RPC endpoints to subscribe to events from the beacon node.
|
|
type Server struct {
|
|
StateNotifier statefeed.Notifier
|
|
OperationNotifier opfeed.Notifier
|
|
HeadFetcher blockchain.HeadFetcher
|
|
ChainInfoFetcher blockchain.ChainInfoFetcher
|
|
TrackedValidatorsCache *cache.TrackedValidatorsCache
|
|
KeepAliveInterval time.Duration
|
|
EventFeedDepth int
|
|
}
|