Documentation ¶
Overview ¶
Package proc implements a partial in-memory file system for procfs.
Index ¶
Constants ¶
View Source
const (
// Name is the default filesystem name.
Name = "proc"
)
Variables ¶
This section is empty.
Functions ¶
func GetMetadata ¶
func GetMetadata(ctx context.Context, mm *mm.MemoryManager, buf *bytes.Buffer, t MetadataType) error
GetMetadata fetches the process's metadata of type t and writes it into buf. The process is identified by mm.
Types ¶
type FilesystemType ¶
type FilesystemType struct{}
FilesystemType is the factory class for procfs.
+stateify savable
func (FilesystemType) GetFilesystem ¶
func (ft FilesystemType) GetFilesystem(ctx context.Context, vfsObj *vfs.VirtualFilesystem, creds *auth.Credentials, source string, opts vfs.GetFilesystemOptions) (*vfs.Filesystem, *vfs.Dentry, error)
GetFilesystem implements vfs.FilesystemType.GetFilesystem.
func (FilesystemType) Name ¶
func (FilesystemType) Name() string
Name implements vfs.FilesystemType.Name.
func (FilesystemType) Release ¶
func (FilesystemType) Release(ctx context.Context)
Release implements vfs.FilesystemType.Release.
type InternalData ¶
InternalData contains internal data passed in to the procfs mount via vfs.GetFilesystemOptions.InternalData.
+stateify savable
type MetadataType ¶
type MetadataType int
MetadataType enumerates the types of metadata that is exposed through proc.
const ( // Cmdline represents /proc/[pid]/cmdline. Cmdline MetadataType = iota // Environ represents /proc/[pid]/environ. Environ )
Click to show internal directories.
Click to hide internal directories.