Documentation ¶
Index ¶
- Constants
- type Memory
- type Message
- func (m *Message) GetErrorCount() uint64
- func (m *Message) GetId() string
- func (m *Message) GetPrefix() (prefix string)
- func (m *Message) GetRoutingKey() string
- func (m *Message) GetValues() map[string]interface{}
- func (m *Message) SetErrorCount(count uint64)
- func (m *Message) SetErrorIncr()
- func (m *Message) SetId(id string)
- func (m *Message) SetPrefix(prefix string)
- func (m *Message) SetRoutingKey(routingKey string)
- func (m *Message) SetValues(values map[string]interface{})
- type NSQ
- type QLoger
- func (q *QLoger) Debug(msg string, fields map[string]interface{})
- func (q *QLoger) Error(msg string, fields map[string]interface{})
- func (q *QLoger) Fatal(msg string, fields map[string]interface{})
- func (q *QLoger) Info(msg string, fields map[string]interface{})
- func (q *QLoger) Level(level string)
- func (q *QLoger) OutputPath(path string) (err error)
- func (q *QLoger) Warning(msg string, fields map[string]interface{})
- type RabbitMQ
- func (r *RabbitMQ) Consumer(ctx context.Context, queueName string, f storage.ConsumerFunc, ...)
- func (r *RabbitMQ) Publish(ctx context.Context, message storage.Messager, ...) error
- func (r *RabbitMQ) Run(ctx context.Context)
- func (r *RabbitMQ) Shutdown(ctx context.Context)
- func (r *RabbitMQ) String() string
- type Redis
- type RocketConsumerOptions
- type RocketMQ
- func (r *RocketMQ) Consumer(ctx context.Context, topicName string, f storage.ConsumerFunc, ...)
- func (r *RocketMQ) Publish(ctx context.Context, message storage.Messager, ...) error
- func (r *RocketMQ) Run(ctx context.Context)
- func (r *RocketMQ) Shutdown(ctx context.Context)
- func (r *RocketMQ) String() string
- type RocketProducerOptions
Constants ¶
View Source
const ( // PanicLevel level, highest level of severity. Logs and then calls panic with the // message passed to Debug, Info, ... PanicLevel = iota // FatalLevel level. Logs and then calls `logger.Exit(1)`. It will exit even if the // logging level is set to Panic. FatalLevel // ErrorLevel level. Logs. Used for errors that should definitely be noted. // Commonly used for hooks to send errors to an error tracking service. ErrorLevel // WarnLevel level. Non-critical entries that deserve eyes. WarnLevel // InfoLevel level. General operational entries about what's going on inside the // application. InfoLevel // DebugLevel level. Usually only enabled when debugging. Very verbose logging. DebugLevel // TraceLevel level. Designates finer-grained informational events than the Debug. TraceLevel )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Memory ¶
type Memory struct { PoolNum uint // contains filtered or unexported fields }
func (*Memory) Consumer ¶
func (m *Memory) Consumer(ctx context.Context, name string, f storage.ConsumerFunc, optionFuncs ...func(*storage.ConsumeOptions))
Consumer 监听消费者
type Message ¶
type Message struct { Id string RoutingKey string Values map[string]interface{} GroupId string ErrorCount uint64 }
func (*Message) GetErrorCount ¶
func (*Message) GetRoutingKey ¶
func (*Message) SetErrorCount ¶
func (*Message) SetErrorIncr ¶
func (m *Message) SetErrorIncr()
func (*Message) SetRoutingKey ¶
type NSQ ¶
type NSQ struct {
// contains filtered or unexported fields
}
func (*NSQ) Consumer ¶
func (e *NSQ) Consumer(ctx context.Context, name string, f storage.ConsumerFunc, optionFuncs ...func(*storage.ConsumeOptions))
Consumer 监听消费者
type QLoger ¶ added in v0.3.7
func (*QLoger) OutputPath ¶ added in v0.3.7
type RabbitMQ ¶
type RabbitMQ struct { Url string ReconnectInterval int Handler []rabbitmq.Handler Config rabbitmq.Config ConsumerOptions *rabbitmq.ConsumerOptions PublisherOptions *rabbitmq.PublisherOptions Logger rabbitmq.Logger // contains filtered or unexported fields }
RabbitMQ cache implement
func NewRabbitMQ ¶
func (*RabbitMQ) Consumer ¶
func (r *RabbitMQ) Consumer(ctx context.Context, queueName string, f storage.ConsumerFunc, optionFuncs ...func(*storage.ConsumeOptions))
Consumer 监听消费者
type Redis ¶
type Redis struct {
// contains filtered or unexported fields
}
Redis cache implement
func NewRedis ¶
func NewRedis(producerOptions *redisqueue.ProducerOptions, consumerOptions *redisqueue.ConsumerOptions) (*Redis, error)
NewRedis redis模式
func (*Redis) Consumer ¶
func (r *Redis) Consumer(ctx context.Context, name string, f storage.ConsumerFunc, optionFuncs ...func(*storage.ConsumeOptions))
Consumer 监听消费者
type RocketConsumerOptions ¶
type RocketMQ ¶
type RocketMQ struct { Urls []string Credentials *primitive.Credentials // contains filtered or unexported fields }
RocketMQ cache implement
func NewRocketMQ ¶
func (*RocketMQ) Consumer ¶
func (r *RocketMQ) Consumer(ctx context.Context, topicName string, f storage.ConsumerFunc, optionFuncs ...func(*storage.ConsumeOptions))
Consumer 监听消费者
type RocketProducerOptions ¶
Click to show internal directories.
Click to hide internal directories.