predicate

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AfterAnyStopOrError

func AfterAnyStopOrError(event debuglogger.UpdateEvent) bool

func AfterInit

func AfterInit(event debuglogger.UpdateEvent) bool

func OnAnyRecycle

func OnAnyRecycle(event debuglogger.UpdateEvent) bool

Types

type AsyncCounter

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

func NewAnyAsyncCounter

func NewAnyAsyncCounter() *AsyncCounter

func NewAsyncCounter

func NewAsyncCounter(adapter smachine.AdapterID) *AsyncCounter

func (*AsyncCounter) AfterPositiveToZero

func (p *AsyncCounter) AfterPositiveToZero(event debuglogger.UpdateEvent) bool

func (*AsyncCounter) Count

func (p *AsyncCounter) Count() int

func (*AsyncCounter) EventInput

func (p *AsyncCounter) EventInput(event debuglogger.UpdateEvent) SubscriberState

type Counter

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

func NewCounter

func NewCounter(predicateFn Func, initCount int) *Counter

func (*Counter) AfterPositiveToZero

func (p *Counter) AfterPositiveToZero(event debuglogger.UpdateEvent) bool

func (*Counter) Count

func (p *Counter) Count() int

func (*Counter) EventInput

func (p *Counter) EventInput(event debuglogger.UpdateEvent) SubscriberState

type Func

type Func = func(debuglogger.UpdateEvent) bool

func AfterAnyMigrate

func AfterAnyMigrate() Func

func AfterAnyStep

func AfterAnyStep() Func

func AfterAsyncCall

func AfterAsyncCall(id smachine.AdapterID) Func

func AfterCustomEvent

func AfterCustomEvent(fn func(interface{}) bool) Func

func AfterCustomEventType

func AfterCustomEventType(tp reflect.Type) Func

func AfterMigrate

func AfterMigrate(fn smachine.MigrateFunc) Func

func AfterResultOfFirstAsyncCall

func AfterResultOfFirstAsyncCall(id smachine.AdapterID) Func

func AfterStep

func AfterStep(fn smachine.StateFunc) Func

func AfterStepExt

func AfterStepExt(s smachine.SlotStep) Func

func AfterStepName

func AfterStepName(name string) Func

func AfterTestString

func AfterTestString(marker string) Func

func And

func And(predicates ...Func) Func

func BeforeStep

func BeforeStep(fn smachine.StateFunc) Func

func BeforeStepExt

func BeforeStepExt(s smachine.SlotStep) Func

func BeforeStepName

func BeforeStepName(name string) Func

func ChainOf

func ChainOf(predicates ...Func) Func

ChainOf will wait for all predicates to fire on different steps for example: ChainOf(X1, X2, X3) will wait for: * predicate X1 eventually to return true * predicate X2 eventually to return true (no more checks of X1 ever) * and predicate X3 eventually to return true (no checks of X1 and X2) and only then it'll return true

func Ever

func Ever() Func

func Never

func Never() Func

func NewSMTypeFilter

func NewSMTypeFilter(sample smachine.StateMachine, andPredicate Func) Func

func Not

func Not(predicate Func) Func

func Or

func Or(predicates ...Func) Func

type SlotLinkFilter

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

func NewSlotLinkFilter

func NewSlotLinkFilter(slotLink smachine.SlotLink) SlotLinkFilter

func (SlotLinkFilter) AfterStop

func (s SlotLinkFilter) AfterStop() Func

func (SlotLinkFilter) IsFromSlot

func (s SlotLinkFilter) IsFromSlot(event debuglogger.UpdateEvent) bool

type SubscriberFunc

type SubscriberFunc = func(debuglogger.UpdateEvent) SubscriberState

func EmitByFilter

func EmitByFilter(predicateFn func(debuglogger.UpdateEvent) bool, canClose bool, outSink synckit.ClosableSignalChannel) SubscriberFunc

func EmitOnce

func EmitOnce(predicateFn func(debuglogger.UpdateEvent) bool, canClose bool, outSink synckit.ClosableSignalChannel) SubscriberFunc

func Filter

func Filter(predicateFn func(debuglogger.UpdateEvent) bool, outFn SubscriberFunc) SubscriberFunc

func Once

func Once(predicateFn func(debuglogger.UpdateEvent) bool, outFn SubscriberFunc) SubscriberFunc

type SubscriberState

type SubscriberState bool
const (
	RemoveSubscriber SubscriberState = false
	RetainSubscriber SubscriberState = true
)

Jump to

Keyboard shortcuts

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