Documentation ¶
Index ¶
- Constants
- Variables
- func BillCreditsQuickly(ctx context.Context, apiKey string, credits int64) error
- func CheckAPIKeyQuickly(ctx context.Context, apiKey string) (bool, string, error)
- func GetSpan(ctx context.Context, name string) (context.Context, trace.Span)
- func LogError(c context.Context, err error, message string)
- func SetupRedis() func(context.Context) error
Constants ¶
View Source
const API_KEY_OK_VALUE = "ok"
View Source
const API_KEY_PENDING_CHECK_VALUE = "pending"
View Source
const API_KEY_PREFIX = "key-"
View Source
const ORIGIN_PREFIX = "origin-"
View Source
const PROCESS_QUEUE_SET_NAME = "api-keys-to-update"
View Source
const USAGE_PREFIX = "usage-"
Variables ¶
View Source
var RDB *redis.Client
Functions ¶
func BillCreditsQuickly ¶
func CheckAPIKeyQuickly ¶
func SetupRedis ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.