input

package
v0.0.0-...-6d10cd0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2025 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(ctx context.Context, name string, driver Driver)

Register registers input driver in the catalog of inputs

func RegisterHandlerAll

func RegisterHandlerAll(ctx context.Context, handler Handler)

RegisterHandlerAll register handler in all inputs

func StopAll

func StopAll(ctx context.Context)

StopAll stops all inputs

Types

type Driver

type Driver interface {
	// Name returns name of the driver
	Name() string
	// Type returns type of the driver
	Type() string
	// RegisterHandler register handler with in the driver
	RegisterHandler(ctx context.Context, handler Handler)
	// Stop stop the driver
	Stop(ctx context.Context)
}

Driver input driver interface

type Handler

type Handler func(ctx context.Context, event *payload.Event) (callback interface{})

Handler describes input event handler function

Jump to

Keyboard shortcuts

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