nvswitchmanager

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: 8 Imported by: ? modules, 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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DSType         DataStoreType
	CredentialConf credentials.Config
	DB             *bun.DB // Database connection for persistent storage
}

Config specifies the configuration for the NVSwitchManager.

type DataStoreType

type DataStoreType string

DataStoreType represents the backing datastore for the manager.

const (
	DatastoreTypeInMemory   DataStoreType = "inmemory"
	DatastoreTypePersistent DataStoreType = "persistent"
)

type NVSwitchManager

type NVSwitchManager struct {
	DataStoreType     DataStoreType
	Registry          nvswitchregistry.Registry
	CredentialManager credentials.CredentialManager
}

NVSwitchManager coordinates registry and credential management for NV-Switch trays.

func New

func New(ctx context.Context, c Config) (*NVSwitchManager, error)

New creates a new instance of NVSwitchManager.

func (*NVSwitchManager) Delete

func (nm *NVSwitchManager) Delete(ctx context.Context, id uuid.UUID) error

Delete removes an NV-Switch and its credentials.

func (*NVSwitchManager) Get

Get retrieves an NV-Switch by UUID and attaches credentials.

func (*NVSwitchManager) List

List returns all registered NV-Switches.

func (*NVSwitchManager) Register

func (nm *NVSwitchManager) Register(ctx context.Context, tray *nvswitch.NVSwitchTray) (uuid.UUID, bool, error)

Register registers a new NV-Switch tray and stores its credentials.

func (*NVSwitchManager) Start

func (nm *NVSwitchManager) Start(ctx context.Context) error

Start initializes the manager.

func (*NVSwitchManager) Stop

func (nm *NVSwitchManager) Stop(ctx context.Context) error

Stop shuts down the manager.

Jump to

Keyboard shortcuts

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