stats

package
v0.24.5 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CurrentState = Status{
	SecretQueueLen: 0,
	SecretQueueCap: 0,
	K8sQueueLen:    0,
	K8sQueueCap:    0,
	NumSecrets:     0,
	// contains filtered or unexported fields
}

CurrentState is a global Status object that represents the current state of the Secrets Manager.

Functions

This section is empty.

Types

type Status

type Status struct {
	SecretQueueLen int
	SecretQueueCap int
	K8sQueueLen    int
	K8sQueueCap    int
	NumSecrets     int
	// contains filtered or unexported fields
}

Status is a struct representing the current state of the secret manager, including the lengths and capacities of the secret queues and the total number of secrets stored.

func Stats

func Stats() Status

Stats returns a copy of the CurrentState Status object, providing a snapshot of the current status of the secret manager.

func (*Status) Decrement

func (s *Status) Decrement(name string, loader func(name any) (any, bool))

Decrement is a method for the Status struct that decrements the NumSecrets field by 1 if the provided secret name is found in the in-memory store.

func (*Status) Increment

func (s *Status) Increment(name string, loader func(name any) (any, bool))

Increment is a method for the Status struct that increments the NumSecrets field by 1 if the provided secret name is not found in the in-memory store.

Jump to

Keyboard shortcuts

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