util

package
v0.390.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFreePort

func GetFreePort(preferredPorts ...string) (string, error)

GetFreePort finds an available port we can run Postgres on. It will favour the ones you specify as preferredPorts, but if they are all in use, it return an arbitrary port that is free.

func GetTraceparent added in v0.368.0

func GetTraceparent(spanContext trace.SpanContext) string

Retrieves traceparent, or empty string if no span exists. Uses standard format: {version}-{trace_id}-{span_id}-{trace_flags} See specification: https://www.w3.org/TR/trace-context/#traceparent-header-field-values

func PadRight

func PadRight(str string, padAmount int) string

func ParseTraceparent added in v0.368.0

func ParseTraceparent(traceparent string) trace.SpanContext

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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