MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / getStorage

Method getStorage

pkg/mockpve/state.go:991–1002  ·  view source on GitHub ↗
(node, storage string)

Source from the content-addressed store, hash-verified

989}
990
991func (s *MockState) getStorage(node, storage string) (*MockStorage, error) {
992 s.mu.RLock()
993 defer s.mu.RUnlock()
994
995 for _, entry := range s.Storage {
996 if entry.Node == node && entry.ID == storage {
997 return entry, nil
998 }
999 }
1000
1001 return nil, fmt.Errorf("storage not found")
1002}
1003
1004func (s *MockState) deleteStorageVolumeLocked(volID string) {
1005 for key, volumes := range s.StorageContent {

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected