tracking

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultHeader = "X-Track-ID"
	Header        = DefaultHeader
	Key           = "track_id"
)

Variables

This section is empty.

Functions

func GenerateTrackID added in v0.1.4

func GenerateTrackID(generator string) string

func MustTrackID

func MustTrackID(ctx context.Context) string

func NewTrackID

func NewTrackID() string

func TrackID

func TrackID(ctx context.Context) string

func WithTrackID

func WithTrackID(ctx context.Context, trackID string) context.Context

Types

type Config

type Config struct {
	Enabled        bool   `mapstructure:"enabled" yaml:"enabled"`
	Header         string `mapstructure:"header" yaml:"header"`
	ResponseHeader string `mapstructure:"response_header" yaml:"response_header"`
	Generator      string `mapstructure:"generator" yaml:"generator"`
	ForceNew       bool   `mapstructure:"force_new" yaml:"force_new"`
}

func DefaultConfig

func DefaultConfig() Config

func NormalizeConfig added in v0.1.4

func NormalizeConfig(cfg Config) Config

Jump to

Keyboard shortcuts

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