util

package
v0.0.6-beta Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BackoffSchedule = []time.Duration{
	1 * time.Second,
	2 * time.Second,
	4 * time.Second,
	8 * time.Second,
	16 * time.Second,
}
View Source
var (
	CPU_HIGH = false
)
View Source
var ProcessBackoff = func() error {
	timeout := time.NewTimer(_backoff_timeout)
	defer timeout.Stop()

	select {
	case <-time.After(_backoff_duration):
		logger.DefaultLogger.Warn("cpu load high")
		return nil
	case <-timeout.C:
		return logger.RpcError(status.Error(codes.Internal, "queue processinging signing requests at capacity"), nil)
	}
}

Backoff Authentication middleware/authentication.go

Functions

func GenerateLockfile

func GenerateLockfile(service string) error

func LockfileBackoff

func LockfileBackoff(lockfilePath string) error

func RemoveLockfile

func RemoveLockfile(service string) error

func UpdateCPULoad

func UpdateCPULoad()

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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