Versions in this module Expand all Collapse all v0 v0.1.0 May 1, 2024 v0.0.1 Feb 21, 2024 Changes in this version + const CommonNamespaceIdentifier + const DefaultFeatureType + const DefaultStoragePoolId + const PhysicalFunctionControllerIndex + const ResourceBlockId + func BindFlags(fs *flag.FlagSet) + func CleanupVolumes(providingVolumes []ProvidingVolume) + func Close() error + func ConvertRelativePortIndexToControllerIndex(index uint32) (uint16, error) + func EnumerateStorage(...) error + func Initialize(log ec.Logger, ctrl NvmeController) error + func NewDefaultApiRouter(s Api, c NvmeController) ec.Router + type Api interface + RedfishV1StorageGet func(w http.ResponseWriter, r *http.Request) + RedfishV1StorageStorageIdControllersControllerIdGet func(w http.ResponseWriter, r *http.Request) + RedfishV1StorageStorageIdControllersGet func(w http.ResponseWriter, r *http.Request) + RedfishV1StorageStorageIdGet func(w http.ResponseWriter, r *http.Request) + RedfishV1StorageStorageIdStoragePoolsGet func(w http.ResponseWriter, r *http.Request) + RedfishV1StorageStorageIdStoragePoolsStoragePoolIdGet func(w http.ResponseWriter, r *http.Request) + RedfishV1StorageStorageIdVolumesGet func(w http.ResponseWriter, r *http.Request) + RedfishV1StorageStorageIdVolumesPost func(w http.ResponseWriter, r *http.Request) + RedfishV1StorageStorageIdVolumesVolumeIdDelete func(w http.ResponseWriter, r *http.Request) + RedfishV1StorageStorageIdVolumesVolumeIdGet func(w http.ResponseWriter, r *http.Request) + func NewDefaultApiService() Api + type ConfigFile struct + Metadata struct{ ... } + Storage StorageConfig + Version string + type ControllerConfig struct + Functions uint32 + Resources uint32 + type DefaultApiRouter struct + func (*DefaultApiRouter) Name() string + func (r *DefaultApiRouter) Close() error + func (r *DefaultApiRouter) Init(log ec.Logger) error + func (r *DefaultApiRouter) Routes() ec.Routes + func (r *DefaultApiRouter) Start() error + type DefaultApiService struct + func (s *DefaultApiService) RedfishV1StorageGet(w http.ResponseWriter, r *http.Request) + func (s *DefaultApiService) RedfishV1StorageStorageIdControllersControllerIdGet(w http.ResponseWriter, r *http.Request) + func (s *DefaultApiService) RedfishV1StorageStorageIdControllersGet(w http.ResponseWriter, r *http.Request) + func (s *DefaultApiService) RedfishV1StorageStorageIdGet(w http.ResponseWriter, r *http.Request) + func (s *DefaultApiService) RedfishV1StorageStorageIdStoragePoolsGet(w http.ResponseWriter, r *http.Request) + func (s *DefaultApiService) RedfishV1StorageStorageIdStoragePoolsStoragePoolIdGet(w http.ResponseWriter, r *http.Request) + func (s *DefaultApiService) RedfishV1StorageStorageIdVolumesGet(w http.ResponseWriter, r *http.Request) + func (s *DefaultApiService) RedfishV1StorageStorageIdVolumesPost(w http.ResponseWriter, r *http.Request) + func (s *DefaultApiService) RedfishV1StorageStorageIdVolumesVolumeIdDelete(w http.ResponseWriter, r *http.Request) + func (s *DefaultApiService) RedfishV1StorageStorageIdVolumesVolumeIdGet(w http.ResponseWriter, r *http.Request) + type DirectNvmeController struct + func (c *DirectNvmeController) NewNvmeDeviceController() NvmeDeviceController + type DirectNvmeDeviceController struct + func (c *DirectNvmeDeviceController) Close() error + func (c *DirectNvmeDeviceController) Initialize() error + func (c *DirectNvmeDeviceController) NewNvmeDevice(fabricId string, switchId string, portId string) (NvmeDeviceApi, error) + type Manager struct + func (m *Manager) EventHandler(e event.Event) error + func (m *Manager) GetVolumes(controllerId string) ([]string, error) + func (mgr *Manager) Get(model *sf.StorageCollectionStorageCollection) error + func (mgr *Manager) StorageIdControllersControllerIdGet(storageId, controllerId string, ...) error + func (mgr *Manager) StorageIdControllersGet(storageId string, ...) error + func (mgr *Manager) StorageIdGet(storageId string, model *sf.StorageV190Storage) error + func (mgr *Manager) StorageIdStoragePoolsGet(storageId string, model *sf.StoragePoolCollectionStoragePoolCollection) error + func (mgr *Manager) StorageIdStoragePoolsStoragePoolIdGet(storageId, storagePoolId string, model *sf.StoragePoolV150StoragePool) error + func (mgr *Manager) StorageIdVolumeIdDelete(storageId, volumeId string) error + func (mgr *Manager) StorageIdVolumeIdGet(storageId, volumeId string, model *sf.VolumeV161Volume) error + func (mgr *Manager) StorageIdVolumesGet(storageId string, model *sf.VolumeCollectionVolumeCollection) error + func (mgr *Manager) StorageIdVolumesPost(storageId string, model *sf.VolumeV161Volume) error + type MockNvmeController struct + func (ctrl MockNvmeController) NewNvmeDeviceController() NvmeDeviceController + type MockNvmeDeviceController struct + func (ctrl *MockNvmeDeviceController) Close() error + func (ctrl *MockNvmeDeviceController) Initialize() error + func (ctrl MockNvmeDeviceController) NewNvmeDevice(fabricId, switchId, portId string) (NvmeDeviceApi, error) + type MockNvmePersistenceManager struct + type NvmeController interface + NewNvmeDeviceController func() NvmeDeviceController + func NewCliNvmeController() NvmeController + func NewDirectDeviceNvmeController(deviceRegexp string) NvmeController + func NewMockNvmeController(persistence bool) NvmeController + func NewSwitchtecNvmeController() NvmeController + type NvmeDeviceApi interface + AssignControllerResources func(controllerId uint16, resourceType SecondaryControllerResourceType, ...) error + AttachNamespace func(namespaceId nvme.NamespaceIdentifier, controllers []uint16) error + CreateNamespace func(sizeInSectors uint64, sectorSizeIndex uint8) (nvme.NamespaceIdentifier, nvme.NamespaceGloballyUniqueIdentifier, error) + DeleteNamespace func(namespaceId nvme.NamespaceIdentifier) error + DetachNamespace func(namespaceId nvme.NamespaceIdentifier, controllers []uint16) error + FormatNamespace func(namespaceID nvme.NamespaceIdentifier) error + GetNamespaceFeature func(namespaceId nvme.NamespaceIdentifier) ([]byte, error) + GetWearLevelAsPercentageUsed func() (uint8, error) + IdentifyController func(controllerId uint16) (*nvme.IdCtrl, error) + IdentifyNamespace func(namespaceId nvme.NamespaceIdentifier) (*nvme.IdNs, error) + IsDirectDevice func() bool + ListAttachedControllers func(namespaceId nvme.NamespaceIdentifier) ([]uint16, error) + ListNamespaces func(controllerId uint16) ([]nvme.NamespaceIdentifier, error) + ListSecondary func() (*nvme.SecondaryControllerList, error) + OnlineController func(controllerId uint16) error + SetNamespaceFeature func(namespaceId nvme.NamespaceIdentifier, data []byte) error + type NvmeDeviceController interface + Close func() error + Initialize func() error + NewNvmeDevice func(fabricId, switchId, portId string) (NvmeDeviceApi, error) + type ProvidingVolume struct + Storage *Storage + VolumeId string + type SecondaryControllerHandlerFunc func(controllerId uint16, controllerOnline bool, virtualFunctionNumber uint16, ...) error + type SecondaryControllerResourceType int + const VIResourceType + const VQResourceType + type SecondaryControllersInitFunc func(count uint8) + type Storage struct + func GetStorage() []*Storage + func (s *Storage) FindVolume(id string) *Volume + func (s *Storage) FindVolumeByNamespaceId(namespaceId nvme.NamespaceIdentifier) (*Volume, error) + func (s *Storage) IsEnabled() bool + func (s *Storage) IsKioxiaDualPortConfiguration() bool + func (s *Storage) LinkDroppedEventHandler() error + func (s *Storage) LinkEstablishedEventHandler(switchId, portId string) error + func (s *Storage) OdataId() string + func (s *Storage) OdataIdRef(ref string) sf.OdataV4IdRef + func (s *Storage) SerialNumber() string + func (s *Storage) UnallocatedBytes() uint64 + type StorageApi interface + Get func(*sf.StorageCollectionStorageCollection) error + StorageIdControllersControllerIdGet func(string, string, *sf.StorageControllerV100StorageController) error + StorageIdControllersGet func(string, *sf.StorageControllerCollectionStorageControllerCollection) error + StorageIdGet func(string, *sf.StorageV190Storage) error + StorageIdStoragePoolsGet func(string, *sf.StoragePoolCollectionStoragePoolCollection) error + StorageIdStoragePoolsStoragePoolIdGet func(string, string, *sf.StoragePoolV150StoragePool) error + StorageIdVolumeIdDelete func(string, string) error + StorageIdVolumeIdGet func(string, string, *sf.VolumeV161Volume) error + StorageIdVolumesGet func(string, *sf.VolumeCollectionVolumeCollection) error + StorageIdVolumesPost func(string, *sf.VolumeV161Volume) error + func NewDefaultStorageService() StorageApi + type StorageConfig struct + Controller ControllerConfig + Devices []string + type StorageController struct + type SwitchtecNvmeController struct + func (SwitchtecNvmeController) NewNvmeDeviceController() NvmeDeviceController + type SwitchtecNvmeDeviceController struct + func (SwitchtecNvmeDeviceController) Close() error + func (SwitchtecNvmeDeviceController) Initialize() error + func (SwitchtecNvmeDeviceController) NewNvmeDevice(fabricId, switchId, portId string) (NvmeDeviceApi, error) + type Volume struct + func CreateVolume(s *Storage, capacityBytes uint64) (*Volume, error) + func (v *Volume) AttachController(controllerId uint16) error + func (v *Volume) Delete() error + func (v *Volume) DetachController(controllerId uint16) error + func (v *Volume) Format() error + func (v *Volume) GetCapaityBytes() uint64 + func (v *Volume) GetGloballyUniqueIdentifier() nvme.NamespaceGloballyUniqueIdentifier + func (v *Volume) GetNamespaceId() nvme.NamespaceIdentifier + func (v *Volume) GetOdataId() string + func (v *Volume) Id() string + func (v *Volume) SetFeature(data []byte) error + func (v *Volume) WaitFormatComplete() error