Documentation ¶
Overview ¶
Package devutil provides device specific utilities.
Index ¶
Constants ¶
View Source
const ( // CtxDevGoferClient is a Context.Value key for a /dev gofer client. CtxDevGoferClient contextID = iota // CtxDevGoferClientProvider is a Context.Value key for GoferClientProvider. CtxDevGoferClientProvider )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoferClient ¶
type GoferClient struct {
// contains filtered or unexported fields
}
GoferClient is the lisafs client for the /dev gofer connection.
func GoferClientFromContext ¶
func GoferClientFromContext(ctx context.Context) *GoferClient
GoferClientFromContext returns the device gofer client used by ctx.
func NewGoferClient ¶
NewGoferClient establishes the LISAFS connection to the dev gofer server. It takes ownership of fd. contName is the owning container name.
func (*GoferClient) ContainerName ¶
func (g *GoferClient) ContainerName() string
ContainerName returns the name of the container that owns this gofer.
func (*GoferClient) DirentNames ¶
func (g *GoferClient) DirentNames(ctx context.Context) ([]string, error)
DirentNames returns names of all the dirents for /dev on the gofer.
type GoferClientProvider ¶
type GoferClientProvider interface {
GetDevGoferClient(contName string) *GoferClient
}
GoferClientProvider provides a GoferClient for a given container.
func GoferClientProviderFromContext ¶
func GoferClientProviderFromContext(ctx context.Context) GoferClientProvider
GoferClientProviderFromContext returns the GoferClientProvider used by ctx.
Click to show internal directories.
Click to hide internal directories.