journal

package
v0.0.0-...-05bc493 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dispenser

type Dispenser struct {
	// contains filtered or unexported fields
}

func (*Dispenser) EnsureSubscription

func (p *Dispenser) EnsureSubscription()

EnsureSubscription should be used after Subscribe to guarantee that there is no unprocessed events. LOCK! Will cause deadlock when invoked inside an event handler.

func (*Dispenser) EventInput

func (*Dispenser) Merge

func (p *Dispenser) Merge(other *Dispenser)

func (*Dispenser) Stop

func (p *Dispenser) Stop()

func (*Dispenser) Subscribe

func (p *Dispenser) Subscribe(outFn predicate.SubscriberFunc)

type FeedFunc

type FeedFunc = predicate.SubscriberFunc

type Feeder

type Feeder struct {
	// contains filtered or unexported fields
}

func NewFeeder

func NewFeeder(underlying smachine.SlotMachineLogger, feedFn FeedFunc, stopSignal synckit.SignalChannel) *Feeder

func (*Feeder) Start

func (p *Feeder) Start(stopSignal synckit.SignalChannel)

type Journal

type Journal struct {
	// contains filtered or unexported fields
}

func New

func New() *Journal

func (*Journal) InterceptSlotMachineLog

func (p *Journal) InterceptSlotMachineLog(underlying smachine.SlotMachineLogger, stopSignal synckit.SignalChannel) smachine.SlotMachineLogger

func (*Journal) ReplayAndSubscribe

func (p *Journal) ReplayAndSubscribe(outFn predicate.SubscriberFunc)

func (*Journal) ReplayAndWait

func (p *Journal) ReplayAndWait(pFn predicate.Func) synckit.SignalChannel

func (*Journal) ReplayAndWaitOnce

func (p *Journal) ReplayAndWaitOnce(pFn predicate.Func) synckit.SignalChannel

func (*Journal) ReplayAndWaitStopOf

func (p *Journal) ReplayAndWaitStopOf(sample smachine.StateMachine, stopCount int) synckit.SignalChannel

func (*Journal) StartRecording

func (p *Journal) StartRecording(limit int, discardOnOverflow bool)

func (*Journal) Subscribe

func (p *Journal) Subscribe(outFn predicate.SubscriberFunc)

func (*Journal) TryReplayThenSubscribe

func (p *Journal) TryReplayThenSubscribe(outFn predicate.SubscriberFunc) bool

func (*Journal) Wait

func (*Journal) WaitAllAsyncCallsDone

func (p *Journal) WaitAllAsyncCallsDone() synckit.SignalChannel

func (*Journal) WaitInitOf

func (p *Journal) WaitInitOf(sample smachine.StateMachine, initCount int) synckit.SignalChannel

func (*Journal) WaitOnce

func (p *Journal) WaitOnce(pFn predicate.Func) synckit.SignalChannel

func (*Journal) WaitStopOf

func (p *Journal) WaitStopOf(sample smachine.StateMachine, stopCount int) synckit.SignalChannel

type Replay

type Replay struct {
	// contains filtered or unexported fields
}

func NewReplay

func NewReplay(parent *Dispenser, size int) *Replay

func (*Replay) Count

func (p *Replay) Count() int

func (*Replay) DiscardNow

func (p *Replay) DiscardNow()

func (*Replay) EventInput

func (*Replay) Get

func (p *Replay) Get(i int) debuglogger.UpdateEvent

func (*Replay) Parent

func (p *Replay) Parent() *Dispenser

func (*Replay) ReplayAndSubscribe

func (p *Replay) ReplayAndSubscribe(outFn predicate.SubscriberFunc)

func (*Replay) SetDiscardOnOverflow

func (p *Replay) SetDiscardOnOverflow()

func (*Replay) State

func (p *Replay) State() (count int, isOverflown bool)

func (*Replay) TryReplayThenSubscribe

func (p *Replay) TryReplayThenSubscribe(outFn predicate.SubscriberFunc) bool

Jump to

Keyboard shortcuts

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