Documentation ¶
Index ¶
- Variables
- func MustNewQueue(c *Conf, handler ConsumeHandler) queue.MessageQueue
- func NewLogger(core zapcore.Core) rlog.Logger
- func NewQueue(c *Conf, handler ConsumeHandler) (queue.MessageQueue, error)
- type Conf
- func (*Conf) Descriptor() ([]byte, []int)deprecated
- func (x *Conf) GetAccessKey() string
- func (x *Conf) GetAddrs() []string
- func (x *Conf) GetBroadcast() bool
- func (x *Conf) GetChannel() string
- func (x *Conf) GetConns() int32
- func (x *Conf) GetExpression() string
- func (x *Conf) GetGroupId() string
- func (x *Conf) GetNamespace() string
- func (x *Conf) GetSecretKey() string
- func (x *Conf) GetTopic() string
- func (*Conf) ProtoMessage()
- func (x *Conf) ProtoReflect() protoreflect.Message
- func (x *Conf) Reset()
- func (x *Conf) String() string
- func (m *Conf) Validate() error
- func (m *Conf) ValidateAll() error
- type ConfMultiError
- type ConfValidationError
- type ConsumeHandle
- type ConsumeHandler
- type MessageExtTextMapCarrier
- type MessageTextMapCarrier
- type Pusher
- type RocketLogger
- func (l RocketLogger) Debug(msg string, fields map[string]interface{})
- func (l RocketLogger) Enabled(lvl zapcore.Level) bool
- func (l RocketLogger) Error(msg string, fields map[string]interface{})
- func (l RocketLogger) Fatal(msg string, fields map[string]interface{})
- func (l RocketLogger) Info(msg string, fields map[string]interface{})
- func (l *RocketLogger) Level(level string)
- func (l RocketLogger) OutputPath(path string) (err error)
- func (l RocketLogger) Warning(msg string, fields map[string]interface{})
Constants ¶
This section is empty.
Variables ¶
var File_queue_rocketmq_conf_proto protoreflect.FileDescriptor
Functions ¶
func MustNewQueue ¶
func MustNewQueue(c *Conf, handler ConsumeHandler) queue.MessageQueue
func NewQueue ¶
func NewQueue(c *Conf, handler ConsumeHandler) (queue.MessageQueue, error)
Types ¶
type Conf ¶
type Conf struct { Addrs []string `protobuf:"bytes,1,rep,name=addrs,proto3" json:"addrs,omitempty"` AccessKey string `protobuf:"bytes,2,opt,name=access_key,json=accessKey,proto3" json:"access_key,omitempty"` SecretKey string `protobuf:"bytes,3,opt,name=secret_key,json=secretKey,proto3" json:"secret_key,omitempty"` Channel string `protobuf:"bytes,4,opt,name=channel,proto3" json:"channel,omitempty"` GroupId string `protobuf:"bytes,5,opt,name=groupId,proto3" json:"groupId,omitempty"` Topic string `protobuf:"bytes,6,opt,name=topic,proto3" json:"topic,omitempty"` Expression string `protobuf:"bytes,7,opt,name=expression,proto3" json:"expression,omitempty"` Broadcast bool `protobuf:"varint,8,opt,name=broadcast,proto3" json:"broadcast,omitempty"` Namespace string `protobuf:"bytes,9,opt,name=namespace,proto3" json:"namespace,omitempty"` Conns int32 `protobuf:"varint,10,opt,name=conns,proto3" json:"conns,omitempty"` // contains filtered or unexported fields }
func (*Conf) Descriptor
deprecated
func (*Conf) GetAccessKey ¶
func (*Conf) GetBroadcast ¶
func (*Conf) GetChannel ¶
func (*Conf) GetExpression ¶
func (*Conf) GetGroupId ¶
func (*Conf) GetNamespace ¶
func (*Conf) GetSecretKey ¶
func (*Conf) ProtoMessage ¶
func (*Conf) ProtoMessage()
func (*Conf) ProtoReflect ¶
func (x *Conf) ProtoReflect() protoreflect.Message
func (*Conf) Validate ¶
Validate checks the field values on Conf with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Conf) ValidateAll ¶
ValidateAll checks the field values on Conf with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ConfMultiError, or nil if none found.
type ConfMultiError ¶
type ConfMultiError []error
ConfMultiError is an error wrapping multiple validation errors returned by Conf.ValidateAll() if the designated constraints aren't met.
func (ConfMultiError) AllErrors ¶
func (m ConfMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ConfMultiError) Error ¶
func (m ConfMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ConfValidationError ¶
type ConfValidationError struct {
// contains filtered or unexported fields
}
ConfValidationError is the validation error returned by Conf.Validate if the designated constraints aren't met.
func (ConfValidationError) Cause ¶
func (e ConfValidationError) Cause() error
Cause function returns cause value.
func (ConfValidationError) Error ¶
func (e ConfValidationError) Error() string
Error satisfies the builtin error interface
func (ConfValidationError) ErrorName ¶
func (e ConfValidationError) ErrorName() string
ErrorName returns error name.
func (ConfValidationError) Field ¶
func (e ConfValidationError) Field() string
Field function returns field value.
func (ConfValidationError) Key ¶
func (e ConfValidationError) Key() bool
Key function returns key value.
func (ConfValidationError) Reason ¶
func (e ConfValidationError) Reason() string
Reason function returns reason value.
type ConsumeHandle ¶
type ConsumeHandler ¶
type MessageExtTextMapCarrier ¶
type MessageExtTextMapCarrier struct {
// contains filtered or unexported fields
}
func (*MessageExtTextMapCarrier) Get ¶
func (carrier *MessageExtTextMapCarrier) Get(key string) string
Get returns the value associated with the passed key.
func (*MessageExtTextMapCarrier) Keys ¶
func (carrier *MessageExtTextMapCarrier) Keys() []string
Keys lists the keys stored in this carrier.
func (*MessageExtTextMapCarrier) Set ¶
func (carrier *MessageExtTextMapCarrier) Set(key string, value string)
Set stores the key-value pair.
type MessageTextMapCarrier ¶
type MessageTextMapCarrier struct {
// contains filtered or unexported fields
}
func (*MessageTextMapCarrier) Get ¶
func (carrier *MessageTextMapCarrier) Get(key string) string
Get returns the value associated with the passed key.
func (*MessageTextMapCarrier) Keys ¶
func (carrier *MessageTextMapCarrier) Keys() []string
Keys lists the keys stored in this carrier.
func (*MessageTextMapCarrier) Set ¶
func (carrier *MessageTextMapCarrier) Set(key string, value string)
Set stores the key-value pair.
type Pusher ¶
type Pusher interface { Name() string Push(ctx context.Context, topic string, key, value []byte) error Close() error }
A Pusher interface wraps the method Push.
func MustNewPusher ¶
type RocketLogger ¶
type RocketLogger struct {
// contains filtered or unexported fields
}
func (RocketLogger) Debug ¶
func (l RocketLogger) Debug(msg string, fields map[string]interface{})
func (RocketLogger) Error ¶
func (l RocketLogger) Error(msg string, fields map[string]interface{})
func (RocketLogger) Fatal ¶
func (l RocketLogger) Fatal(msg string, fields map[string]interface{})
func (RocketLogger) Info ¶
func (l RocketLogger) Info(msg string, fields map[string]interface{})
func (*RocketLogger) Level ¶
func (l *RocketLogger) Level(level string)
func (RocketLogger) OutputPath ¶
func (l RocketLogger) OutputPath(path string) (err error)
func (RocketLogger) Warning ¶
func (l RocketLogger) Warning(msg string, fields map[string]interface{})