Documentation ¶
Index ¶
- Constants
- Variables
- func TopicTagResolver(fieldname, token string) (*structproto.Tag, error)
- type CompositeEventLog
- 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) ProcessMessage(ctx *internal.Context, message *nsq.Message, state internal.ProcessingState, ...) error
- func (m *LoggingHandleModule) SetSuccessor(successor internal.MessageHandleModule)
- type LoggingMiddleware
- type LoggingService
- type MessageHandlerBinder
- type MessageManagerBinder
- type MessageManagerMiddleware
- type MessageObserverBinder
- type MessageObserverManagerBinder
- type MessageObserverManagerMiddleware
- type NoopEventLog
- type NoopLoggingService
- type TracingMiddleware
Constants ¶
const ( INVALID_MESSAGE_HANDLER_TOPIC_SYMBOL string = "?" TAG_TOPIC = "topic" TAG_OPT_EXPAND_ENV = "@ExpandEnv" OPT_ON = "on" OPT_OFF = "off" )
Variables ¶
var ( NoopLoggingServiceSingleton = NoopLoggingService{} NoopEventLogSingleton = NoopEventLog(0) )
Functions ¶
func TopicTagResolver ¶
func TopicTagResolver(fieldname, token string) (*structproto.Tag, error)
Types ¶
type CompositeEventLog ¶ added in v0.3.3
type CompositeEventLog struct {
// contains filtered or unexported fields
}
func (CompositeEventLog) Flush ¶ added in v0.3.3
func (l CompositeEventLog) Flush()
Flush implements EventLog.
func (CompositeEventLog) OnError ¶ added in v0.3.3
func (l CompositeEventLog) OnError(message *nsq.Message, err interface{}, stackTrace []byte)
OnError implements EventLog.
func (CompositeEventLog) OnProcessMessage ¶ added in v0.3.3
func (l CompositeEventLog) OnProcessMessage(message *nsq.Message)
OnProcessMessage implements EventLog.
func (CompositeEventLog) OnProcessMessageComplete ¶ added in v0.3.3
func (l CompositeEventLog) OnProcessMessageComplete(message *nsq.Message, reply internal.ReplyCode)
OnProcessMessageComplete implements EventLog.
type CompositeLoggingService ¶ added in v0.3.3
type CompositeLoggingService struct {
// contains filtered or unexported fields
}
func NewCompositeLoggingService ¶ added in v0.3.3
func NewCompositeLoggingService(services ...LoggingService) *CompositeLoggingService
func (*CompositeLoggingService) ConfigureLogger ¶ added in v0.3.3
func (s *CompositeLoggingService) ConfigureLogger(l *log.Logger)
ConfigureLogger implements LoggingService.
func (*CompositeLoggingService) CreateEventLog ¶ added in v0.3.3
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) ProcessingSpanID ¶
func (e EventEvidence) ProcessingSpanID() trace.SpanID
func (EventEvidence) ProcessingTraceID ¶
func (e EventEvidence) ProcessingTraceID() trace.TraceID
func (EventEvidence) Topic ¶
func (e EventEvidence) Topic() string
type LoggingHandleModule ¶
type LoggingHandleModule struct {
// contains filtered or unexported fields
}
func (*LoggingHandleModule) CanSetSuccessor ¶
func (*LoggingHandleModule) CanSetSuccessor() bool
CanSetSuccessor implements internal.MessageHandleModule.
func (*LoggingHandleModule) OnInitComplete ¶
func (*LoggingHandleModule) OnInitComplete()
OnInitComplete implements internal.MessageHandleModule.
func (*LoggingHandleModule) OnStart ¶
func (*LoggingHandleModule) OnStart(ctx context.Context) error
OnStart implements internal.MessageHandleModule.
func (*LoggingHandleModule) OnStop ¶
func (*LoggingHandleModule) OnStop(ctx context.Context) error
OnStop implements internal.MessageHandleModule.
func (*LoggingHandleModule) ProcessMessage ¶
func (m *LoggingHandleModule) ProcessMessage(ctx *internal.Context, message *nsq.Message, state internal.ProcessingState, recover *internal.Recover) error
ProcessMessage implements internal.MessageHandleModule.
func (*LoggingHandleModule) SetSuccessor ¶
func (m *LoggingHandleModule) SetSuccessor(successor internal.MessageHandleModule)
SetSuccessor implements internal.MessageHandleModule.
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 MessageHandlerBinder ¶
type MessageHandlerBinder struct {
// contains filtered or unexported fields
}
func (*MessageHandlerBinder) Bind ¶
func (b *MessageHandlerBinder) Bind(field structproto.FieldInfo, target reflect.Value) error
func (*MessageHandlerBinder) Deinit ¶
func (b *MessageHandlerBinder) Deinit(context *structproto.StructProtoContext) error
func (*MessageHandlerBinder) Init ¶
func (b *MessageHandlerBinder) Init(context *structproto.StructProtoContext) error
type MessageManagerBinder ¶
type MessageManagerBinder struct {
// contains filtered or unexported fields
}
func (*MessageManagerBinder) Bind ¶
func (b *MessageManagerBinder) Bind(field structproto.FieldInfo, rv reflect.Value) error
func (*MessageManagerBinder) Deinit ¶
func (b *MessageManagerBinder) Deinit(context *structproto.StructProtoContext) error
func (*MessageManagerBinder) Init ¶
func (b *MessageManagerBinder) Init(context *structproto.StructProtoContext) error
type MessageManagerMiddleware ¶
type MessageManagerMiddleware struct {
MessageManager interface{}
}
func (*MessageManagerMiddleware) Init ¶
func (m *MessageManagerMiddleware) Init(app *host.AppModule)
type MessageObserverBinder ¶
type MessageObserverBinder struct {
// contains filtered or unexported fields
}
func (*MessageObserverBinder) Bind ¶
func (b *MessageObserverBinder) Bind(field structproto.FieldInfo, target reflect.Value) error
Bind implements structproto.StructBinder.
func (*MessageObserverBinder) Deinit ¶
func (b *MessageObserverBinder) Deinit(context *structproto.StructProtoContext) error
Deinit implements structproto.StructBinder.
func (*MessageObserverBinder) Init ¶
func (*MessageObserverBinder) Init(context *structproto.StructProtoContext) error
Init implements structproto.StructBinder.
type MessageObserverManagerBinder ¶
type MessageObserverManagerBinder struct {
// contains filtered or unexported fields
}
func (*MessageObserverManagerBinder) Bind ¶
func (b *MessageObserverManagerBinder) Bind(field structproto.FieldInfo, rv reflect.Value) error
Bind implements structproto.StructBinder.
func (*MessageObserverManagerBinder) Deinit ¶
func (*MessageObserverManagerBinder) Deinit(context *structproto.StructProtoContext) error
Deinit implements structproto.StructBinder.
func (*MessageObserverManagerBinder) Init ¶
func (*MessageObserverManagerBinder) Init(context *structproto.StructProtoContext) error
Init implements structproto.StructBinder.
type MessageObserverManagerMiddleware ¶
type MessageObserverManagerMiddleware struct {
MessageObserverManager interface{}
}
func (*MessageObserverManagerMiddleware) Init ¶
func (m *MessageObserverManagerMiddleware) Init(app *host.AppModule)
Init implements internal.Middleware.
type NoopEventLog ¶ added in v0.3.3
type NoopEventLog int
func (NoopEventLog) Flush ¶ added in v0.3.3
func (n NoopEventLog) Flush()
Flush implements EventLog.
func (NoopEventLog) OnError ¶ added in v0.3.3
func (n NoopEventLog) OnError(message *nsq.Message, err interface{}, stackTrace []byte)
OnError implements EventLog.
func (NoopEventLog) OnProcessMessage ¶ added in v0.3.3
func (n NoopEventLog) OnProcessMessage(message *nsq.Message)
OnProcessMessage implements EventLog.
func (NoopEventLog) OnProcessMessageComplete ¶ added in v0.3.3
func (n NoopEventLog) OnProcessMessageComplete(message *nsq.Message, reply internal.ReplyCode)
OnProcessMessageComplete implements EventLog.
type NoopLoggingService ¶ added in v0.3.3
type NoopLoggingService struct{}
func (NoopLoggingService) ConfigureLogger ¶ added in v0.3.3
func (n NoopLoggingService) ConfigureLogger(l *log.Logger)
ConfigureLogger implements LoggingService.
func (NoopLoggingService) CreateEventLog ¶ added in v0.3.3
func (n NoopLoggingService) CreateEventLog(ev EventEvidence) EventLog
CreateEventLog implements LoggingService.
type TracingMiddleware ¶
type TracingMiddleware struct {
Enabled bool
}
func (*TracingMiddleware) Init ¶
func (m *TracingMiddleware) Init(app *host.AppModule)
Init implements internal.Middleware.
Source Files ¶
- compositeEventLog.go
- compositeLoggingService.go
- def.go
- errorHandlerMiddleware.go
- eventEvidence.go
- loggingHandleModule.go
- loggingMiddleware.go
- messageHandlerBinder.go
- messageManagerBinder.go
- messageManagerMiddleware.go
- messageObserverBinder.go
- messageObserverManagerBinder.go
- messageObserverManagerMiddleware.go
- noopEventLog.go
- noopLoggerService.go
- topicTagResolver.go
- tracingMiddleware.go
- util.go