Documentation ¶
Index ¶
Constants ¶
const ( // ErrorHandlingFailProcessor instructs laminar to fully fail the processor // when the error is encountered ErrorHandlingFailProcessor = iota // ErrorHandlingContinue ignores the error from goka's perspective ErrorHandlingContinue // ErrorHandlingDeleteValue deletes the value which caused the error using // goka.Context.Delete() ErrorHandlingDeleteValue )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CodecAfterEncodeFunc ¶
CodecAfterEncodeFunc is called after the Encode function of a codec to modify the raw message
type CodecBeforeDecodeFunc ¶
CodecBeforeDecodeFunc is called before the Decode function of a codec to enrich the context.Context or modify the raw message
type MiddlewareContext ¶
MiddlewareContext extends a goka.Context with elements useful for crafting middlewares
type MiddlewareEnablingCodec ¶
type MiddlewareEnablingCodec interface { DecodeEx(ctx context.Context, rawMessage []byte) (interface{}, error) EncodeEx(ctx context.Context, msg interface{}) ([]byte, error) }
MiddlewareEnablingCodec expounds a Goka codec with additional processing contextual information
type ProcessingAfterFunc ¶
type ProcessingAfterFunc func(ctx MiddlewareContext, fromLog, toLog interface{}) (interface{}, error)
ProcessingAfterFunc may be used to modify the value returned from a ProcessingCallback.
type ProcessingBeforeFunc ¶
type ProcessingBeforeFunc func(ctx MiddlewareContext, msg interface{}) ( context.Context, error)
ProcessingBeforeFunc is called before a ProcessingCallback and can enrich the process's context
type ProcessingErrorHandler ¶
type ProcessingErrorHandler func(ctx MiddlewareContext, err error) uint
ProcessingErrorHandler is notified when a processing error is encountered and may return ErrorHandling* options to instruct laminar of how to handle the error
type ProcessingFinalizer ¶
type ProcessingFinalizer func(ctx MiddlewareContext, err error, msg interface{})
ProcessingFinalizer will always be called after all other functions after processing a single message
type ProcessingHandler ¶
type ProcessingHandler interface {
ProcessCallback() goka.ProcessCallback
}
ProcessingHandler assembles Processing* functions together to be presented to goka