parser

package
v0.0.0-...-881a5f6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2025 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DlvBreak

func DlvBreak()

func ParseInt64

func ParseInt64(reader io.ReaderAt, offset int64) int64

func ParseString

func ParseString(reader io.ReaderAt, offset int64, length int64) string

func ParseTerminatedString

func ParseTerminatedString(reader io.ReaderAt, offset int64) string

func ParseUint32

func ParseUint32(reader io.ReaderAt, offset int64) uint32

func ParseUint64

func ParseUint64(reader io.ReaderAt, offset int64) uint64

func ParseUint8

func ParseUint8(reader io.ReaderAt, offset int64) byte

func ToInt64

func ToInt64(in string) (int64, error)

func WatchFile

func WatchFile(ctx context.Context,
	opener FileOpener) chan *ordereddict.Dict

Types

type CompatDataObject

type CompatDataObject struct {
	Reader  io.ReaderAt
	Offset  int64
	Profile *JournalProfile
}

func (*CompatDataObject) DebugString

func (self *CompatDataObject) DebugString() string

func (*CompatDataObject) Size

func (self *CompatDataObject) Size() int

type CompatEntryItem

type CompatEntryItem struct {
	Reader  io.ReaderAt
	Offset  int64
	Profile *JournalProfile
}

func (*CompatEntryItem) DebugString

func (self *CompatEntryItem) DebugString() string

func (*CompatEntryItem) Size

func (self *CompatEntryItem) Size() int

type DataObject

type DataObject struct {
	Reader  io.ReaderAt
	Offset  int64
	Profile *JournalProfile
}

func (*DataObject) DebugString

func (self *DataObject) DebugString() string

func (*DataObject) Size

func (self *DataObject) Size() int

type EntryItem

type EntryItem struct {
	Reader  io.ReaderAt
	Offset  int64
	Profile *JournalProfile
}

func (*EntryItem) DebugString

func (self *EntryItem) DebugString() string

func (*EntryItem) Size

func (self *EntryItem) Size() int

type EntryObject

type EntryObject struct {
	Reader  io.ReaderAt
	Offset  int64
	Profile *JournalProfile
}

func (*EntryObject) Debug

func (self *EntryObject) Debug()

func (*EntryObject) DebugString

func (self *EntryObject) DebugString() string

func (*EntryObject) GetParsed

func (self *EntryObject) GetParsed(ctx *JournalFile, size int64) *ordereddict.Dict

Gets the log entry and parse the fields according to documentation at https://www.freedesktop.org/software/systemd/man/latest/systemd.journal-fields.html

func (*EntryObject) GetRaw

func (self *EntryObject) GetRaw(ctx *JournalFile, size int64) *ordereddict.Dict

Gets the raw log entry without interpreting the data.

func (*EntryObject) Size

func (self *EntryObject) Size() int

type Enumeration

type Enumeration struct {
	Value uint64
	Name  string
}

func (Enumeration) DebugString

func (self Enumeration) DebugString() string

type FileHeader

type FileHeader struct {
	Reader  io.ReaderAt
	Offset  int64
	Profile *JournalProfile
}

func (*FileHeader) DebugString

func (self *FileHeader) DebugString() string

func (*FileHeader) Signature

func (self *FileHeader) Signature() string

func (*FileHeader) Size

func (self *FileHeader) Size() int

type FileOpener

type FileOpener func() (reader io.ReaderAt, closer func(), err error)

type Flags

type Flags struct {
	Value uint64
	Names map[string]bool
}

func (Flags) DebugString

func (self Flags) DebugString() string

func (Flags) IsSet

func (self Flags) IsSet(flag string) bool

func (Flags) Values

func (self Flags) Values() []string

type JournalFile

type JournalFile struct {
	Reader  io.ReaderAt
	Profile *JournalProfile
	Header  *FileHeader

	IsCompact  bool
	NumEntries uint64
	NumObjects uint64
	ArenaSize  int64

	// The minimum sequence number to process
	MinSeq  uint64
	MaxSeq  uint64
	MinTime time.Time
	MaxTime time.Time

	RawLogs bool
}

func OpenFile

func OpenFile(reader io.ReaderAt) (*JournalFile, error)

func (*JournalFile) DebugString

func (self *JournalFile) DebugString() string

func (*JournalFile) GetLastSequence

func (self *JournalFile) GetLastSequence() uint64

func (*JournalFile) GetLogs

func (self *JournalFile) GetLogs(ctx context.Context) chan *ordereddict.Dict

type JournalProfile

type JournalProfile struct {
	Off_CompatDataObject_payload      int64
	Off_CompatEntryItem_object        int64
	Off_DataObject_payload            int64
	Off_EntryItem_object              int64
	Off_EntryObject_seqnum            int64
	Off_EntryObject_realtime          int64
	Off_EntryObject_monotonic         int64
	Off_FileHeader_Signature          int64
	Off_FileHeader_compatible_flags   int64
	Off_FileHeader_incompatible_flags int64
	Off_FileHeader_header_size        int64
	Off_FileHeader_arena_size         int64
	Off_FileHeader_n_objects          int64
	Off_FileHeader_n_entries          int64
	Off_FileHeader_tail_entry_seqnum  int64
	Off_ObjectHeader_Type             int64
	Off_ObjectHeader_flags            int64
	Off_ObjectHeader___real_size      int64
}

func NewJournalProfile

func NewJournalProfile() *JournalProfile

func (*JournalProfile) CompatDataObject

func (self *JournalProfile) CompatDataObject(reader io.ReaderAt, offset int64) *CompatDataObject

func (*JournalProfile) CompatEntryItem

func (self *JournalProfile) CompatEntryItem(reader io.ReaderAt, offset int64) *CompatEntryItem

func (*JournalProfile) DataObject

func (self *JournalProfile) DataObject(reader io.ReaderAt, offset int64) *DataObject

func (*JournalProfile) EntryItem

func (self *JournalProfile) EntryItem(reader io.ReaderAt, offset int64) *EntryItem

func (*JournalProfile) EntryObject

func (self *JournalProfile) EntryObject(reader io.ReaderAt, offset int64) *EntryObject

func (*JournalProfile) FileHeader

func (self *JournalProfile) FileHeader(reader io.ReaderAt, offset int64) *FileHeader

func (*JournalProfile) ObjectHeader

func (self *JournalProfile) ObjectHeader(reader io.ReaderAt, offset int64) *ObjectHeader

type ObjectHeader

type ObjectHeader struct {
	Reader  io.ReaderAt
	Offset  int64
	Profile *JournalProfile
}

func (*ObjectHeader) DebugString

func (self *ObjectHeader) DebugString() string

func (*ObjectHeader) Size

func (self *ObjectHeader) Size() int

func (*ObjectHeader) Type

func (self *ObjectHeader) Type() *Enumeration

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL