event

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2021 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 watcher.Machine) Event

New creates a new event

func (*Event) CloudEvent

func (e *Event) CloudEvent(data interface{}) cloudevents.Event

CloudEvent creates a CloudEvent from the state notification

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