utils

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: Apache-2.0 Imports: 14 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// SiteStatus path is status
	SiteStatus = "/status"
	// VPCStatus path is status-vpc
	VPCStatus = "/status-vpc"
	// SubnetStatus path is status-subnet
	SubnetStatus = "/status-subnet"
	// InstanceStatus path is status-instance
	InstanceStatus = "/status-instance"
	// MachineStatus path is status-machine
	MachineStatus = "/status-machine"
	// DatastoreStatus path is status-datastore
	DatastoreStatus = "/status-datastore"
	// InfiniBandPartitionStatus path is status-infinibandpartition"
	InfiniBandPartitionStatus = "/status-infinibandpartition"
	// SSHKeyGroupStatus path is status-sshkeygroup"
	SSHKeyGroupStatus = "/status-sshkeygroup"
	// ParamName in URI
	ParamName = "name"
)
View Source
const (
	// DBResDataKey - DB Resource Data key name
	DBResDataKey = "value"
	// NICoApiPageSize page sizing to use with paginated nico APIs
	NICoApiPageSize = 100
)

Variables

This section is empty.

Functions

func ConvertTimestampToVersion

func ConvertTimestampToVersion(ts *timestamppb.Timestamp) (uint64, error)

ConvertTimestampToVersion - Use Timestamp as resource version

func GetFunctionName

func GetFunctionName(temp interface{}) string

GetFunctionName - Get Function Name

func GetSAStatus

func GetSAStatus(path string)

GetSAStatus - Get Status from elektra agent

func RetryWithExponentialBackoff

func RetryWithExponentialBackoff(client *http.Client, req *http.Request,
	reqBody []byte) (*http.Response, error)

RetryWithExponentialBackoff : Interval 0.5s, 1s, 2s, 4s, 8s, 16s

func UpdateState

func UpdateState(Elektra *elektratypes.Elektra)

Types

type CompStatus

type CompStatus uint64

CompStatus Component Status is used in prometheus metrics

const (
	// CompUnhealthy component is unhealthy
	CompUnhealthy CompStatus = iota
	// CompHealthy component is Healthy
	CompHealthy
	// CompNotKnown component state is Not Known
	CompNotKnown
)

func (CompStatus) String

func (e CompStatus) String() string

Jump to

Keyboard shortcuts

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