eventlog

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event added in v0.4.0

type Event struct {
	// Name the path of file change
	Name string `json:"name"`
	// Op the operation of file change
	Op string `json:"op"`
	// Time the time of file change
	Time timeutil.Time `json:"time"`
}

Event the description of file change event

func NewEvent

func NewEvent(name, op string) Event

NewEvent create an event instance

func (*Event) String added in v0.4.0

func (e *Event) String() string

String return the format event info

type EventLog

type EventLog interface {
	// Write write event info to output writer
	Write(event Event) error
}

EventLog the event log recorder

func New

func New(w io.Writer) EventLog

New create an EventLog instance with io.Writer

Jump to

Keyboard shortcuts

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