event

package
v0.0.0-...-d0e1f26 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Event     string    `json:"event"`
	Timestamp time.Time `json:"timestamp"`
}

Event represents an incoming event from the journal

type Handler

type Handler func([]byte)

type Timestamp

type Timestamp struct {
	time.Time
}

Timestamp implements custom json marshaler/unmarshaler interfaces, parsing timestamps from RFC 3339 format and encoding into unix timestamps

func (Timestamp) MarshalJSON

func (t Timestamp) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface

func (*Timestamp) UnmarshalJSON

func (t *Timestamp) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the json.Unmarshaler interface

type Watcher

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

func (*Watcher) Read

func (w *Watcher) Read(path string)

func (*Watcher) Start

func (w *Watcher) Start()

func (*Watcher) Stop

func (w *Watcher) Stop()

func (*Watcher) Watch

func (w *Watcher) Watch(path string) error

Jump to

Keyboard shortcuts

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