Documentation
¶
Index ¶
- func All(ops ...func() bool) (r bool)
- func Either(ops ...func() bool) (r bool)
- func RaiseCause(forward_trace *trace.Forwardtrace, first_backtrace_point *trace.BacktracePoint)
- type BacktraceDomainChain
- type Event
- func (e *Event) Catch(f func(e *Event)) *Event
- func (existing_event *Event) Contain(added_backtrace_point *trace.BacktracePoint) *Event
- func (e *Event) Error() string
- func (e *Event) OK(f func(e *Event)) *Event
- func (existing_event *Event) Reraise(added_backtrace_point *trace.BacktracePoint)
- func (e *Event) String() string
- func (existing_event *Event) Wrap(added_backtrace_point *trace.BacktracePoint) *Event
- type FullBacktrace
- type KeyedTable
- type MatchCase
- type MatchTable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RaiseCause ¶ added in v1.81.0
func RaiseCause(forward_trace *trace.Forwardtrace, first_backtrace_point *trace.BacktracePoint)
Example usage: controlflow.RaiseCause(tracer.GetForwardtrace(), trace.BacktracePointf("123123", "the cause")) controlflow.RaiseCause(nil, trace.BacktracePointf("123123", "the cause"))
Types ¶
type BacktraceDomainChain ¶ added in v1.81.0
type BacktraceDomainChain []*trace.BacktracePoint
First element is most specific, last ones are least specific - this is the inverse of forwardtrace tags;
func (BacktraceDomainChain) Last ¶ added in v1.81.0
func (b BacktraceDomainChain) Last(neg_i int) *trace.BacktracePoint
E.g. to get the one before last, use Last(-2); The purpose is to easily get the last thing. Also used internally
type Event ¶ added in v1.81.0
type Event struct {
RetryAttemptNb int
Forwardtrace *trace.Forwardtrace
Backtrace FullBacktrace
}
func NewEvent ¶ added in v1.81.0
func NewEvent(forward_trace *trace.Forwardtrace, first_backtrace_point *trace.BacktracePoint) *Event
Example usage: controlflow.RaiseCause(tracer.GetForwardtrace(), trace.BacktracePointf("123123", "the cause")) controlflow.RaiseCause(nil, trace.BacktracePointf("123123", "the cause"))
func (*Event) Contain ¶ added in v1.81.0
func (existing_event *Event) Contain(added_backtrace_point *trace.BacktracePoint) *Event
Creates new domain chain on the backtrace
func (*Event) Reraise ¶ added in v1.81.0
func (existing_event *Event) Reraise(added_backtrace_point *trace.BacktracePoint)
type FullBacktrace ¶ added in v1.81.0
type FullBacktrace []*BacktraceDomainChain
First element is most specific, last ones are least specific - this is the inverse of forwardtrace tags;
func (FullBacktrace) Last ¶ added in v1.81.0
func (b FullBacktrace) Last(neg_i int) *BacktraceDomainChain
E.g. to get the one before last, use Last(-2); The purpose is to easily get the last thing. Also used internally
type KeyedTable ¶
type KeyedTable[T comparable] map[T]func() int // -1 break/complete
func (KeyedTable[T]) Sequence ¶
func (t KeyedTable[T]) Sequence(keys ...T)
func (KeyedTable[T]) Switch ¶
func (t KeyedTable[T]) Switch(primary, default_ T)