journal

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateListLogsSchema added in v0.2.0

func CreateListLogsSchema() *jsonschema.Schema

Types

type HostLog

type HostLog struct {
	Auth auth.AuthKeeper
	// contains filtered or unexported fields
}

func (*HostLog) Close

func (log *HostLog) Close() error

Close the log and underlying journal

func (*HostLog) ListLog

func (sj *HostLog) ListLog(ctx context.Context, req *mcp.CallToolRequest, params *ListLogParams) (*mcp.CallToolResult, any, error)

get the lat log entries for a given unit, else just the last messages

type ListLogParams

type ListLogParams struct {
	Count     int       `json:"count,omitempty" jsonschema:"Number of log lines to output"`
	Offset    int       `json:"offset,omitempty" jsonschema:"Number of newest log entries to skip for pagination"`
	From      time.Time `json:"from,omitempty" jsonschema:"Start time for filtering logs"`
	To        time.Time `json:"to,omitempty" jsonschema:"End time for filtering logs "`
	Pattern   string    `json:"pattern,omitempty" jsonschema:"Regular expression pattern to filter log messages or units."`
	Unit      []string  `` /* 214-byte string literal not displayed */
	ExactUnit bool      `json:"exact_unit,omitempty" jsonschema:"Treat the first name unit as exact idendtifier and not as regular expression"`
	AllBoots  bool      `json:"allboots,omitempty" jsonschema:"Get the log entries from all boots, not just the active one"`
}

type ListLogResult added in v0.2.0

type ListLogResult struct {
	Host          string      `json:"host"`
	NrMessages    int         `json:"nr_messages"`
	Hint          string      `json:"hint,omitempty"`
	Documentation []ManPage   `json:"documentation,omitempty"`
	Messages      []LogOutput `json:"messages"`
	Identifier    string      `json:"identifier,omitempty"`
	UnitName      string      `json:"unit_name,omitempty"`
}

type LogOutput added in v0.2.0

type LogOutput struct {
	Time       time.Time `json:"time"`
	Identifier string    `json:"identifier,omitempty"`
	UnitName   string    `json:"unit_name,omitempty"`
	ExeName    string    `json:"exe_name,omitempty"`
	Host       string    `json:"host,omitempty"`
	Msg        string    `json:"message"`
	Boot       string    `json:"bootid,omitempty"`
}

type ManPage added in v0.2.0

type ManPage struct {
	Name        string `json:"name"`
	Section     string `json:"section"`
	Description string `json:"description"`
}

Jump to

Keyboard shortcuts

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