Documentation ¶
Index ¶
- Constants
- func GetCreditsClient(standalone bool) *redis.Client
- func GetEnvVariable(key, defaultValue string) string
- func GetEnvVariableBool(key string, defaultValue bool) bool
- func GetEnvVariableRaw(key, defaultValue string, hideError bool) string
- func GetHexEnvVariable(key, defaultValue string) []byte
- func IsPrivateIP(ip net.IP) bool
- func IsPrivateIPString(ip string) bool
- type CreditsManager
- func (creditsManager *CreditsManager) BillFinalCredits()
- func (creditsManager *CreditsManager) ForceDeductCredits(credits int64, setLastBillingTime bool)
- func (creditsManager *CreditsManager) GetCredits() int64
- func (creditsManager *CreditsManager) StartMonitoringCredits(outOfCreditsCallback func())
- func (creditsManager *CreditsManager) StopCreditsCapturing()
- type FuncModeInfo
- type FunctionAuthClient
- type FunctionResult
- type JobUserUpdate
- type LiveFunction
- type WrappedJobUserUpdate
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 GetEnvVariableBool ¶ added in v0.1.1
func GetEnvVariableRaw ¶ added in v0.1.1
func GetHexEnvVariable ¶ added in v0.1.1
func IsPrivateIP ¶
func IsPrivateIPString ¶
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, funcModeInfo FuncModeInfo) *CreditsManager
func (*CreditsManager) BillFinalCredits ¶ added in v0.1.4
func (creditsManager *CreditsManager) BillFinalCredits()
func (*CreditsManager) ForceDeductCredits ¶ added in v0.1.1
func (creditsManager *CreditsManager) ForceDeductCredits(credits int64, setLastBillingTime bool)
func (*CreditsManager) GetCredits ¶
func (creditsManager *CreditsManager) GetCredits() int64
func (*CreditsManager) StartMonitoringCredits ¶ added in v0.1.4
func (creditsManager *CreditsManager) StartMonitoringCredits(outOfCreditsCallback func())
func (*CreditsManager) StopCreditsCapturing ¶
func (creditsManager *CreditsManager) StopCreditsCapturing()
type FuncModeInfo ¶ added in v0.1.1
type FuncModeInfo struct {
Instance100MSUnitRate int64 `json:"instance100msUnitRate"`
}
type FunctionAuthClient ¶ added in v0.1.1
type FunctionAuthClient interface { Functions() []LiveFunction ExecuteFunction(location string) (*(chan FunctionResult), error) CheckFunctionAvailability(location string) error }
type FunctionResult ¶ added in v0.1.1
type JobUserUpdate ¶
type JobUserUpdate struct {
UpdateType string `json:"updateType"`
}
type LiveFunction ¶ added in v0.1.1
type LiveFunction struct { Location string Uri string State functionspb.Function_State }
type WrappedJobUserUpdate ¶
type WrappedJobUserUpdate struct { Update JobUserUpdate `json:"update"` JobId string `json:"jobId"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.