Documentation ¶
Index ¶
- func AddOptions(opts ...Option)
- func SetOptions(opts ...Option)
- type Assert
- type AssertGroup
- type Group
- type LogT
- func (t LogT) Collect(filters ...logq.FilterFunc) Records
- func (t LogT) Finish() Records
- func (t LogT) Scope(fn func(lgt LogT)) Records
- func (t LogT) Start() LogT
- func (t LogT) T() *testing.T
- func (t LogT) Wait(opts ...logwait.Option) Records
- func (t LogT) WithCollectFilter(filters ...logq.FilterFunc) LogT
- func (t LogT) WithOptions(opts ...Option) LogT
- func (t LogT) WithT(tt *testing.T) LogT
- func (t LogT) WithWaitContext(ctx context.Context) LogT
- func (t LogT) WithWaitTimeout(timeout time.Duration) LogT
- type Option
- type Records
- func (f Records) And(operands ...genq.FilterFunc[logq.Record]) Records
- func (f Records) Assert() Assert
- func (f Records) Attr(key string, value any) Records
- func (f Records) Group(fn genq.GroupFunc[string, logq.Record]) Group[string]
- func (f Records) Message(msg string) Records
- func (f Records) Or(operands ...genq.FilterFunc[logq.Record]) Records
- func (f Records) Records() logq.Records
- func (f Records) Require() Require
- func (f Records) Where(operands ...genq.FilterFunc[logq.Record]) Records
- type Require
- type RequireGroup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddOptions ¶
func AddOptions(opts ...Option)
func SetOptions ¶
func SetOptions(opts ...Option)
Types ¶
type AssertGroup ¶
type AssertGroup[K comparable] struct { // contains filtered or unexported fields }
type Group ¶
type Group[K comparable] struct { T LogT `chaingen:"-"` // contains filtered or unexported fields }
func (Group[K]) AggregateFlat ¶
func (Group[K]) Assert ¶
func (g Group[K]) Assert() AssertGroup[K]
func (Group[K]) Require ¶
func (g Group[K]) Require() RequireGroup[K]
type LogT ¶
type LogT struct {
// contains filtered or unexported fields
}
func (LogT) WithCollectFilter ¶
func (t LogT) WithCollectFilter(filters ...logq.FilterFunc) LogT
WithCollectFilter sets a collector filter which affects which records are visible to LogT
func (LogT) WithOptions ¶
WithOptions sets new options to LogT
func (LogT) WithWaitContext ¶
WithWaitContext sets a default context for LogT.Wait
type Option ¶
type Option func(o *options)
func WithCollectFilter ¶
func WithCollectFilter(filters ...logq.FilterFunc) Option
WithCollectFilter sets a collector filter which affects which records are visible to LogT
func WithCollector ¶
func WithCollector(collector logcollect.Collector) Option
WithCollector sets a collector for LogT. Collector is required for LogT to function.
func WithWaitContext ¶
WithWaitContext sets a default context for LogT.Wait
func WithWaitTimeout ¶
WithWaitTimeout sets a default timeout for LogT.Wait
type Records ¶
type Records struct { T LogT `chaingen:"-"` // contains filtered or unexported fields }
type RequireGroup ¶
type RequireGroup[K comparable] struct { // contains filtered or unexported fields }
func (RequireGroup[K]) Count ¶
func (r RequireGroup[K]) Count(expected map[K]int, msgAndArgs ...any)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.