stream

package
v0.6.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CacheTopic         = "/block/cache"
	BidTopic           = "/block/bid"
	SlotDeliveredTopic = "/slot/delivered"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BellatrixHeaderWithSlot

type BellatrixHeaderWithSlot struct {
	ExecutionPayloadHeader bellatrix.ExecutionPayloadHeader
	HeaderSlot             uint64
}

func (BellatrixHeaderWithSlot) Header

func (BellatrixHeaderWithSlot) Slot

type CapellaHeaderWithSlot

type CapellaHeaderWithSlot struct {
	ExecutionPayloadHeader capella.ExecutionPayloadHeader
	HeaderSlot             uint64
}

func (CapellaHeaderWithSlot) Header

func (CapellaHeaderWithSlot) Slot

func (b CapellaHeaderWithSlot) Slot() uint64

type Client

type Client struct {
	Logger                log.Logger
	Bids, Cache           PubSub
	QueueSize, NumWorkers int

	Metrics Metrics
	// contains filtered or unexported fields
}

func NewClient

func NewClient(l log.Logger, m *metrics.Metrics, s State, bids, cache PubSub, cfg *config.DistributedConfig) *Client

func (*Client) BlockCache

func (s *Client) BlockCache() <-chan structs.BlockAndTraceExtended

func (*Client) BuilderBid

func (s *Client) BuilderBid() <-chan structs.BuilderBidExtended

func (*Client) Close added in v0.6.2

func (c *Client) Close() error

func (*Client) PublishBlockCache

func (s *Client) PublishBlockCache(ctx context.Context, block structs.BlockAndTraceExtended) error

func (*Client) PublishBuilderBid

func (s *Client) PublishBuilderBid(ctx context.Context, bid structs.BuilderBidExtended) error

func (*Client) PublishSlotDelivered

func (s *Client) PublishSlotDelivered(ctx context.Context, slot structs.Slot) error

type EncoderSSZ

type EncoderSSZ interface {
	MarshalSSZ() ([]byte, error)
}

type HeaderWithSlot

type HeaderWithSlot struct {
	ExecutionPayloadHeader structs.ExecutionPayloadHeader
	HeaderSlot             uint64
}

type Metrics added in v0.6.2

type Metrics interface {
	Register(prometheus.Collector) error
}

type PubSub added in v0.6.2

type PubSub interface {
	String() string
	Publish(context.Context, transport.Message) error
	Subscribe(context.Context) transport.Subscription
}

type State

type State interface {
	ForkVersion(epoch structs.Slot) structs.ForkVersion
	HeadSlot() structs.Slot
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL