boomerutil

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SourceClient = "client"
	SourceServer = "server"
)

Variables

This section is empty.

Functions

func DialControl

func DialControl(endpoint string) (*grpc.ClientConn, ateapipb.ControlClient, error)

DialControl opens an authenticated gRPC connection to ateapi.

ateapi rejects calls that carry no credential, so present the pod certificate — the same client auth the base install gives ate-controller and atenet-router. ClientCredBundle re-reads the bundle on every handshake, so rotations are picked up without a restart.

func ElapsedFromHeader

func ElapsedFromHeader(h http.Header, key string, fallback time.Duration) (time.Duration, string)

ElapsedFromHeader extracts the server elapsed time from HTTP headers, falling back to client latency.

func ElapsedFromMD

func ElapsedFromMD(tr metadata.MD, key string, fallback time.Duration) (time.Duration, string)

ElapsedFromMD extracts the server elapsed time from gRPC metadata, falling back to client latency.

func GoroutineID

func GoroutineID() int64

goroutineID extracts the runtime's per-goroutine ID via the standard runtime.Stack trick. Used to key per-VU state because boomer's Task model has no built-in per-VU hook — see the runtime.shutdown comment for the limitation this implies on user-count rescale.

func LogSampledTrace

func LogSampledTrace(span trace.Span, name string, latency time.Duration, source string, err error)

LogSampledTrace emits a single structured line per sampled span. Operators parse these lines (e.g. via fluentbit) to rebuild the trace stream.

func MsFloat

func MsFloat(d time.Duration) float64

MsFloat converts a duration to a float64 representing milliseconds.

Types

This section is empty.

Jump to

Keyboard shortcuts

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