Documentation ¶
Index ¶
- Variables
- func UrlTagResolver(fieldname, token string) (*structproto.Tag, error)
- type CompositeEventLog
- func (l CompositeEventLog) Flush()
- func (l CompositeEventLog) OnError(ctx *fasthttp.RequestCtx, err interface{}, stackTrace []byte)
- func (l CompositeEventLog) OnProcessRequest(ctx *fasthttp.RequestCtx)
- func (l CompositeEventLog) OnProcessRequestComplete(ctx *fasthttp.RequestCtx, flag responseutil.ResponseFlag)
- type CompositeLoggingService
- 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 NoopEventLog
- type NoopLoggingService
- 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 ¶
var ( TAG_URL = "url" TAG_OPT_EXPAND_ENV = "@ExpandEnv" TAG_OPT_BIND_METHOD = "@BindMethod" NoopLoggingServiceSingleton = NoopLoggingService{} NoopEventLogSingleton = NoopEventLog(0) )
Functions ¶
func UrlTagResolver ¶
func UrlTagResolver(fieldname, token string) (*structproto.Tag, error)
Types ¶
type CompositeEventLog ¶
type CompositeEventLog struct {
// contains filtered or unexported fields
}
func (CompositeEventLog) OnError ¶
func (l CompositeEventLog) OnError(ctx *fasthttp.RequestCtx, err interface{}, stackTrace []byte)
OnError implements EventLog.
func (CompositeEventLog) OnProcessRequest ¶
func (l CompositeEventLog) OnProcessRequest(ctx *fasthttp.RequestCtx)
OnProcessRequest implements EventLog.
func (CompositeEventLog) OnProcessRequestComplete ¶
func (l CompositeEventLog) OnProcessRequestComplete(ctx *fasthttp.RequestCtx, flag responseutil.ResponseFlag)
OnProcessRequestComplete implements EventLog.
type CompositeLoggingService ¶
type CompositeLoggingService struct {
// contains filtered or unexported fields
}
func NewCompositeLoggingService ¶
func NewCompositeLoggingService(services ...LoggingService) *CompositeLoggingService
func (*CompositeLoggingService) ConfigureLogger ¶
func (s *CompositeLoggingService) ConfigureLogger(l *log.Logger)
ConfigureLogger implements LoggingService.
func (*CompositeLoggingService) CreateEventLog ¶
func (s *CompositeLoggingService) CreateEventLog(ev EventEvidence) EventLog
CreateEventLog implements LoggingService.
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 NoopEventLog ¶
type NoopEventLog int
func (NoopEventLog) OnError ¶
func (NoopEventLog) OnError(ctx *fasthttp.RequestCtx, err interface{}, stackTrace []byte)
OnError implements EventLog.
func (NoopEventLog) OnProcessRequest ¶
func (NoopEventLog) OnProcessRequest(ctx *fasthttp.RequestCtx)
OnProcessRequest implements EventLog.
func (NoopEventLog) OnProcessRequestComplete ¶
func (NoopEventLog) OnProcessRequestComplete(ctx *fasthttp.RequestCtx, flag responseutil.ResponseFlag)
OnProcessRequestComplete implements EventLog.
type NoopLoggingService ¶
type NoopLoggingService struct{}
func (NoopLoggingService) ConfigureLogger ¶
func (NoopLoggingService) ConfigureLogger(*log.Logger)
ConfigureLogger implements LoggingService.
func (NoopLoggingService) CreateEventLog ¶
func (NoopLoggingService) CreateEventLog(EventEvidence) EventLog
CreateEventLog implements LoggingService.
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 ¶
- compositeEventLog.go
- compositeLoggingService.go
- def.go
- errorHandlerMiddleware.go
- eventEvidence.go
- loggingHandleModule.go
- loggingMiddleware.go
- noopEventLog.go
- noopLoggerService.go
- requestHandlerBinder.go
- requestManagerBinder.go
- requestManagerMiddleware.go
- rewriterMiddleware.go
- tracingMiddleware.go
- unhandledRequestHandlerMiddleware.go
- urlTagResolver.go
- util.go
- xHttpMethodHeaderMiddleware.go
- xHttpMethodHeaderRouteResolveModule.go