trace

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(ctx context.Context, key string) string

func With

func With(ctx context.Context, key, value string) context.Context

func WithJob

func WithJob(ctx context.Context, trace JobTrace) context.Context

func WithPattern

func WithPattern(ctx context.Context, trace PatternTrace) context.Context

func WithPatternGroup

func WithPatternGroup(ctx context.Context, trace PatternGroupTrace) context.Context

func WithSchedule

func WithSchedule(ctx context.Context, trace ScheduleTrace) context.Context

func WithStep

func WithStep(ctx context.Context, trace StepTrace) context.Context

Types

type EventInfo

type EventInfo struct{}

type JobTrace

type JobTrace struct {
	WireJob    func(index int, job *wire.Job)
	WirePlugin func(index int, plugin *wire.Plugin, impl any)
	WireStep   func(index int, step *wire.Step, impl any)
	RunStep    func()

	MatchStep  func()
	TapMessage func()

	Step func(id string) StepTrace
}

func ContextJob

func ContextJob(ctx context.Context) JobTrace

func LogJob

func LogJob() JobTrace

type Message

type Message interface {
	Bytes() []byte
	Object() any
}

type PatternGroupTrace

type PatternGroupTrace struct {
	Pattern func(key string) PatternTrace
}

func ContextPatternGroup

func ContextPatternGroup(ctx context.Context) PatternGroupTrace

type PatternTrace

type PatternTrace struct {
	ParseKey       func(context.Context, *gojq.Query, error)
	UnmarshalValue func(context.Context, []byte, any, error)
	TemplateValue  func(context.Context, string, *template.Template, error)
	ExecuteMatch   func(context.Context, []byte, []byte, error)
	UnmarshalMatch func(context.Context, []byte, any, error)
	EqualMatch     func(context.Context, any, any, bool)
	MatchTimeout   func(context.Context)
}

func ContextPattern

func ContextPattern(ctx context.Context) PatternTrace

func LogPattern

func LogPattern() PatternTrace

func NopPattern

func NopPattern() PatternTrace

func (PatternTrace) Join

func (pt PatternTrace) Join(extra PatternTrace) PatternTrace

type ScheduleTrace

type ScheduleTrace struct {
	BeforePublish func(context.Context, *wire.Message)
	Publish       func(context.Context, *wire.Message)
	BeforeStop    func(context.Context, int)
	Stop          func(context.Context, int)
	BeforeDemux   func(context.Context, Message)
	Demux         func(context.Context, Message)
	BeforeMux     func(context.Context, Message, int)
	Mux           func(context.Context, Message, int)
	Wait          func(context.Context, Message, int, bool)
	Done          func(context.Context, Message, int)
	Drain         func(context.Context, int)
}

func ContextSchedule

func ContextSchedule(ctx context.Context) ScheduleTrace

func LogSchedule

func LogSchedule() ScheduleTrace

type StepTrace

type StepTrace struct {
	PatternGroup func(step, name string) PatternGroupTrace
}

func ContextStep

func ContextStep(ctx context.Context) StepTrace

type Trace

type Trace struct{}

Jump to

Keyboard shortcuts

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