rocketmq

package
v0.0.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2022 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_client_rocketmq_conf_proto protoreflect.FileDescriptor

Functions

func MustNewPusher

func MustNewPusher(c *Conf) queue.Pusher

func MustNewQueue

func MustNewQueue(c *Conf, handler queue.ConsumeHandler) queue.MessageQueue

func NewPusher

func NewPusher(config *Conf) (queue.Pusher, error)

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) Descriptor() ([]byte, []int)

Deprecated: Use Conf.ProtoReflect.Descriptor instead.

func (*Conf) GetAccessKey

func (x *Conf) GetAccessKey() string

func (*Conf) GetAddr

func (x *Conf) GetAddr() string

func (*Conf) GetBroadcast

func (x *Conf) GetBroadcast() bool

func (*Conf) GetChannel

func (x *Conf) GetChannel() string

func (*Conf) GetGroupId

func (x *Conf) GetGroupId() string

func (*Conf) GetNamespace

func (x *Conf) GetNamespace() string

func (*Conf) GetSecretKey

func (x *Conf) GetSecretKey() string

func (*Conf) GetTopics

func (x *Conf) GetTopics() []*Topic

func (*Conf) ProtoMessage

func (*Conf) ProtoMessage()

func (*Conf) ProtoReflect

func (x *Conf) ProtoReflect() protoreflect.Message

func (*Conf) Reset

func (x *Conf) Reset()

func (*Conf) String

func (x *Conf) String() string

func (*Conf) Validate

func (m *Conf) Validate() error

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

func (m *Conf) ValidateAll() error

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) Enabled

func (l RocketLogger) Enabled(lvl zapcore.Level) bool

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) Descriptor() ([]byte, []int)

Deprecated: Use Topic.ProtoReflect.Descriptor instead.

func (*Topic) GetExpression

func (x *Topic) GetExpression() string

func (*Topic) GetTopic

func (x *Topic) GetTopic() string

func (*Topic) ProtoMessage

func (*Topic) ProtoMessage()

func (*Topic) ProtoReflect

func (x *Topic) ProtoReflect() protoreflect.Message

func (*Topic) Reset

func (x *Topic) Reset()

func (*Topic) String

func (x *Topic) String() string

func (*Topic) Validate

func (m *Topic) Validate() error

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

func (m *Topic) ValidateAll() error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL