Documentation
¶
Overview ¶
Package managers implements some core utilities
Index ¶
- func ContainsString(slice []string, s string) bool
- func DefaultAppName() string
- func GetAppName(ctx context.Context) string
- func GetCurrentTime(ctx context.Context) time.Time
- func GetRandFloat64(ctx context.Context) float64
- func GetRandIntn(ctx context.Context, n int) int
- func GetRandomBytes(ctx context.Context, n int) []byte
- func NewAPIHandlers()
- func NewDefaultContext(parent context.Context) context.Context
- func RemoveString(slice []string, s string) (result []string)
- func SetDefaultLogLevel(l zerolog.Level)
- func StartHTTPServer()
- func StartMetricServer()
- func WithAppName(parent context.Context, appName string) context.Context
- func WithClock(parent context.Context, clockFunc func() time.Time) context.Context
- func WithDefaultLogger(parent context.Context) context.Context
- func WithRandomSeed(parent context.Context, seed int64) context.Context
- func WithSignalHandler(parent context.Context) context.Context
- type Manager
- func (m *Manager) Bootstrap() *bootstrap.BoostrapAPI
- func (m *Manager) Carbide() *carbide.API
- func (m *Manager) DpuExtensionService() *dpuextensionservice.API
- func (m *Manager) ExpectedMachine() *expectedmachine.API
- func (m *Manager) ExpectedPowerShelf() *expectedpowershelf.API
- func (m *Manager) ExpectedSwitch() *expectedswitch.API
- func (m *Manager) Health() *health.API
- func (m *Manager) InfiniBandPartition() *infinibandpartition.API
- func (Managers *Manager) Init()
- func (m *Manager) Instance() *instance.API
- func (m *Manager) InstanceType() *instancetype.API
- func (m *Manager) Machine() *machine.API
- func (m *Manager) MachineValidation() *machinevalidation.API
- func (m *Manager) NVLinkLogicalPartition() *nvlinklogicalpartition.API
- func (m *Manager) NetworkSecurityGroup() *networksecuritygroup.API
- func (Managers *Manager) NewInstance()
- func (m *Manager) OperatingSystem() *operatingsystem.API
- func (m *Manager) Orchestrator() *workflow.API
- func (m *Manager) RLA() *rla.API
- func (m *Manager) SKU() *sku.API
- func (m *Manager) SSHKeyGroup() *sshkeygroup.API
- func (Managers *Manager) Start()
- func (m *Manager) Subnet() *subnet.API
- func (m *Manager) Tenant() *tenant.API
- func (m *Manager) VPC() *vpc.API
- func (m *Manager) VpcPrefix() *vpcprefix.API
- type Rand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsString ¶
ContainsString is a helper function
func DefaultAppName ¶
func DefaultAppName() string
DefaultAppName gets the name of the current executable
func GetAppName ¶
GetAppName fetches the appname key value
func GetCurrentTime ¶
GetCurrentTime returns the current time from the context or default
func GetRandFloat64 ¶
GetRandFloat64 returns a random float64
func GetRandIntn ¶
GetRandIntn returns a random int
func GetRandomBytes ¶
GetRandomBytes returns n random bytes
func NewDefaultContext ¶
NewDefaultContext provides a default context for applications.
func RemoveString ¶
RemoveString is a helper function
func SetDefaultLogLevel ¶
SetDefaultLogLevel sets the default log level
func StartHTTPServer ¶
func StartHTTPServer()
StartHTTPServer - start a web server on the specified port.
func WithAppName ¶
WithAppName returns a context with the specified app name
func WithDefaultLogger ¶
WithDefaultLogger returns a context with the default logger
func WithRandomSeed ¶
WithRandomSeed sets a seed
Types ¶
type Manager ¶
type Manager struct {
//nolint
API *managerapi.ManagerAPI
Data *managerapi.ManagerData
Conf *managerapi.ManagerConf
}
Manager - Access to all APIs/data/conf in a single struct
var ManagerAccess *Manager
ManagerAccess - access to manager struct
func NewInstance ¶
func NewInstance(superforge *elektratypes.Elektra) (*Manager, error)
NewInstance - new instance with the parent datastruct
func (*Manager) Bootstrap ¶
func (m *Manager) Bootstrap() *bootstrap.BoostrapAPI
Bootstrap Add bootstrap manager instance here
func (*Manager) DpuExtensionService ¶
func (m *Manager) DpuExtensionService() *dpuextensionservice.API
DpuExtensionService - Add DPU Extension Service Manager instance here
func (*Manager) ExpectedMachine ¶
func (m *Manager) ExpectedMachine() *expectedmachine.API
ExpectedMachine - Add ExpectedMachine Manager instance here
func (*Manager) ExpectedPowerShelf ¶
func (m *Manager) ExpectedPowerShelf() *expectedpowershelf.API
ExpectedPowerShelf - Add ExpectedPowerShelf Manager instance here
func (*Manager) ExpectedSwitch ¶
func (m *Manager) ExpectedSwitch() *expectedswitch.API
ExpectedSwitch - Add ExpectedSwitch Manager instance here
func (*Manager) InfiniBandPartition ¶
func (m *Manager) InfiniBandPartition() *infinibandpartition.API
InfiniBandPartition - Add InfiniBandPartition Manager instance here
func (*Manager) InstanceType ¶
func (m *Manager) InstanceType() *instancetype.API
InstanceType - Add InstanceType Manager instance here
func (*Manager) MachineValidation ¶
func (m *Manager) MachineValidation() *machinevalidation.API
MachineValidation - Add MachineValidation Manager instance here
func (*Manager) NVLinkLogicalPartition ¶
func (m *Manager) NVLinkLogicalPartition() *nvlinklogicalpartition.API
NVLinkLogicalPartition - Add NVLinkLogicalPartition Manager instance here
func (*Manager) NetworkSecurityGroup ¶
func (m *Manager) NetworkSecurityGroup() *networksecuritygroup.API
NetworkSecurityGroup - Add NetworkSecurityGroup Manager instance here
func (*Manager) NewInstance ¶
func (Managers *Manager) NewInstance()
NewInstance - instantiates all the managers
func (*Manager) OperatingSystem ¶
func (m *Manager) OperatingSystem() *operatingsystem.API
OperatingSystem - Add OperatingSystem Manager instance here
func (*Manager) Orchestrator ¶
Orchestrator - Add orchestrator manager instance here
func (*Manager) SSHKeyGroup ¶
func (m *Manager) SSHKeyGroup() *sshkeygroup.API
SSHKeyGroup - Add SSHKeyGroup Manager instance here
type Rand ¶
Rand wraps *rand.Rand, provides thread-safe access to a subset of methods.
func (*Rand) RandomBytes ¶
RandomBytes returns n random bytes.