func WithKey(ctx context.Context, key string) context.Context {
	return context.WithValue(ctx, ghctxkey, key)
}
WithKey adds the provided key to the provided context
to add additional call identifier to context.
Resulted context is used by: `pattern` and `generator` throtttlers.
package gohalt
import (
	"context"
	"time"
)
type ghctxid string
const (
	ghctxpriority  ghctxid = "gohalt_context_priority"
	ghctxkey       ghctxid = "gohalt_context_key"
	ghctxmessage   ghctxid = "gohalt_context_message"
	ghctxtimestamp ghctxid = "gohalt_context_timestamp"
	ghctxmarshaler ghctxid = "gohalt_context_marshaler"
	ghctxweight    ghctxid = "gohalt_context_weight"
)
func WithTimestamp(ctx context.Context, ts time.Time) context.Context {
	return context.WithValue(ctx, ghctxtimestamp, ts)
}
func ctxTimestamp(ctx context.Context) time.Time {
	if val := ctx.Value(ghctxtimestamp); val != nil {
		if timestamp, ok := val.(time.Time); ok {
			return timestamp.UTC()
		}
	}
	return time.Now().UTC()
}
func WithPriority(ctx context.Context, priority uint8) context.Context {
	return context.WithValue(ctx, ghctxpriority, priority)
}
func ctxPriority(ctx context.Context, limit uint8) uint8 {
	if val := ctx.Value(ghctxpriority); val != nil {
		if priority, ok := val.(uint8); ok && priority > 0 && priority <= limit {
			return priority
		}
	}
	return 1
}
func WithWeight(ctx context.Context, weight int64) context.Context {
	return context.WithValue(ctx, ghctxweight, weight)
}
func ctxWeight(ctx context.Context) int64 {
	if val := ctx.Value(ghctxweight); val != nil {
		if weight, ok := val.(int64); ok {
			return weight
		}
	}
	return 1
}
func ctxWeightMod(ctx context.Context) int64 {
	if val := ctx.Value(ghctxweight); val != nil {
		if weight, ok := val.(int64); ok && weight > 0 {
			return weight
		}
	}
	return 1
}