daemonemit

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EventLogPath

func EventLogPath(root string) string

func PayloadFromJSON

func PayloadFromJSON(raw string) (map[string]any, error)

Types

type Event

type Event struct {
	SchemaVersion int            `json:"schema_version"`
	ID            string         `json:"id"`
	TS            string         `json:"ts"`
	Type          string         `json:"type"`
	Loop          *string        `json:"loop"`
	Host          *string        `json:"host"`
	Actor         string         `json:"actor"`
	Source        string         `json:"source"`
	CorrelationID string         `json:"correlation_id"`
	CausedBy      *string        `json:"caused_by"`
	Payload       map[string]any `json:"payload"`
	ProjectRoot   string         `json:"project_root,omitempty"`
	Store         string         `json:"store,omitempty"`
}

func Emit

func Emit(opts Options) (Event, string, error)

func NewEvent

func NewEvent(opts Options) (Event, error)

type Options

type Options struct {
	Root          string
	Topic         string
	Payload       map[string]any
	CorrelationID string
	CausedBy      string
	Loop          string
	Host          string
	Actor         string
	Source        string
	ProjectRoot   string
	Store         string
	Now           time.Time
}

Jump to

Keyboard shortcuts

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