api

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ShutdownHookTime = time.Second * 5

ShutdownHookTime is the global shutdown hook time.

Functions

This section is empty.

Types

type Module

type Module interface {
	// Prepare would do some preparing workers, such build connection with external services.
	Prepare() error
	// Boot would start the module and return error when started failed. When a stop signal received
	// or an exception occurs, the shutdown function would be called.
	Boot(ctx context.Context)

	// Shutdown could do some clean job to close Module.
	Shutdown()
}

Module id a custom plugin interface, which defines the processing.

type SyncInvoker added in v0.2.0

type SyncInvoker interface {
	// SyncInvoke means synchronized process event
	SyncInvoke(d *v1.SniffData) (*v1.SniffData, error)
}

Jump to

Keyboard shortcuts

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