Documentation ¶
Index ¶
- func NewSinkSession[I core.BlockId, F core.Flags](store core.BlockStore[I], statusAccumulator core.StatusAccumulator[I], ...) *core.SinkSession[I, F]
- func NewSourceSession[I core.BlockId, F core.Flags](store core.BlockStore[I], filter filter.Filter[I], ...) *core.SourceSession[I, F]
- func NewStatusReceiver[I core.BlockId, F core.Flags](statusReceiver core.StatusReceiver[I], stats stats.Stats) core.StatusReceiver[I]
- type BlockSender
- type BlockStore
- func (ibs *BlockStore[I]) Add(ctx context.Context, rawBlock core.RawBlock[I]) (core.Block[I], error)
- func (ibs *BlockStore[I]) AddMany(ctx context.Context, rawBlocks []core.RawBlock[I]) ([]core.Block[I], error)
- func (ibs *BlockStore[I]) All(ctx context.Context) (<-chan I, error)
- func (ibs *BlockStore[I]) Get(ctx context.Context, id I) (core.Block[I], error)
- func (ibs *BlockStore[I]) Has(ctx context.Context, id I) (bool, error)
- type InstrumentationOptions
- type Orchestrator
- type StatusReceiver
- type StatusSender
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSinkSession ¶
func NewSinkSession[I core.BlockId, F core.Flags]( store core.BlockStore[I], statusAccumulator core.StatusAccumulator[I], orchestrator core.Orchestrator[F], stats stats.Stats, options InstrumentationOptions, maxBlocksPerRound uint32, requester bool, ) *core.SinkSession[I, F]
func NewSourceSession ¶
func NewSourceSession[I core.BlockId, F core.Flags](store core.BlockStore[I], filter filter.Filter[I], orchestrator core.Orchestrator[F], stats stats.Stats, options InstrumentationOptions, maxBlocksPerRound uint32, maxBlocksPerColdCall uint32, requester bool) *core.SourceSession[I, F]
func NewStatusReceiver ¶
func NewStatusReceiver[I core.BlockId, F core.Flags](statusReceiver core.StatusReceiver[I], stats stats.Stats) core.StatusReceiver[I]
NewStatusReceiver returns a new StatusReceiver instance.
Types ¶
type BlockSender ¶
BlockSender is a BlockSender that records stats for events.
func NewBlockSender ¶
func NewBlockSender[I core.BlockId](blockSender core.BlockSender[I], stats stats.Stats) *BlockSender[I]
NewBlockSender returns a new BlockSender instance.
func (*BlockSender[I]) Close ¶
func (ibs *BlockSender[I]) Close() error
Close calls the underlying block sender's Close method and records stats.
func (*BlockSender[I]) Flush ¶
func (ibs *BlockSender[I]) Flush() error
Flush calls the underlying block sender's Flush method and records stats.
func (*BlockSender[I]) Len ¶
func (ibs *BlockSender[I]) Len() int
Len calls the underlying block sender's Len method and records stats.
type BlockStore ¶
BlockStore is a BlockStore that records stats for events.
func NewBlockStore ¶
func NewBlockStore[I core.BlockId](store core.BlockStore[I], stats stats.Stats) *BlockStore[I]
NewBlockStore returns a new BlockStore instance.
func (*BlockStore[I]) Add ¶
func (ibs *BlockStore[I]) Add(ctx context.Context, rawBlock core.RawBlock[I]) (core.Block[I], error)
Add calls the underlying block store's Add method and records stats.
func (*BlockStore[I]) All ¶
func (ibs *BlockStore[I]) All(ctx context.Context) (<-chan I, error)
All calls the underlying block store's All method and records stats.
type InstrumentationOptions ¶
type InstrumentationOptions uint8
const ( INSTRUMENT_STORE InstrumentationOptions = 1 << iota INSTRUMENT_ORCHESTRATOR INSTRUMENT_FILTER INSTRUMENT_SENDER )
type Orchestrator ¶
Orchestrator is an Orchestrator that records stats for events.
func NewOrchestrator ¶
func NewOrchestrator[F core.Flags](orchestrator core.Orchestrator[F], stats stats.Stats) *Orchestrator[F]
NewOrchestrator returns a new Orchestrator instance.
func (*Orchestrator[F]) IsClosed ¶
func (io *Orchestrator[F]) IsClosed() bool
IsClosed calls the underlying orchestrator's IsClosed method and records stats.
func (*Orchestrator[F]) IsRequester ¶
func (io *Orchestrator[F]) IsRequester() bool
IsRequester calls the underlying orchestrator's IsRequester method and records stats.
func (*Orchestrator[F]) IsSafeStateToClose ¶
func (io *Orchestrator[F]) IsSafeStateToClose() bool
func (*Orchestrator[F]) Notify ¶
func (io *Orchestrator[F]) Notify(event core.SessionEvent) error
Notify calls the underlying orchestrator's Notify method and records stats.
func (*Orchestrator[F]) ShouldFlush ¶
func (io *Orchestrator[F]) ShouldFlush() bool
func (*Orchestrator[F]) State ¶
func (io *Orchestrator[F]) State() F
State calls the underlying orchestrator's State method and records stats.
type StatusReceiver ¶
StatusReceiver is a StatusReceiver that records stats for events.
func (*StatusReceiver[I]) HandleStatus ¶
func (ir *StatusReceiver[I]) HandleStatus(have filter.Filter[I], want []I)
HandleStatus calls the underlying status receiver's HandleStatus method and records stats.
type StatusSender ¶
StatusSender is a StatusSender that records stats for events.
func NewStatusSender ¶
func NewStatusSender[I core.BlockId](statusSender core.StatusSender[I], stats stats.Stats) *StatusSender[I]
NewStatusSender returns a new StatusSender instance.
func (*StatusSender[I]) Close ¶
func (ibs *StatusSender[I]) Close() error
Close calls the underlying status sender's Close method and records stats.
func (*StatusSender[I]) SendStatus ¶
func (ibs *StatusSender[I]) SendStatus(have filter.Filter[I], want []I) error
SendStatus calls the underlying status sender's SendStatus method and records stats.