github.com/containers/podman/v4@v4.9.4/libpod/lock/shm_lock_manager_unsupported.go (about)

     1  //go:build !linux
     2  // +build !linux
     3  
     4  package lock
     5  
     6  import "fmt"
     7  
     8  // SHMLockManager is a shared memory lock manager.
     9  // It is not supported on non-Unix platforms.
    10  type SHMLockManager struct{}
    11  
    12  // NewSHMLockManager is not supported on this platform
    13  func NewSHMLockManager(path string, numLocks uint32) (Manager, error) {
    14  	return nil, fmt.Errorf("not supported")
    15  }
    16  
    17  // OpenSHMLockManager is not supported on this platform
    18  func OpenSHMLockManager(path string, numLocks uint32) (Manager, error) {
    19  	return nil, fmt.Errorf("not supported")
    20  }
    21  
    22  // AllocateLock is not supported on this platform
    23  func (m *SHMLockManager) AllocateLock() (Locker, error) {
    24  	return nil, fmt.Errorf("not supported")
    25  }
    26  
    27  // RetrieveLock is not supported on this platform
    28  func (m *SHMLockManager) RetrieveLock(id string) (Locker, error) {
    29  	return nil, fmt.Errorf("not supported")
    30  }
    31  
    32  // FreeAllLocks is not supported on this platform
    33  func (m *SHMLockManager) FreeAllLocks() error {
    34  	return fmt.Errorf("not supported")
    35  }
    36  
    37  // AvailableLocks is not supported on this platform
    38  func (m *SHMLockManager) AvailableLocks() (*uint32, error) {
    39  	return nil, fmt.Errorf("not supported")
    40  }
    41  
    42  // LocksHeld is not supported on this platform
    43  func (m *SHMLockManager) LocksHeld() ([]uint32, error) {
    44  	return nil, fmt.Errorf("not supported")
    45  }