Files
podman/libpod/lock/shm_lock_manager_unsupported.go
Valentin Rothberg ea08765f40 go fmt: use go 1.18 conditional-build syntax
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-03-18 09:11:53 +01:00

36 lines
984 B
Go

//go:build !linux
// +build !linux
package lock
import "fmt"
// SHMLockManager is a shared memory lock manager.
// It is not supported on non-Unix platforms.
type SHMLockManager struct{}
// NewSHMLockManager is not supported on this platform
func NewSHMLockManager(path string, numLocks uint32) (Manager, error) {
return nil, fmt.Errorf("not supported")
}
// OpenSHMLockManager is not supported on this platform
func OpenSHMLockManager(path string, numLocks uint32) (Manager, error) {
return nil, fmt.Errorf("not supported")
}
// AllocateLock is not supported on this platform
func (m *SHMLockManager) AllocateLock() (Locker, error) {
return nil, fmt.Errorf("not supported")
}
// RetrieveLock is not supported on this platform
func (m *SHMLockManager) RetrieveLock(id string) (Locker, error) {
return nil, fmt.Errorf("not supported")
}
// FreeAllLocks is not supported on this platform
func (m *SHMLockManager) FreeAllLocks() error {
return fmt.Errorf("not supported")
}