store

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTooManyItems = errors.New("too many items")
)

Functions

This section is empty.

Types

type Callback

type Callback func(e *Edge)

type Edge

type Edge struct {
	TraceID                            string
	ServerService, ClientService       string
	ServerLatencySec, ClientLatencySec float64

	// If either the client or the server spans have status code error,
	// the Edge will be considered as failed.
	Failed bool

	// Additional dimension to add to the metrics
	Dimensions map[string]string
	// contains filtered or unexported fields
}

Edge is an Edge between two nodes in the graph

func NewEdge

func NewEdge(key string, ttl time.Duration) *Edge

func (*Edge) IsCompleted

func (e *Edge) IsCompleted() bool

IsCompleted returns true if the corresponding client and server pair spans have been processed for the given Edge

func (*Edge) IsExpired

func (e *Edge) IsExpired() bool

type Store

type Store interface {
	// UpsertEdge inserts or updates an edge.
	UpsertEdge(key string, cb Callback) (*Edge, error)
	// EvictEdge removes an edge from the store.
	EvictEdge(key string)
	// Expire evicts all expired edges from the store.
	Expire()
}

Store is an interface for building service graphs.

func NewStore

func NewStore(ttl time.Duration, maxItems int, evictCallback Callback) Store

Jump to

Keyboard shortcuts

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