plugin

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2021 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const Namespace = "github.com/starvn/turbo/transport/http/server/plugin"

Variables

This section is empty.

Functions

func Load

func Load(path, pattern string, rcf RegisterHandlerFunc) (int, error)

func LoadWithLogger

func LoadWithLogger(path, pattern string, rcf RegisterHandlerFunc, logger log.Logger) (int, error)

func RegisterHandler

func RegisterHandler(
	name string,
	handler func(context.Context, map[string]interface{}, http.Handler) (http.Handler, error),
)

Types

type LoggerRegisterer

type LoggerRegisterer interface {
	RegisterLogger(interface{})
}

type Plugin

type Plugin interface {
	Lookup(name string) (plugin.Symbol, error)
}

type RegisterHandlerFunc

type RegisterHandlerFunc func(
	name string,
	handler func(context.Context, map[string]interface{}, http.Handler) (http.Handler, error),
)

type Registerer

type Registerer interface {
	RegisterHandlers(func(
		name string,
		handler func(context.Context, map[string]interface{}, http.Handler) (http.Handler, error),
	))
}

type RunServer

func New

func New(logger log.Logger, next RunServer) RunServer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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