api

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2021 License: Apache-2.0 Imports: 2 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.

Jump to

Keyboard shortcuts

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