Documentation ¶
Overview ¶
Package globalfilter provides GlobalFilter.
Index ¶
- Constants
- type GlobalFilter
- func (gf *GlobalFilter) Category() supervisor.ObjectCategory
- func (gf *GlobalFilter) Close()
- func (gf *GlobalFilter) DefaultSpec() interface{}
- func (gf *GlobalFilter) Handle(ctx *context.Context, handler context.Handler)
- func (gf *GlobalFilter) Inherit(superSpec *supervisor.Spec, previousGeneration supervisor.Object)
- func (gf *GlobalFilter) Init(superSpec *supervisor.Spec)
- func (gf *GlobalFilter) Kind() string
- func (gf *GlobalFilter) Status() *supervisor.Status
- type Spec
Constants ¶
View Source
const ( // Category is the category of GlobalFilter. Category = supervisor.CategoryBusinessController // Kind is the kind of GlobalFilter. Kind = "GlobalFilter" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GlobalFilter ¶
type GlobalFilter struct {
// contains filtered or unexported fields
}
GlobalFilter is a business controller. It provides handler before and after pipeline in HTTPServer.
func (*GlobalFilter) Category ¶
func (gf *GlobalFilter) Category() supervisor.ObjectCategory
Category returns the object category of itself.
func (*GlobalFilter) DefaultSpec ¶
func (gf *GlobalFilter) DefaultSpec() interface{}
DefaultSpec returns the default spec. It must return a pointer to point a struct.
func (*GlobalFilter) Handle ¶
func (gf *GlobalFilter) Handle(ctx *context.Context, handler context.Handler)
Handle `beforePipeline` and `afterPipeline` before and after the handler is executed.
func (*GlobalFilter) Inherit ¶
func (gf *GlobalFilter) Inherit(superSpec *supervisor.Spec, previousGeneration supervisor.Object)
Inherit inherits previous generation of GlobalFilter.
func (*GlobalFilter) Init ¶
func (gf *GlobalFilter) Init(superSpec *supervisor.Spec)
Init initializes GlobalFilter.
func (*GlobalFilter) Kind ¶
func (gf *GlobalFilter) Kind() string
Kind returns the unique kind name to represent itself.
func (*GlobalFilter) Status ¶
func (gf *GlobalFilter) Status() *supervisor.Status
Status returns its runtime status.
Click to show internal directories.
Click to hide internal directories.