handler

package
v0.5.6 Latest Latest
Warning

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

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

Documentation

Overview

Package handler provides an eventsocket.Handler which creates JSON files in response to UUID Open events.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ThreadedHandler

type ThreadedHandler interface {
	eventsocket.Handler
	ProcessIncomingRequests(ctx context.Context)
}

ThreadedHandler is an eventsocket.Handler that has a separate method for handling incoming requests in a separate goroutine, to ensure that event notifications are not missed.

func New

func New(datadir string, buffersize int, annotators []annotator.Annotator) ThreadedHandler

New creates an eventsocket.Handler that saves the metadata for each file. The actual handling of each event is in a separate goroutine that should be started by calling ProcessIncomingRequests. This two-part handling is there to ensure that events arriving close together are not missed, even if disk IO latency is high.

Jump to

Keyboard shortcuts

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