Documentation
¶
Index ¶
- Variables
- func MustNewPusher(c *Conf) queue.Pusher
- func MustNewQueue(c *Conf, handler queue.ConsumeHandler) queue.MessageQueue
- func NewPusher(config *Conf) (queue.Pusher, error)
- func NewQueue(c *Conf, handler queue.ConsumeHandler) (queue.MessageQueue, error)
- type Conf
- func (*Conf) Descriptor() ([]byte, []int)deprecated
- func (x *Conf) GetAccessKey() string
- func (x *Conf) GetAddr() string
- func (x *Conf) GetBroadcast() bool
- func (x *Conf) GetChannel() string
- func (x *Conf) GetGroupId() string
- func (x *Conf) GetNamespace() string
- func (x *Conf) GetSecretKey() string
- func (x *Conf) GetTopics() []*Topic
- 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 MessageExtTextMapCarrier
- type MessageTextMapCarrier
- 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{})
- type Topic
- func (*Topic) Descriptor() ([]byte, []int)deprecated
- func (x *Topic) GetExpression() string
- func (x *Topic) GetTopic() string
- func (*Topic) ProtoMessage()
- func (x *Topic) ProtoReflect() protoreflect.Message
- func (x *Topic) Reset()
- func (x *Topic) String() string
- func (m *Topic) Validate() error
- func (m *Topic) ValidateAll() error
- type TopicMultiError
- type TopicValidationError
Constants ¶
This section is empty.
Variables ¶
var File_client_rocketmq_conf_proto protoreflect.FileDescriptor
Functions ¶
func MustNewPusher ¶
func MustNewQueue ¶
func MustNewQueue(c *Conf, handler queue.ConsumeHandler) queue.MessageQueue
func NewQueue ¶
func NewQueue(c *Conf, handler queue.ConsumeHandler) (queue.MessageQueue, error)
Types ¶
type Conf ¶
type Conf struct {
Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,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"`
Topics []*Topic `protobuf:"bytes,6,rep,name=topics,proto3" json:"topics,omitempty"`
Broadcast bool `protobuf:"varint,7,opt,name=broadcast,proto3" json:"broadcast,omitempty"`
Namespace string `protobuf:"bytes,8,opt,name=namespace,proto3" json:"namespace,omitempty"`
// contains filtered or unexported fields
}
func (*Conf) Descriptor
deprecated
func (*Conf) GetAccessKey ¶
func (*Conf) GetBroadcast ¶
func (*Conf) GetChannel ¶
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 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 RocketLogger ¶
type RocketLogger struct {
// contains filtered or unexported fields
}
func NewLogger ¶
func NewLogger(core zapcore.Core) *RocketLogger
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{})
type Topic ¶
type Topic struct {
Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
Expression string `protobuf:"bytes,2,opt,name=expression,proto3" json:"expression,omitempty"`
// contains filtered or unexported fields
}
func (*Topic) Descriptor
deprecated
func (*Topic) GetExpression ¶
func (*Topic) ProtoMessage ¶
func (*Topic) ProtoMessage()
func (*Topic) ProtoReflect ¶
func (x *Topic) ProtoReflect() protoreflect.Message
func (*Topic) Validate ¶
Validate checks the field values on Topic 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 (*Topic) ValidateAll ¶
ValidateAll checks the field values on Topic 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 TopicMultiError, or nil if none found.
type TopicMultiError ¶
type TopicMultiError []error
TopicMultiError is an error wrapping multiple validation errors returned by Topic.ValidateAll() if the designated constraints aren't met.
func (TopicMultiError) AllErrors ¶
func (m TopicMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (TopicMultiError) Error ¶
func (m TopicMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type TopicValidationError ¶
type TopicValidationError struct {
// contains filtered or unexported fields
}
TopicValidationError is the validation error returned by Topic.Validate if the designated constraints aren't met.
func (TopicValidationError) Cause ¶
func (e TopicValidationError) Cause() error
Cause function returns cause value.
func (TopicValidationError) Error ¶
func (e TopicValidationError) Error() string
Error satisfies the builtin error interface
func (TopicValidationError) ErrorName ¶
func (e TopicValidationError) ErrorName() string
ErrorName returns error name.
func (TopicValidationError) Field ¶
func (e TopicValidationError) Field() string
Field function returns field value.
func (TopicValidationError) Key ¶
func (e TopicValidationError) Key() bool
Key function returns key value.
func (TopicValidationError) Reason ¶
func (e TopicValidationError) Reason() string
Reason function returns reason value.