events

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: MPL-2.0 Imports: 3 Imported by: 3

Documentation

Overview

Package events implements a log of coordinator events.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivationEvent

type ActivationEvent struct {
	MarbleType string `json:"marbleType"`
	UUID       string `json:"uuid"`
	Quote      []byte `json:"quote"`
}

ActivationEvent is an event that is logged when a marble is activated.

type Event

type Event struct {
	Timestamp  time.Time        `json:"time"`
	Activation *ActivationEvent `json:"activation"`
}

Event represents a single event in the event log.

type Log

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

Log is a log of coordinator events.

func NewLog

func NewLog() *Log

NewLog creates a new log.

func (*Log) Activation

func (l *Log) Activation(marbleType string, uuid string, quote []byte)

Activation adds an activation event to the log.

func (*Log) Handler

func (l *Log) Handler() http.HandlerFunc

Handler returns a http.HandlerFunc which writes the log as JSON array.

Jump to

Keyboard shortcuts

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