observer

package
v0.0.0-...-1a65ef4 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListRegisteredSinkTypes

func ListRegisteredSinkTypes() []string

func Register

func Register(item ObRegItem)

The sink will register itself in `init`. During that the the logger may not be inited. So here we'd better not log anything

Types

type Configuration

type Configuration struct {
	Type       string                 `json:"type"`
	Properties map[string]interface{} `json:"properties"`
}

type ObRegItem

type ObRegItem struct {
	Name        string
	Constructor ObserverConstructor
}

type Observer

type Observer interface {
	Observe() error
	Stop()
	Wait()
}

func CreateObserver

func CreateObserver(config Configuration) (Observer, error)

type ObserverConstructor

type ObserverConstructor func(properties map[string]interface{}) (Observer, error)

func GetConstructor

func GetConstructor(obName string) ObserverConstructor

Jump to

Keyboard shortcuts

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