Documentation ¶
Index ¶
- Constants
- type Bus
- func (bus *Bus) Close()
- func (bus *Bus) Connect() error
- func (bus *Bus) Defer(msg *amqp.Delivery) error
- func (bus *Bus) Handle(msgType string, handlers []HandlerFunc)
- func (bus *Bus) ProcessMessage(msg *amqp.Delivery)
- func (bus *Bus) Publish(msg interface{}, msgType string) error
- func (bus *Bus) Run()
- func (bus *Bus) SendToError(msg *amqp.Delivery) error
- func (bus *Bus) Use(middlewares ...HandlerFunc)
- type BusConfig
- type Context
- type HandlerFunc
- type Logger
- type StandardLogger
- func (me *StandardLogger) Debug(s string)
- func (me *StandardLogger) Debugf(s string, args ...interface{})
- func (me *StandardLogger) Error(s string)
- func (me *StandardLogger) Errorf(s string, args ...interface{})
- func (me *StandardLogger) Info(s string)
- func (me *StandardLogger) Infof(s string, args ...interface{})
- func (me *StandardLogger) Warn(s string)
- func (me *StandardLogger) Warnf(s string, args ...interface{})
- func (me *StandardLogger) WithPrefix(s string) Logger
Constants ¶
View Source
const (
AbortIndex = math.MaxInt8 / 2
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bus ¶
type Bus struct {
// contains filtered or unexported fields
}
func (*Bus) Handle ¶
func (bus *Bus) Handle(msgType string, handlers []HandlerFunc)
func (*Bus) ProcessMessage ¶
func (*Bus) Use ¶
func (bus *Bus) Use(middlewares ...HandlerFunc)
type Context ¶
type HandlerFunc ¶
type HandlerFunc func(*Context)
func Recovery ¶
func Recovery() HandlerFunc
Recovery returns a middleware that recovers from any panics and writes the error to context
type StandardLogger ¶
type StandardLogger struct {
// contains filtered or unexported fields
}
func NewStandardLogger ¶
func NewStandardLogger(writer io.Writer) *StandardLogger
func (*StandardLogger) Debug ¶
func (me *StandardLogger) Debug(s string)
func (*StandardLogger) Debugf ¶
func (me *StandardLogger) Debugf(s string, args ...interface{})
func (*StandardLogger) Error ¶
func (me *StandardLogger) Error(s string)
func (*StandardLogger) Errorf ¶
func (me *StandardLogger) Errorf(s string, args ...interface{})
func (*StandardLogger) Info ¶
func (me *StandardLogger) Info(s string)
func (*StandardLogger) Infof ¶
func (me *StandardLogger) Infof(s string, args ...interface{})
func (*StandardLogger) Warn ¶
func (me *StandardLogger) Warn(s string)
func (*StandardLogger) Warnf ¶
func (me *StandardLogger) Warnf(s string, args ...interface{})
func (*StandardLogger) WithPrefix ¶
func (me *StandardLogger) WithPrefix(s string) Logger
Click to show internal directories.
Click to hide internal directories.