event

package
v0.29.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Protocol  string `json:"protocol"`
	Identity  string `json:"identity"`
	ID        string `json:"id"`
	Version   string `json:"version"`
	Timestamp int64  `json:"timestamp"`
	Type      string `json:"type"`
	Machine   string `json:"machine"`
	Name      string `json:"name"`
}

func New

func New(name string, mtype string, version string, machine model.Machine) Event

New creates a new event

func (*Event) CloudEvent

func (e *Event) CloudEvent(data any) cloudevents.Event

CloudEvent creates a CloudEvent from the state notification

func (*Event) MachineName added in v0.24.0

func (e *Event) MachineName() string

MachineName is the name of the autonomous agent

func (*Event) SenderID

func (e *Event) SenderID() string

SenderID is the identity of the event producer

func (*Event) WatcherType

func (e *Event) WatcherType() string

WatcherType is the type of watcher the notification is for - exec, file etc

Jump to

Keyboard shortcuts

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