transform

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package transform provides some intermediate nodes that might filter/process/transform the events

Index

Constants

View Source
const (
	// UnmatchUnset leaves the Route field as empty
	UnmatchUnset = UnmatchType("unset")
	// UnmatchPath sets the Route field to the same values as the Path
	UnmatchPath = UnmatchType("path")
	// UnmatchWildcard sets the route field to a generic asterisk symbol
	UnmatchWildcard = UnmatchType("wildcard")

	UnmatchDefault = UnmatchWildcard
)

Variables

This section is empty.

Functions

func ConvertToSpan

func ConvertToSpan(in <-chan []any, out chan<- []HTTPRequestSpan)

Types

type EventType added in v0.0.1

type EventType int
const (
	EventTypeHTTP EventType = iota + 1
	EventTypeGRPC
	EventTypeHTTPClient
	EventTypeGRPCClient
)

type HTTPRequestSpan

type HTTPRequestSpan struct {
	Type          EventType
	ID            uint64
	Method        string
	Path          string
	Route         string
	Peer          string
	Host          string
	HostPort      int
	Status        int
	ContentLength int64
	RequestStart  int64
	Start         int64
	End           int64
	ServiceName   string
}

HTTPRequestSpan contains the information being submitted by the following nodes in the graph. It enables confortable handling of data from Go.

func (*HTTPRequestSpan) Inside added in v0.0.1

func (s *HTTPRequestSpan) Inside(parent *HTTPRequestSpan) bool

func (*HTTPRequestSpan) Timings added in v0.0.1

func (s *HTTPRequestSpan) Timings() Timings

type RoutesConfig

type RoutesConfig struct {
	// Unmatch specifies what to do when a route pattern is not matched
	Unmatch UnmatchType `yaml:"unmatch"`
	// Patterns of the paths that will match to a route
	Patterns []string `yaml:"patterns"`
}

RoutesConfig allows grouping URLs sharing a given pattern.

type Timings added in v0.0.1

type Timings struct {
	RequestStart time.Time
	Start        time.Time
	End          time.Time
}

type UnmatchType

type UnmatchType string

UnmatchType defines which actions to do when a route pattern is not recognized

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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