nvswitchmanager

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

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