Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrEnospc is returned if no devices can be allocated. ErrEnospc = errors.New("No free device IDs") // ErrEinval is returned if a device string is invalid ErrEinval = errors.New("Invalid device") )
Functions ¶
This section is empty.
Types ¶
type Ops ¶
type Ops interface { // String representation of the mount table String() string // Assigns new path Assign() (string, error) // Releases path to available devices Release(device string) error }
Ops defines the interface to keep track of attached devices.
type SingleLetter ¶
SingleLetter defines a new device letter
func NewSingleLetter ¶
func NewSingleLetter(devPrefix, devices string) (*SingleLetter, error)
NewSingleLetter instance of Matrix
func (*SingleLetter) Assign ¶
func (s *SingleLetter) Assign() (string, error)
Assign new device letter
func (*SingleLetter) Release ¶
func (s *SingleLetter) Release(dev string) error
Release device letter to devices pool.
func (*SingleLetter) String ¶
func (s *SingleLetter) String() string
String is a description of this device.
Click to show internal directories.
Click to hide internal directories.