udf

package
v0.0.0-...-9750751 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(udfDir string)

Types

type CounterUDF

type CounterUDF struct{}

built-in simple counter UDF

func (*CounterUDF) Call

func (u *CounterUDF) Call(key []byte, value []byte, params []byte) (res []byte, err error)

func (*CounterUDF) GetName

func (u *CounterUDF) GetName() string

func (*CounterUDF) GetVersion

func (u *CounterUDF) GetVersion() uint32

type EchoUDF

type EchoUDF struct{}

Echo udf

func (*EchoUDF) Call

func (u *EchoUDF) Call(key []byte, value []byte, params []byte) (res []byte, err error)

func (*EchoUDF) GetName

func (u *EchoUDF) GetName() string

func (*EchoUDF) GetVersion

func (u *EchoUDF) GetVersion() uint32

type HelloUDF

type HelloUDF struct{}

Hello udf

func (*HelloUDF) Call

func (u *HelloUDF) Call(key []byte, value []byte, params []byte) (res []byte, err error)

func (*HelloUDF) GetName

func (u *HelloUDF) GetName() string

func (*HelloUDF) GetVersion

func (u *HelloUDF) GetVersion() uint32

type IUDF

type IUDF interface {
	Call(key []byte, value []byte, params []byte) (res []byte, err error)
	GetVersion() uint32
	GetName() string
}

type UDFMap

type UDFMap map[string]IUDF

type UDFMgr

type UDFMgr struct {
	// contains filtered or unexported fields
}

func GetUDFManager

func GetUDFManager() *UDFMgr

func NewUDFManager

func NewUDFManager(udfDir string) (m *UDFMgr, err error)

func (*UDFMgr) GetUDF

func (m *UDFMgr) GetUDF(name string) IUDF

thread safe

func (*UDFMgr) Init

func (m *UDFMgr) Init() (err error)

thread safe

Directories

Path Synopsis
example_plugins

Jump to

Keyboard shortcuts

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