lib

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2022 License: AGPL-3.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

View Source
const OUT_OF_CREDITS_MESSAGE = "out of credits"

Variables

This section is empty.

Functions

func GetCreditsClient

func GetCreditsClient(standalone bool) *redis.Client

func GetEnvVariable

func GetEnvVariable(key, defaultValue string) string

func GetEnvVariableHideError

func GetEnvVariableHideError(key, defaultValue string, hideError bool) string

func IsPrivateIP

func IsPrivateIP(ip net.IP) bool

func IsPrivateIPString

func IsPrivateIPString(ip string) bool

Types

type CreditsManager

type CreditsManager struct {
	// contains filtered or unexported fields
}

func CreateCreditsManager

func CreateCreditsManager(ctx context.Context, variant string, variantTargetId string,
	creditsClient *redis.Client) *CreditsManager

func (*CreditsManager) GetCredits

func (creditsManager *CreditsManager) GetCredits() int64

func (*CreditsManager) StopCreditsCapturing

func (creditsManager *CreditsManager) StopCreditsCapturing()

func (*CreditsManager) UseCredits

func (creditsManager *CreditsManager) UseCredits(credits int64) bool

type JobUserUpdate

type JobUserUpdate struct {
	UpdateType string `json:"updateType"`
}

type WrappedJobUserUpdate

type WrappedJobUserUpdate struct {
	Update JobUserUpdate `json:"update"`
	JobId  string        `json:"jobId"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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