Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileLock ¶
type FileLock struct {
*filemutex.FileMutex
}
FileLock wraps os.File to be used as a lock using flock
func NewFileLock ¶
NewFileLock opens file/dir at path and returns unlocked FileLock object
type Store ¶
type Store interface { Lock() error Unlock() error Reserve(ns string, port int) (bool, error) Release(ns string, port int) error LastReserved(ns string) (int, error) GetByNS(ns string) ([]int, error) Close() error }
Store define the interface to implement to be used as a backend for a port Allocator
func NewFSStore ¶
NewFSStore creates a backend for port manager that stores the allocated port in a filesystem
Click to show internal directories.
Click to hide internal directories.