event

package
v0.34.7 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// StepType is a string type representation of step event
	StepType = "dev.knative.eventing.wathola.step"
	// FinishedType os a string type representation of finished event
	FinishedType = "dev.knative.eventing.wathola.finished"
)
View Source
const FinishedEventPrefix = "finish event"
View Source
const ZipkinTracesEndpoint = "http://localhost:9411/api/v2/traces"

Variables

This section is empty.

Functions

func FindTrace added in v0.29.2

func FindTrace(annotationQuery string) ([]byte, error)

FindTrace fetches tracing endpoint and retrieves Zipkin traces matching the annotation query.

func SendTraceQuery added in v0.29.2

func SendTraceQuery(endpoint string, annotationQuery string) ([][]model.SpanModel, error)

SendTraceQuery sends the query to the tracing endpoint and returns all spans matching the query.

Types

type ErrorStore

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

ErrorStore contains errors that was thrown

func NewErrorStore

func NewErrorStore() *ErrorStore

NewErrorStore creates a new error store

type Finished

type Finished struct {
	EventsSent         int
	TotalRequests      int
	UnavailablePeriods []UnavailablePeriod
}

Finished is step call after verification finishes

func (Finished) Type

func (f Finished) Type() string

Type returns a type of a event

type FinishedStore

type FinishedStore interface {
	RegisterFinished(finished *Finished)
	TotalRequests() int
	State() State
	DuplicatedThrown() []string
	MissingThrown() []string
	UnexpectedThrown() []string
	UnavailableThrown() []string
}

FinishedStore registers a finished event type

func NewFinishedStore

func NewFinishedStore(steps StepsStore, errors *ErrorStore) FinishedStore

NewFinishedStore creates FinishedStore

type State

type State int

State defines a state of event store

const (
	// Active == 1 (iota has been reset)
	Active State = 1 << iota
	// Success == 2
	Success State = 1 << iota
	// Failed == 4
	Failed State = 1 << iota
)

type Step

type Step struct {
	Number int
}

Step is a event call at each step of verification

func (Step) Type

func (s Step) Type() string

Type returns a type of a event

type StepsStore

type StepsStore interface {
	RegisterStep(step *Step)
	Count() int
}

StepsStore contains methods that register step event type

func NewStepsStore

func NewStepsStore(errors *ErrorStore) StepsStore

NewStepsStore creates StepsStore

type Typed

type Typed interface {
	Type() string
}

Typed says a type of an event

type UnavailablePeriod added in v0.32.0

type UnavailablePeriod struct {
	Step    *Step
	Period  time.Duration
	LastErr string
}

UnavailablePeriod tracks for the given step event how long it could not be sent.

Jump to

Keyboard shortcuts

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