Documentation ¶
Index ¶
- Variables
- type BellatrixStreamBlock
- type CapellaStreamBlock
- type Client
- func (s *Client) AttachMetrics(m *metrics.Metrics)
- func (s *Client) PublishBlockSubmission(ctx context.Context, block structs.BlockBidAndTrace) error
- func (s *Client) PublishCacheBlock(ctx context.Context, block structs.BlockBidAndTrace) error
- func (s *Client) PublishSlotDelivered(ctx context.Context, slot structs.Slot) error
- func (s *Client) RunBlockSubscriber(ctx context.Context, ds Datastore, blocks chan []byte) error
- func (s *Client) RunSlotDeliveredSubscriber(ctx context.Context, slots chan []byte) error
- func (s *Client) RunSubscriberParallel(ctx context.Context, ds Datastore, num uint) error
- func (s *Client) SlotDeliveredChan() <-chan structs.Slot
- type Datastore
- type ForkVersionFormat
- type GenericStreamBlock
- type Pubsub
- type SlotDelivered
- type State
- type StreamBlock
- type StreamConfig
- type StreamMetrics
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrDecodeVarint = errors.New("error decoding varint value")
)
Functions ¶
This section is empty.
Types ¶
type BellatrixStreamBlock ¶
type BellatrixStreamBlock struct { bellatrix.BlockBidAndTrace IsBlockCache bool StreamSource string }
func (BellatrixStreamBlock) Block ¶
func (b BellatrixStreamBlock) Block() structs.BlockBidAndTrace
func (BellatrixStreamBlock) CompleteBlock ¶
func (b BellatrixStreamBlock) CompleteBlock() (structs.CompleteBlockstruct, error)
func (BellatrixStreamBlock) IsCache ¶
func (b BellatrixStreamBlock) IsCache() bool
func (BellatrixStreamBlock) Loggable ¶
func (b BellatrixStreamBlock) Loggable() map[string]any
func (BellatrixStreamBlock) Source ¶
func (b BellatrixStreamBlock) Source() string
type CapellaStreamBlock ¶
type CapellaStreamBlock struct { capella.BlockBidAndTrace IsBlockCache bool StreamSource string }
func (CapellaStreamBlock) Block ¶
func (b CapellaStreamBlock) Block() structs.BlockBidAndTrace
func (CapellaStreamBlock) CompleteBlock ¶
func (b CapellaStreamBlock) CompleteBlock() (structs.CompleteBlockstruct, error)
func (CapellaStreamBlock) IsCache ¶
func (b CapellaStreamBlock) IsCache() bool
func (CapellaStreamBlock) Loggable ¶
func (b CapellaStreamBlock) Loggable() map[string]any
func (CapellaStreamBlock) Source ¶
func (b CapellaStreamBlock) Source() string
type Client ¶
type Client struct { Pubsub Pubsub Config StreamConfig Logger log.Logger // contains filtered or unexported fields }
func NewClient ¶
func NewClient(ps Pubsub, cfg StreamConfig) *Client
func (*Client) AttachMetrics ¶
func (*Client) PublishBlockSubmission ¶
func (*Client) PublishCacheBlock ¶
func (*Client) PublishSlotDelivered ¶
func (*Client) RunBlockSubscriber ¶
func (*Client) RunSlotDeliveredSubscriber ¶
func (*Client) RunSubscriberParallel ¶
func (*Client) SlotDeliveredChan ¶
type Datastore ¶
type Datastore interface { PutPayload(context.Context, structs.PayloadKey, structs.BlockBidAndTrace, time.Duration) error CacheBlock(context.Context, structs.PayloadKey, *structs.CompleteBlockstruct) error }
type ForkVersionFormat ¶
type ForkVersionFormat uint64
const ( Unknown ForkVersionFormat = iota AltairJson BellatrixJson CapellaJson )
type GenericStreamBlock ¶
type GenericStreamBlock struct { structs.BlockBidAndTrace IsBlockCache bool StreamSource string }
type SlotDelivered ¶
type SlotDelivered struct {
Slot uint64
}
type StreamBlock ¶
type StreamBlock interface { Block() structs.BlockBidAndTrace CompleteBlock() (structs.CompleteBlockstruct, error) IsCache() bool Source() string Loggable() map[string]any }
type StreamConfig ¶
type StreamMetrics ¶
type StreamMetrics struct { StreamRecvCounter *prometheus.CounterVec Timing *prometheus.HistogramVec }
Click to show internal directories.
Click to hide internal directories.