Documentation ¶
Index ¶
- Constants
- Variables
- func StreamTagResolve(fieldname, token string) (*structproto.Tag, error)
- type CompositeEventLog
- type CompositeLoggingService
- type ConfigureInvalidMessageHandleProc
- type ConfigureStream
- 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 *redis.Message, state internal.ProcessingState, ...)
- 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_STREAM_SYMBOL = "?" TAG_STREAM = "stream" TAG_OFFSET = "offset" TAG_OPT_EXPAND_ENV = "@ExpandEnv" TAG_OPT_MESSAGE_STATE_KEY_PREFIX = "@MessageStateKeyPrefix" )
Variables ¶
var ( NoopLoggingServiceSingleton = NoopLoggingService{} NoopEventLogSingleton = NoopEventLog(0) )
Functions ¶
func StreamTagResolve ¶
func StreamTagResolve(fieldname, token string) (*structproto.Tag, error)
Types ¶
type CompositeEventLog ¶
type CompositeEventLog struct {
// contains filtered or unexported fields
}
func (CompositeEventLog) OnError ¶
func (l CompositeEventLog) OnError(message *redis.Message, err interface{}, stackTrace []byte)
OnError implements EventLog.
func (CompositeEventLog) OnProcessMessage ¶
func (l CompositeEventLog) OnProcessMessage(message *redis.Message)
OnProcessMessage implements EventLog.
func (CompositeEventLog) OnProcessMessageComplete ¶
func (l CompositeEventLog) OnProcessMessageComplete(message *redis.Message, reply internal.ReplyCode)
OnProcessMessageComplete 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 ConfigureInvalidMessageHandleProc ¶
type ConfigureInvalidMessageHandleProc func(handler internal.MessageHandler)
type ConfigureStream ¶
type ConfigureStream func(stream internal.StreamOffset)
type ErrorHandlerMiddleware ¶
type ErrorHandlerMiddleware struct {
Handler ErrorHandler
}
func (*ErrorHandlerMiddleware) Init ¶
func (m *ErrorHandlerMiddleware) Init(app *host.AppModule)
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) Stream ¶
func (e EventEvidence) Stream() 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 *redis.Message, state internal.ProcessingState, recover *internal.Recover)
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
Bind implements structproto.StructBinder.
func (*MessageHandlerBinder) Deinit ¶
func (b *MessageHandlerBinder) Deinit(context *structproto.StructProtoContext) error
Deinit implements structproto.StructBinder.
func (*MessageHandlerBinder) Init ¶
func (b *MessageHandlerBinder) Init(context *structproto.StructProtoContext) error
Init implements structproto.StructBinder.
type MessageManagerBinder ¶
type MessageManagerBinder struct {
// contains filtered or unexported fields
}
func (*MessageManagerBinder) Bind ¶
func (b *MessageManagerBinder) Bind(field structproto.FieldInfo, rv reflect.Value) error
Bind implements structproto.StructBinder.
func (*MessageManagerBinder) Deinit ¶
func (b *MessageManagerBinder) Deinit(context *structproto.StructProtoContext) error
Deinit implements structproto.StructBinder.
func (*MessageManagerBinder) Init ¶
func (b *MessageManagerBinder) Init(context *structproto.StructProtoContext) error
Init implements structproto.StructBinder.
type MessageManagerMiddleware ¶
type MessageManagerMiddleware struct {
MessageManager interface{}
}
func (*MessageManagerMiddleware) Init ¶
func (m *MessageManagerMiddleware) Init(app *host.AppModule)
Init implements internal.Middleware.
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 ¶
type NoopEventLog int
func (NoopEventLog) OnError ¶
func (NoopEventLog) OnError(*redis.Message, interface{}, []byte)
OnError implements EventLog.
func (NoopEventLog) OnProcessMessage ¶
func (NoopEventLog) OnProcessMessage(*redis.Message)
OnProcessMessage implements EventLog.
func (NoopEventLog) OnProcessMessageComplete ¶
func (NoopEventLog) OnProcessMessageComplete(*redis.Message, internal.ReplyCode)
OnProcessMessageComplete 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 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
- streamTagResolver.go
- tracingMiddleware.go
- util.go