events

package
v0.4.25-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: ISC Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serialize

func Serialize(event Event) ([]byte, error)

Types

type Chunk

type Chunk struct {
	Timestamp time.Time

	SnapshotID [32]byte
	MAC        [32]byte
}

func ChunkEvent

func ChunkEvent(snapshotID [32]byte, mac [32]byte) Chunk

type ChunkCorrupted

type ChunkCorrupted struct {
	Timestamp time.Time

	SnapshotID [32]byte
	MAC        [32]byte
}

func ChunkCorruptedEvent

func ChunkCorruptedEvent(snapshotID [32]byte, mac [32]byte) ChunkCorrupted

type ChunkMissing

type ChunkMissing struct {
	Timestamp time.Time

	SnapshotID [32]byte
	MAC        [32]byte
}

func ChunkMissingEvent

func ChunkMissingEvent(snapshotID [32]byte, mac [32]byte) ChunkMissing

type ChunkOK

type ChunkOK struct {
	Timestamp time.Time

	SnapshotID [32]byte
	MAC        [32]byte
}

func ChunkOKEvent

func ChunkOKEvent(snapshotID [32]byte, mac [32]byte) ChunkOK

type Directory

type Directory struct {
	Timestamp time.Time

	SnapshotID [32]byte
	Pathname   string
}

func DirectoryEvent

func DirectoryEvent(snapshotID [32]byte, pathname string) Directory

type DirectoryCorrupted

type DirectoryCorrupted struct {
	Timestamp time.Time

	SnapshotID [32]byte
	Pathname   string
}

func DirectoryCorruptedEvent

func DirectoryCorruptedEvent(snapshotID [32]byte, pathname string) DirectoryCorrupted

type DirectoryError

type DirectoryError struct {
	Timestamp time.Time

	SnapshotID [32]byte
	Pathname   string
	Message    string
}

func DirectoryErrorEvent

func DirectoryErrorEvent(snapshotID [32]byte, pathname string, message string) DirectoryError

type DirectoryMissing

type DirectoryMissing struct {
	Timestamp time.Time

	SnapshotID [32]byte
	Pathname   string
}

func DirectoryMissingEvent

func DirectoryMissingEvent(snapshotID [32]byte, pathname string) DirectoryMissing

type DirectoryOK

type DirectoryOK struct {
	Timestamp time.Time

	SnapshotID [32]byte
	Pathname   string
}

func DirectoryOKEvent

func DirectoryOKEvent(snapshotID [32]byte, pathname string) DirectoryOK

type Done

type Done struct {
	Timestamp time.Time
}

func DoneEvent

func DoneEvent() Done

type DoneImporter

type DoneImporter struct {
	Timestamp time.Time

	SnapshotID     [32]byte
	NumFiles       uint64
	NumDirectories uint64
	Size           uint64
}

func DoneImporterEvent

func DoneImporterEvent() DoneImporter

type Error

type Error struct {
	Timestamp time.Time

	SnapshotID [32]byte
	Message    string
}

func ErrorEvent

func ErrorEvent(snapshotID [32]byte, message string) Error

type Event

type Event interface {
}

func Deserialize

func Deserialize(data []byte) (Event, error)

type File

type File struct {
	Timestamp time.Time

	SnapshotID [32]byte
	Pathname   string
}

func FileEvent

func FileEvent(snapshotID [32]byte, pathname string) File

type FileCorrupted

type FileCorrupted struct {
	Timestamp time.Time

	SnapshotID [32]byte
	Pathname   string
}

func FileCorruptedEvent

func FileCorruptedEvent(snapshotID [32]byte, pathname string) FileCorrupted

type FileError

type FileError struct {
	Timestamp time.Time

	SnapshotID [32]byte
	Pathname   string
	Message    string
}

func FileErrorEvent

func FileErrorEvent(snapshotID [32]byte, pathname string, message string) FileError

type FileMissing

type FileMissing struct {
	Timestamp time.Time

	SnapshotID [32]byte
	Pathname   string
}

func FileMissingEvent

func FileMissingEvent(snapshotID [32]byte, pathname string) FileMissing

type FileOK

type FileOK struct {
	Timestamp time.Time

	SnapshotID [32]byte
	Pathname   string
	Size       int64
}

func FileOKEvent

func FileOKEvent(snapshotID [32]byte, pathname string, size int64) FileOK

type Object

type Object struct {
	Timestamp time.Time

	SnapshotID [32]byte
	MAC        [32]byte
}

func ObjectEvent

func ObjectEvent(snapshotID [32]byte, mac [32]byte) Object

type ObjectCorrupted

type ObjectCorrupted struct {
	Timestamp time.Time

	SnapshotID [32]byte
	MAC        [32]byte
}

func ObjectCorruptedEvent

func ObjectCorruptedEvent(snapshotID [32]byte, mac [32]byte) ObjectCorrupted

type ObjectMissing

type ObjectMissing struct {
	Timestamp time.Time

	SnapshotID [32]byte
	MAC        [32]byte
}

func ObjectMissingEvent

func ObjectMissingEvent(snapshotID [32]byte, mac [32]byte) ObjectMissing

type ObjectOK

type ObjectOK struct {
	Timestamp time.Time

	SnapshotID [32]byte
	MAC        [32]byte
}

func ObjectOKEvent

func ObjectOKEvent(snapshotID [32]byte, mac [32]byte) ObjectOK

type Path

type Path struct {
	Timestamp time.Time

	SnapshotID [32]byte
	Pathname   string
}

func PathEvent

func PathEvent(snapshotID [32]byte, pathname string) Path

type PathError

type PathError struct {
	Timestamp time.Time

	SnapshotID [32]byte
	Pathname   string
	Message    string
}

func PathErrorEvent

func PathErrorEvent(snapshotID [32]byte, pathname string, message string) PathError

type Receiver

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

func New

func New() *Receiver

func (*Receiver) Close

func (er *Receiver) Close()

func (*Receiver) Listen

func (er *Receiver) Listen() <-chan interface{}

func (*Receiver) Send

func (er *Receiver) Send(event interface{})

type SerializedEvent

type SerializedEvent struct {
	Type string
	Data []byte
}

type Start

type Start struct {
	Timestamp time.Time
}

func StartEvent

func StartEvent() Start

type StartImporter

type StartImporter struct {
	Timestamp time.Time

	SnapshotID [32]byte
}

func StartImporterEvent

func StartImporterEvent() StartImporter

type Warning

type Warning struct {
	Timestamp time.Time

	SnapshotID [32]byte
	Message    string
}

func WarningEvent

func WarningEvent(snapshotID [32]byte, message string) Warning

Jump to

Keyboard shortcuts

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