Documentation ¶
Index ¶
- Variables
- func UrlTagResolver(fieldname, token string) (*structproto.Tag, error)
- type ErrorHandlerMiddleware
- type EventEvidence
- type EventLog
- type LoggingHandleModule
- func (*LoggingHandleModule) CanSetSuccessor() bool
- func (*LoggingHandleModule) OnInitComplete()
- func (*LoggingHandleModule) OnStart(ctx context.Context) error
- func (*LoggingHandleModule) OnStop(ctx context.Context) error
- func (m *LoggingHandleModule) ProcessRequest(ctx *RequestCtx, state RequestState, recover *Recover)
- func (m *LoggingHandleModule) SetSuccessor(successor RequestHandleModule)
- type LoggingMiddleware
- type LoggingService
- type RequestHandlerBinder
- type RequestManagerBinder
- type RequestManagerMiddleware
- type RewriterMiddleware
- type TracingMiddleware
- type UnhandledRequestHandlerMiddleware
- type XHttpMethodHeaderMiddleware
- type XHttpMethodHeaderRouteResolveModule
- func (m *XHttpMethodHeaderRouteResolveModule) CanSetSuccessor() bool
- func (m *XHttpMethodHeaderRouteResolveModule) ResolveHttpMethod(ctx *RequestCtx) string
- func (m *XHttpMethodHeaderRouteResolveModule) ResolveHttpPath(ctx *RequestCtx) string
- func (m *XHttpMethodHeaderRouteResolveModule) SetSuccessor(successor RouteResolver)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
TAG_URL = "url"
)
Functions ¶
func UrlTagResolver ¶
func UrlTagResolver(fieldname, token string) (*structproto.Tag, error)
Types ¶
type ErrorHandlerMiddleware ¶
type ErrorHandlerMiddleware struct {
Handler ErrorHandler
}
func (*ErrorHandlerMiddleware) Init ¶
func (m *ErrorHandlerMiddleware) Init(app *host.AppModule)
Init implements internal.Middleware
type EventEvidence ¶
type EventEvidence struct {
// contains filtered or unexported fields
}
func (EventEvidence) RequestRoutePath ¶
func (e EventEvidence) RequestRoutePath() internal.RoutePath
func (EventEvidence) RequestSpanID ¶
func (e EventEvidence) RequestSpanID() trace.SpanID
func (EventEvidence) RequestTraceID ¶
func (e EventEvidence) RequestTraceID() trace.TraceID
type EventLog ¶
type EventLog interface { OnError(ctx *internal.RequestCtx, err interface{}, stackTrace []byte) OnProcessRequest(ctx *internal.RequestCtx) OnProcessRequestComplete(ctx *internal.RequestCtx, flag response.ResponseFlag) Flush() }
type LoggingHandleModule ¶
type LoggingHandleModule struct {
// contains filtered or unexported fields
}
func (*LoggingHandleModule) CanSetSuccessor ¶
func (*LoggingHandleModule) CanSetSuccessor() bool
CanSetSuccessor implements RequestHandleModule
func (*LoggingHandleModule) OnInitComplete ¶
func (*LoggingHandleModule) OnInitComplete()
OnInitComplete implements RequestHandleModule
func (*LoggingHandleModule) OnStart ¶
func (*LoggingHandleModule) OnStart(ctx context.Context) error
OnStart implements RequestHandleModule
func (*LoggingHandleModule) OnStop ¶
func (*LoggingHandleModule) OnStop(ctx context.Context) error
OnStop implements RequestHandleModule
func (*LoggingHandleModule) ProcessRequest ¶
func (m *LoggingHandleModule) ProcessRequest(ctx *RequestCtx, state RequestState, recover *Recover)
ProcessRequest implements RequestHandleModule
func (*LoggingHandleModule) SetSuccessor ¶
func (m *LoggingHandleModule) SetSuccessor(successor RequestHandleModule)
SetSuccessor implements RequestHandleModule
type LoggingMiddleware ¶
type LoggingMiddleware struct {
LoggingService LoggingService
}
func (*LoggingMiddleware) Init ¶
func (m *LoggingMiddleware) Init(app *host.AppModule)
Init implements internal.Middleware
type LoggingService ¶
type LoggingService interface { CreateEventLog(ev EventEvidence) EventLog ConfigureLogger(l *log.Logger) }
type RequestHandlerBinder ¶
type RequestHandlerBinder struct {
// contains filtered or unexported fields
}
func (*RequestHandlerBinder) Bind ¶
func (b *RequestHandlerBinder) Bind(field structproto.FieldInfo, target reflect.Value) error
func (*RequestHandlerBinder) Deinit ¶
func (b *RequestHandlerBinder) Deinit(context *structproto.StructProtoContext) error
func (*RequestHandlerBinder) Init ¶
func (b *RequestHandlerBinder) Init(context *structproto.StructProtoContext) error
type RequestManagerBinder ¶
type RequestManagerBinder struct {
// contains filtered or unexported fields
}
func (*RequestManagerBinder) Bind ¶
func (b *RequestManagerBinder) Bind(field structproto.FieldInfo, rv reflect.Value) error
func (*RequestManagerBinder) Deinit ¶
func (b *RequestManagerBinder) Deinit(context *structproto.StructProtoContext) error
func (*RequestManagerBinder) Init ¶
func (b *RequestManagerBinder) Init(context *structproto.StructProtoContext) error
type RequestManagerMiddleware ¶
type RequestManagerMiddleware struct {
RequestManager interface{}
}
func (*RequestManagerMiddleware) Init ¶
func (m *RequestManagerMiddleware) Init(app *host.AppModule)
Init implements internal.Middleware
type RewriterMiddleware ¶
type RewriterMiddleware struct {
Handler RewriteHandler
}
func (*RewriterMiddleware) Init ¶
func (m *RewriterMiddleware) Init(app *host.AppModule)
Init implements internal.Middleware
type TracingMiddleware ¶
type TracingMiddleware struct {
Enabled bool
}
func (*TracingMiddleware) Init ¶
func (m *TracingMiddleware) Init(app *host.AppModule)
Init implements internal.Middleware
type UnhandledRequestHandlerMiddleware ¶
type UnhandledRequestHandlerMiddleware struct {
Handler RequestHandler
}
func (*UnhandledRequestHandlerMiddleware) Init ¶
func (m *UnhandledRequestHandlerMiddleware) Init(app *host.AppModule)
type XHttpMethodHeaderMiddleware ¶
type XHttpMethodHeaderMiddleware struct {
Headers []string
}
func (*XHttpMethodHeaderMiddleware) Init ¶
func (m *XHttpMethodHeaderMiddleware) Init(app *host.AppModule)
Init implements internal.Middleware
type XHttpMethodHeaderRouteResolveModule ¶
type XHttpMethodHeaderRouteResolveModule struct {
// contains filtered or unexported fields
}
func (*XHttpMethodHeaderRouteResolveModule) CanSetSuccessor ¶
func (m *XHttpMethodHeaderRouteResolveModule) CanSetSuccessor() bool
func (*XHttpMethodHeaderRouteResolveModule) ResolveHttpMethod ¶
func (m *XHttpMethodHeaderRouteResolveModule) ResolveHttpMethod(ctx *RequestCtx) string
func (*XHttpMethodHeaderRouteResolveModule) ResolveHttpPath ¶
func (m *XHttpMethodHeaderRouteResolveModule) ResolveHttpPath(ctx *RequestCtx) string
func (*XHttpMethodHeaderRouteResolveModule) SetSuccessor ¶
func (m *XHttpMethodHeaderRouteResolveModule) SetSuccessor(successor RouteResolver)
Source Files ¶
- def.go
- errorHandlerMiddleware.go
- eventEvidence.go
- loggingHandleModule.go
- loggingMiddleware.go
- requestHandlerBinder.go
- requestManagerBinder.go
- requestManagerMiddleware.go
- rewriterMiddleware.go
- tracingMiddleware.go
- unhandledRequestHandlerMiddleware.go
- urlTagResolver.go
- util.go
- xHttpMethodHeaderMiddleware.go
- xHttpMethodHeaderRouteResolveModule.go
Click to show internal directories.
Click to hide internal directories.