schema

package
v0.0.44 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action int
const (
	STOP Action = iota
	CONTINUE
	SKIP
)

type Buffer

type Buffer interface {
	Write([]byte) error
	Read() []byte
}

type Cfg

type Cfg struct {
	Viper  *viper.Viper
	Logger log.API
}

type Container

type Container interface {
	Init() error
	FInit() error
	Add([]Plug) error
	Remove(string) error
	Get(...string) ([]Plug, error)
}

type Loader

type Loader interface {
	Init() error
	FInit() error
	Load(...NewPlug) ([]Plug, error)
}

type NewPlug

type NewPlug = func(func(*Cfg)) (Plug, error)
var NewPlugObj NewPlug

type Opts

type Opts interface {
	Set(interface{}, interface{})
	Get(interface{}) (interface{}, bool)
}

type Plug

type Plug interface {
	Name() string
	Init() error
	FInit() error
	Interest(*proto.Msg, PlugTools) (Action, error)
	PreProcess(*proto.Msg, PlugTools) (Action, error)
	Process(*proto.Msg, PlugTools) (Action, error)
	PostProcess(*proto.Msg, PlugTools) (Action, error)
}

type PlugTools

type PlugTools interface {
	Opts
	Buffer
}

Jump to

Keyboard shortcuts

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