Documentation ¶
Index ¶
- Variables
- type FS
- type Root
- type UnitLogFile
- func (f *UnitLogFile) Attr(ctx context.Context, attr *fuse.Attr) error
- func (f *UnitLogFile) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenResponse) (fs.Handle, error)
- func (f *UnitLogFile) Read(ctx context.Context, req *fuse.ReadRequest, resp *fuse.ReadResponse) error
- func (f *UnitLogFile) String() string
- type UnitLogsDir
- type UnitTypesDir
Constants ¶
This section is empty.
Variables ¶
var GID = uint32(os.Getgid())
var UID = uint32(os.Getuid())
var UNIT_TYPES = []string{
"automount",
"device",
"mount",
"path",
"scope",
"service",
"slice",
"socket",
"swap",
"target",
"timer",
}
UNIT_TYPES represents the list of systemd unit types for which there can be journal entries
This forms the list of directories under a UnitTypesDir
Functions ¶
This section is empty.
Types ¶
type FS ¶
type FS struct {
// contains filtered or unexported fields
}
func NewFS ¶
func NewFS(journalCache *journalcache.JournalCache) *FS
type Root ¶
type Root struct { *UnitTypesDir // contains filtered or unexported fields }
func NewRoot ¶
func NewRoot(journalCache *journalcache.JournalCache) *Root
type UnitLogFile ¶
type UnitLogFile struct { Unit string // contains filtered or unexported fields }
func NewUnitLogFile ¶
func NewUnitLogFile(jc *journalcache.JournalCache, unit string) *UnitLogFile
func (*UnitLogFile) Open ¶ added in v0.2.0
func (f *UnitLogFile) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenResponse) (fs.Handle, error)
func (*UnitLogFile) Read ¶
func (f *UnitLogFile) Read(ctx context.Context, req *fuse.ReadRequest, resp *fuse.ReadResponse) error
func (*UnitLogFile) String ¶
func (f *UnitLogFile) String() string
type UnitLogsDir ¶
type UnitLogsDir struct { Type string // contains filtered or unexported fields }
func NewUnitLogsDir ¶
func NewUnitLogsDir(jc *journalcache.JournalCache, unitType string) *UnitLogsDir
func (*UnitLogsDir) ReadDirAll ¶
type UnitTypesDir ¶
type UnitTypesDir struct {
// contains filtered or unexported fields
}
UnitTypesDir is a filesystem node that lists directories which correspond to systemd unit types for which there may be journal entries.
These directories in turn list log files which map to journal entries for units of their given unit type (see UnitLogsDir)
e.g service/ssh.log => "ssh.service" logs e.g timer/some.log => "some.timer" logs
func NewUnitTypesDir ¶
func NewUnitTypesDir(journalCache *journalcache.JournalCache) *UnitTypesDir
NewUnitTypesDir returns a new UnitTypesDir
These directories in turn list log files which map to journal entries for units of their given unit type (see UnitLogsDir)
e.g services/ssh.log corresponding to "ssh.service" logs
func (*UnitTypesDir) ReadDirAll ¶
ReadDirAll enumerates directory entries for a UnitTypesDir