messagejournal

package
v0.0.0-...-7ebb30b Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter struct {
	Persistent bool
	MessageID  string
	Worker     string
	Since      string
	Until      string
}

Filter is a data structure representing the filtering options that are used when message journal entries are retrieved by yggctl.

type MessageJournal

type MessageJournal struct {
	// contains filtered or unexported fields
}

MessageJournal is a data structure representing the collection of message journal entries received from worker emitted events and messages. It also stores the date time of when the journal was initialized to track events and messages in the active session.

func Open

func Open(databaseFilePath string) (*MessageJournal, error)

Open initializes a message journal sqlite database consisting of a persistent table that maintains journal entries across sessions.

func (*MessageJournal) AddEntry

func (j *MessageJournal) AddEntry(entry yggdrasil.WorkerMessage) error

AddEntry adds a new message journal entry to the persistent table in the database.

func (*MessageJournal) GetEntries

func (j *MessageJournal) GetEntries(filter Filter) ([]map[string]string, error)

GetEntries retrieves a list of all the journal entries in the message journal database that meet the criteria of the provided message journal filter.

Jump to

Keyboard shortcuts

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