trigger

package
v0.0.0-...-ed06964 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTriggererTypeNotRegistered = errors.New("triggerer type not found")

Functions

This section is empty.

Types

type Options

type Options struct {
	TraceID trace.TraceID
	SpanID  trace.SpanID
	TestID  id.ID
}

type Registry

type Registry struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewRegistry

func NewRegistry(tracer trace.Tracer) *Registry

func (*Registry) Add

func (r *Registry) Add(t Triggerer)

func (*Registry) Get

func (r *Registry) Get(triggererType trigger.TriggerType) (Triggerer, error)

type Response

type Response struct {
	SpanAttributes map[string]string
	Result         trigger.TriggerResult
	TraceID        trace.TraceID
	SpanID         trace.SpanID
}

type Triggerer

type Triggerer interface {
	Trigger(context.Context, trigger.Trigger, *Options) (Response, error)
	Type() trigger.TriggerType
}

func GRPC

func GRPC() Triggerer

func HTTP

func HTTP() Triggerer

func Instrument

func Instrument(tracer trace.Tracer, wrapped Triggerer) Triggerer

func KAFKA

func KAFKA() Triggerer

func TRACEID

func TRACEID() Triggerer

Jump to

Keyboard shortcuts

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