Documentation ¶
Overview ¶
Package util provides UUIDs for CarbonAPI and CarbonZipper HTTP requests.
Index ¶
- Constants
- func Bounds(bucket int) (lower, upper int)
- func Bucket(n int64, buckets int) int
- func GetPriority(ctx context.Context) int
- func GetUUID(ctx context.Context) string
- func MarshalCtx(ctx context.Context, request *http.Request) *http.Request
- func UUIDHandler(h http.Handler) http.Handler
- func WithPriority(ctx context.Context, priority int) context.Context
- func WithUUID(ctx context.Context) context.Context
Constants ¶
View Source
const (
StepSize = 50
)
Variables ¶
This section is empty.
Functions ¶
func GetPriority ¶ added in v0.2.0
GetPriority returns the current request priority. Less is more If not set, returns highest priority(0)
func MarshalCtx ¶
MarshalCtx ensures that outgoing HTTP requests have a Carbon UUID.
func UUIDHandler ¶
UUIDHandler is middleware that adds a Carbon UUID to all HTTP requests.
func WithPriority ¶ added in v0.2.0
WithPriority returns new context with priority set
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.