Documentation ¶
Index ¶
- Variables
- func Client(ctx context.Context, msg []byte) []byte
- func ErrorChannelClosed(format string, args ...interface{}) *errors.Error
- func ErrorDisconnect(format string, args ...interface{}) *errors.Error
- func ErrorUnkown(format string, args ...interface{}) *errors.Error
- func IsChannelClosed(err error) bool
- func IsDisconnect(err error) bool
- func IsUnkown(err error) bool
- func MustNewListener(c *ListenerConf, handler ConsumeHandler) queue.MessageQueue
- func NewListener(c *ListenerConf, handler ConsumeHandler) (consumer queue.MessageQueue, err error)
- func Server(msg []byte) (context.Context, context.CancelFunc, []byte, error)
- type Admin
- type AdminExchangeConf
- func (*AdminExchangeConf) Descriptor() ([]byte, []int)deprecated
- func (x *AdminExchangeConf) GetAutoDelete() bool
- func (x *AdminExchangeConf) GetDurable() bool
- func (x *AdminExchangeConf) GetInternal() bool
- func (x *AdminExchangeConf) GetKind() string
- func (x *AdminExchangeConf) GetName() string
- func (x *AdminExchangeConf) GetNoWait() bool
- func (*AdminExchangeConf) ProtoMessage()
- func (x *AdminExchangeConf) ProtoReflect() protoreflect.Message
- func (x *AdminExchangeConf) Reset()
- func (x *AdminExchangeConf) String() string
- func (m *AdminExchangeConf) Validate() error
- func (m *AdminExchangeConf) ValidateAll() error
- type AdminExchangeConfMultiError
- type AdminExchangeConfValidationError
- func (e AdminExchangeConfValidationError) Cause() error
- func (e AdminExchangeConfValidationError) Error() string
- func (e AdminExchangeConfValidationError) ErrorName() string
- func (e AdminExchangeConfValidationError) Field() string
- func (e AdminExchangeConfValidationError) Key() bool
- func (e AdminExchangeConfValidationError) Reason() string
- type AdminQueueConf
- func (*AdminQueueConf) Descriptor() ([]byte, []int)deprecated
- func (x *AdminQueueConf) GetAutoDelete() bool
- func (x *AdminQueueConf) GetDurable() bool
- func (x *AdminQueueConf) GetExclusive() bool
- func (x *AdminQueueConf) GetName() string
- func (x *AdminQueueConf) GetNoWait() bool
- func (*AdminQueueConf) ProtoMessage()
- func (x *AdminQueueConf) ProtoReflect() protoreflect.Message
- func (x *AdminQueueConf) Reset()
- func (x *AdminQueueConf) String() string
- func (m *AdminQueueConf) Validate() error
- func (m *AdminQueueConf) ValidateAll() error
- type AdminQueueConfMultiError
- type AdminQueueConfValidationError
- func (e AdminQueueConfValidationError) Cause() error
- func (e AdminQueueConfValidationError) Error() string
- func (e AdminQueueConfValidationError) ErrorName() string
- func (e AdminQueueConfValidationError) Field() string
- func (e AdminQueueConfValidationError) Key() bool
- func (e AdminQueueConfValidationError) Reason() string
- type ConsumeHandle
- type ConsumeHandler
- type ConsumerConf
- func (*ConsumerConf) Descriptor() ([]byte, []int)deprecated
- func (x *ConsumerConf) GetConsumer() string
- func (x *ConsumerConf) GetName() string
- func (*ConsumerConf) ProtoMessage()
- func (x *ConsumerConf) ProtoReflect() protoreflect.Message
- func (x *ConsumerConf) Reset()
- func (x *ConsumerConf) String() string
- func (m *ConsumerConf) Validate() error
- func (m *ConsumerConf) ValidateAll() error
- type ConsumerConfMultiError
- type ConsumerConfValidationError
- func (e ConsumerConfValidationError) Cause() error
- func (e ConsumerConfValidationError) Error() string
- func (e ConsumerConfValidationError) ErrorName() string
- func (e ConsumerConfValidationError) Field() string
- func (e ConsumerConfValidationError) Key() bool
- func (e ConsumerConfValidationError) Reason() string
- type Data
- func (*Data) Descriptor() ([]byte, []int)deprecated
- func (x *Data) GetBody() []byte
- func (x *Data) GetMd() map[string]string
- func (*Data) ProtoMessage()
- func (x *Data) ProtoReflect() protoreflect.Message
- func (x *Data) Reset()
- func (x *Data) String() string
- func (m *Data) Validate() error
- func (m *Data) ValidateAll() error
- type DataMultiError
- type DataValidationError
- type ErrorReason
- func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
- func (x ErrorReason) Enum() *ErrorReason
- func (ErrorReason) EnumDescriptor() ([]byte, []int)deprecated
- func (x ErrorReason) Number() protoreflect.EnumNumber
- func (x ErrorReason) String() string
- func (ErrorReason) Type() protoreflect.EnumType
- type ExchangeConf
- func (*ExchangeConf) Descriptor() ([]byte, []int)deprecated
- func (x *ExchangeConf) GetExchange() string
- func (x *ExchangeConf) GetKey() string
- func (*ExchangeConf) ProtoMessage()
- func (x *ExchangeConf) ProtoReflect() protoreflect.Message
- func (x *ExchangeConf) Reset()
- func (x *ExchangeConf) String() string
- func (m *ExchangeConf) Validate() error
- func (m *ExchangeConf) ValidateAll() error
- type ExchangeConfMultiError
- type ExchangeConfValidationError
- func (e ExchangeConfValidationError) Cause() error
- func (e ExchangeConfValidationError) Error() string
- func (e ExchangeConfValidationError) ErrorName() string
- func (e ExchangeConfValidationError) Field() string
- func (e ExchangeConfValidationError) Key() bool
- func (e ExchangeConfValidationError) Reason() string
- type ListenerConf
- func (*ListenerConf) Descriptor() ([]byte, []int)deprecated
- func (x *ListenerConf) GetQueues() []*ConsumerConf
- func (x *ListenerConf) GetRabbit() *RabbitConf
- func (*ListenerConf) ProtoMessage()
- func (x *ListenerConf) ProtoReflect() protoreflect.Message
- func (x *ListenerConf) Reset()
- func (x *ListenerConf) String() string
- func (m *ListenerConf) Validate() error
- func (m *ListenerConf) ValidateAll() error
- type ListenerConfMultiError
- type ListenerConfValidationError
- func (e ListenerConfValidationError) Cause() error
- func (e ListenerConfValidationError) Error() string
- func (e ListenerConfValidationError) ErrorName() string
- func (e ListenerConfValidationError) Field() string
- func (e ListenerConfValidationError) Key() bool
- func (e ListenerConfValidationError) Reason() string
- type ProducerConf
- func (*ProducerConf) Descriptor() ([]byte, []int)deprecated
- func (x *ProducerConf) GetContentType() string
- func (x *ProducerConf) GetRabbit() *RabbitConf
- func (*ProducerConf) ProtoMessage()
- func (x *ProducerConf) ProtoReflect() protoreflect.Message
- func (x *ProducerConf) Reset()
- func (x *ProducerConf) String() string
- func (m *ProducerConf) Validate() error
- func (m *ProducerConf) ValidateAll() error
- type ProducerConfMultiError
- type ProducerConfValidationError
- func (e ProducerConfValidationError) Cause() error
- func (e ProducerConfValidationError) Error() string
- func (e ProducerConfValidationError) ErrorName() string
- func (e ProducerConfValidationError) Field() string
- func (e ProducerConfValidationError) Key() bool
- func (e ProducerConfValidationError) Reason() string
- type QueueConf
- func (*QueueConf) Descriptor() ([]byte, []int)deprecated
- func (x *QueueConf) GetName() string
- func (*QueueConf) ProtoMessage()
- func (x *QueueConf) ProtoReflect() protoreflect.Message
- func (x *QueueConf) Reset()
- func (x *QueueConf) String() string
- func (m *QueueConf) Validate() error
- func (m *QueueConf) ValidateAll() error
- type QueueConfMultiError
- type QueueConfValidationError
- type RabbitConf
- func (*RabbitConf) Descriptor() ([]byte, []int)deprecated
- func (x *RabbitConf) GetHost() string
- func (x *RabbitConf) GetPassword() string
- func (x *RabbitConf) GetPort() int32
- func (x *RabbitConf) GetUsername() string
- func (x *RabbitConf) GetVHost() string
- func (*RabbitConf) ProtoMessage()
- func (x *RabbitConf) ProtoReflect() protoreflect.Message
- func (x *RabbitConf) Reset()
- func (x *RabbitConf) String() string
- func (c *RabbitConf) URL() string
- func (m *RabbitConf) Validate() error
- func (m *RabbitConf) ValidateAll() error
- type RabbitConfMultiError
- type RabbitConfValidationError
- type RabbitListener
- type RabbitMqSender
- type Sender
Constants ¶
This section is empty.
Variables ¶
var ( ExchangeDirect = amqp.ExchangeDirect ExchangeFanout = amqp.ExchangeFanout ExchangeTopic = amqp.ExchangeTopic ExchangeHeaders = amqp.ExchangeHeaders )
var ( ErrorReason_name = map[int32]string{ 0: "UNKOWN", 1: "DISCONNECT", 2: "CHANNEL_CLOSED", } ErrorReason_value = map[string]int32{ "UNKOWN": 0, "DISCONNECT": 1, "CHANNEL_CLOSED": 2, } )
Enum value maps for ErrorReason.
var File_client_rabbitmq_conf_proto protoreflect.FileDescriptor
Functions ¶
func ErrorChannelClosed ¶ added in v0.0.32
channel 断了
func ErrorDisconnect ¶ added in v0.0.32
断链接了
func ErrorUnkown ¶ added in v0.0.32
func MustNewListener ¶
func MustNewListener(c *ListenerConf, handler ConsumeHandler) queue.MessageQueue
func NewListener ¶
func NewListener(c *ListenerConf, handler ConsumeHandler) (consumer queue.MessageQueue, err error)
Types ¶
type Admin ¶
type Admin struct {
// contains filtered or unexported fields
}
func MustNewAdmin ¶
func MustNewAdmin(c *RabbitConf) *Admin
type AdminExchangeConf ¶ added in v0.0.31
type AdminExchangeConf struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` Durable bool `protobuf:"varint,3,opt,name=durable,proto3" json:"durable,omitempty"` AutoDelete bool `protobuf:"varint,4,opt,name=autoDelete,proto3" json:"autoDelete,omitempty"` Internal bool `protobuf:"varint,5,opt,name=internal,proto3" json:"internal,omitempty"` NoWait bool `protobuf:"varint,6,opt,name=noWait,proto3" json:"noWait,omitempty"` // contains filtered or unexported fields }
func (*AdminExchangeConf) Descriptor
deprecated
added in
v0.0.31
func (*AdminExchangeConf) Descriptor() ([]byte, []int)
Deprecated: Use AdminExchangeConf.ProtoReflect.Descriptor instead.
func (*AdminExchangeConf) GetAutoDelete ¶ added in v0.0.31
func (x *AdminExchangeConf) GetAutoDelete() bool
func (*AdminExchangeConf) GetDurable ¶ added in v0.0.31
func (x *AdminExchangeConf) GetDurable() bool
func (*AdminExchangeConf) GetInternal ¶ added in v0.0.31
func (x *AdminExchangeConf) GetInternal() bool
func (*AdminExchangeConf) GetKind ¶ added in v0.0.31
func (x *AdminExchangeConf) GetKind() string
func (*AdminExchangeConf) GetName ¶ added in v0.0.31
func (x *AdminExchangeConf) GetName() string
func (*AdminExchangeConf) GetNoWait ¶ added in v0.0.31
func (x *AdminExchangeConf) GetNoWait() bool
func (*AdminExchangeConf) ProtoMessage ¶ added in v0.0.31
func (*AdminExchangeConf) ProtoMessage()
func (*AdminExchangeConf) ProtoReflect ¶ added in v0.0.31
func (x *AdminExchangeConf) ProtoReflect() protoreflect.Message
func (*AdminExchangeConf) Reset ¶ added in v0.0.31
func (x *AdminExchangeConf) Reset()
func (*AdminExchangeConf) String ¶ added in v0.0.31
func (x *AdminExchangeConf) String() string
func (*AdminExchangeConf) Validate ¶ added in v0.0.31
func (m *AdminExchangeConf) Validate() error
Validate checks the field values on AdminExchangeConf 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 (*AdminExchangeConf) ValidateAll ¶ added in v0.0.31
func (m *AdminExchangeConf) ValidateAll() error
ValidateAll checks the field values on AdminExchangeConf 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 AdminExchangeConfMultiError, or nil if none found.
type AdminExchangeConfMultiError ¶ added in v0.0.31
type AdminExchangeConfMultiError []error
AdminExchangeConfMultiError is an error wrapping multiple validation errors returned by AdminExchangeConf.ValidateAll() if the designated constraints aren't met.
func (AdminExchangeConfMultiError) AllErrors ¶ added in v0.0.31
func (m AdminExchangeConfMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (AdminExchangeConfMultiError) Error ¶ added in v0.0.31
func (m AdminExchangeConfMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type AdminExchangeConfValidationError ¶ added in v0.0.31
type AdminExchangeConfValidationError struct {
// contains filtered or unexported fields
}
AdminExchangeConfValidationError is the validation error returned by AdminExchangeConf.Validate if the designated constraints aren't met.
func (AdminExchangeConfValidationError) Cause ¶ added in v0.0.31
func (e AdminExchangeConfValidationError) Cause() error
Cause function returns cause value.
func (AdminExchangeConfValidationError) Error ¶ added in v0.0.31
func (e AdminExchangeConfValidationError) Error() string
Error satisfies the builtin error interface
func (AdminExchangeConfValidationError) ErrorName ¶ added in v0.0.31
func (e AdminExchangeConfValidationError) ErrorName() string
ErrorName returns error name.
func (AdminExchangeConfValidationError) Field ¶ added in v0.0.31
func (e AdminExchangeConfValidationError) Field() string
Field function returns field value.
func (AdminExchangeConfValidationError) Key ¶ added in v0.0.31
func (e AdminExchangeConfValidationError) Key() bool
Key function returns key value.
func (AdminExchangeConfValidationError) Reason ¶ added in v0.0.31
func (e AdminExchangeConfValidationError) Reason() string
Reason function returns reason value.
type AdminQueueConf ¶ added in v0.0.31
type AdminQueueConf struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Durable bool `protobuf:"varint,3,opt,name=durable,proto3" json:"durable,omitempty"` AutoDelete bool `protobuf:"varint,4,opt,name=autoDelete,proto3" json:"autoDelete,omitempty"` Exclusive bool `protobuf:"varint,5,opt,name=exclusive,proto3" json:"exclusive,omitempty"` NoWait bool `protobuf:"varint,6,opt,name=noWait,proto3" json:"noWait,omitempty"` // contains filtered or unexported fields }
func (*AdminQueueConf) Descriptor
deprecated
added in
v0.0.31
func (*AdminQueueConf) Descriptor() ([]byte, []int)
Deprecated: Use AdminQueueConf.ProtoReflect.Descriptor instead.
func (*AdminQueueConf) GetAutoDelete ¶ added in v0.0.31
func (x *AdminQueueConf) GetAutoDelete() bool
func (*AdminQueueConf) GetDurable ¶ added in v0.0.31
func (x *AdminQueueConf) GetDurable() bool
func (*AdminQueueConf) GetExclusive ¶ added in v0.0.31
func (x *AdminQueueConf) GetExclusive() bool
func (*AdminQueueConf) GetName ¶ added in v0.0.31
func (x *AdminQueueConf) GetName() string
func (*AdminQueueConf) GetNoWait ¶ added in v0.0.31
func (x *AdminQueueConf) GetNoWait() bool
func (*AdminQueueConf) ProtoMessage ¶ added in v0.0.31
func (*AdminQueueConf) ProtoMessage()
func (*AdminQueueConf) ProtoReflect ¶ added in v0.0.31
func (x *AdminQueueConf) ProtoReflect() protoreflect.Message
func (*AdminQueueConf) Reset ¶ added in v0.0.31
func (x *AdminQueueConf) Reset()
func (*AdminQueueConf) String ¶ added in v0.0.31
func (x *AdminQueueConf) String() string
func (*AdminQueueConf) Validate ¶ added in v0.0.31
func (m *AdminQueueConf) Validate() error
Validate checks the field values on AdminQueueConf 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 (*AdminQueueConf) ValidateAll ¶ added in v0.0.31
func (m *AdminQueueConf) ValidateAll() error
ValidateAll checks the field values on AdminQueueConf 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 AdminQueueConfMultiError, or nil if none found.
type AdminQueueConfMultiError ¶ added in v0.0.31
type AdminQueueConfMultiError []error
AdminQueueConfMultiError is an error wrapping multiple validation errors returned by AdminQueueConf.ValidateAll() if the designated constraints aren't met.
func (AdminQueueConfMultiError) AllErrors ¶ added in v0.0.31
func (m AdminQueueConfMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (AdminQueueConfMultiError) Error ¶ added in v0.0.31
func (m AdminQueueConfMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type AdminQueueConfValidationError ¶ added in v0.0.31
type AdminQueueConfValidationError struct {
// contains filtered or unexported fields
}
AdminQueueConfValidationError is the validation error returned by AdminQueueConf.Validate if the designated constraints aren't met.
func (AdminQueueConfValidationError) Cause ¶ added in v0.0.31
func (e AdminQueueConfValidationError) Cause() error
Cause function returns cause value.
func (AdminQueueConfValidationError) Error ¶ added in v0.0.31
func (e AdminQueueConfValidationError) Error() string
Error satisfies the builtin error interface
func (AdminQueueConfValidationError) ErrorName ¶ added in v0.0.31
func (e AdminQueueConfValidationError) ErrorName() string
ErrorName returns error name.
func (AdminQueueConfValidationError) Field ¶ added in v0.0.31
func (e AdminQueueConfValidationError) Field() string
Field function returns field value.
func (AdminQueueConfValidationError) Key ¶ added in v0.0.31
func (e AdminQueueConfValidationError) Key() bool
Key function returns key value.
func (AdminQueueConfValidationError) Reason ¶ added in v0.0.31
func (e AdminQueueConfValidationError) Reason() string
Reason function returns reason value.
type ConsumeHandle ¶
type ConsumeHandler ¶
type ConsumerConf ¶
type ConsumerConf struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Consumer string `protobuf:"bytes,2,opt,name=consumer,proto3" json:"consumer,omitempty"` // contains filtered or unexported fields }
func (*ConsumerConf) Descriptor
deprecated
func (*ConsumerConf) Descriptor() ([]byte, []int)
Deprecated: Use ConsumerConf.ProtoReflect.Descriptor instead.
func (*ConsumerConf) GetConsumer ¶
func (x *ConsumerConf) GetConsumer() string
func (*ConsumerConf) GetName ¶
func (x *ConsumerConf) GetName() string
func (*ConsumerConf) ProtoMessage ¶
func (*ConsumerConf) ProtoMessage()
func (*ConsumerConf) ProtoReflect ¶
func (x *ConsumerConf) ProtoReflect() protoreflect.Message
func (*ConsumerConf) Reset ¶
func (x *ConsumerConf) Reset()
func (*ConsumerConf) String ¶
func (x *ConsumerConf) String() string
func (*ConsumerConf) Validate ¶
func (m *ConsumerConf) Validate() error
Validate checks the field values on ConsumerConf 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 (*ConsumerConf) ValidateAll ¶ added in v0.0.8
func (m *ConsumerConf) ValidateAll() error
ValidateAll checks the field values on ConsumerConf 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 ConsumerConfMultiError, or nil if none found.
type ConsumerConfMultiError ¶ added in v0.0.8
type ConsumerConfMultiError []error
ConsumerConfMultiError is an error wrapping multiple validation errors returned by ConsumerConf.ValidateAll() if the designated constraints aren't met.
func (ConsumerConfMultiError) AllErrors ¶ added in v0.0.8
func (m ConsumerConfMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ConsumerConfMultiError) Error ¶ added in v0.0.8
func (m ConsumerConfMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ConsumerConfValidationError ¶
type ConsumerConfValidationError struct {
// contains filtered or unexported fields
}
ConsumerConfValidationError is the validation error returned by ConsumerConf.Validate if the designated constraints aren't met.
func (ConsumerConfValidationError) Cause ¶
func (e ConsumerConfValidationError) Cause() error
Cause function returns cause value.
func (ConsumerConfValidationError) Error ¶
func (e ConsumerConfValidationError) Error() string
Error satisfies the builtin error interface
func (ConsumerConfValidationError) ErrorName ¶
func (e ConsumerConfValidationError) ErrorName() string
ErrorName returns error name.
func (ConsumerConfValidationError) Field ¶
func (e ConsumerConfValidationError) Field() string
Field function returns field value.
func (ConsumerConfValidationError) Key ¶
func (e ConsumerConfValidationError) Key() bool
Key function returns key value.
func (ConsumerConfValidationError) Reason ¶
func (e ConsumerConfValidationError) Reason() string
Reason function returns reason value.
type Data ¶ added in v0.0.37
type Data struct { Md map[string]string `` /* 145-byte string literal not displayed */ Body []byte `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` // contains filtered or unexported fields }
func (*Data) Descriptor
deprecated
added in
v0.0.37
func (*Data) ProtoMessage ¶ added in v0.0.37
func (*Data) ProtoMessage()
func (*Data) ProtoReflect ¶ added in v0.0.37
func (x *Data) ProtoReflect() protoreflect.Message
func (*Data) Validate ¶ added in v0.0.37
Validate checks the field values on Data 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 (*Data) ValidateAll ¶ added in v0.0.37
ValidateAll checks the field values on Data 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 DataMultiError, or nil if none found.
type DataMultiError ¶ added in v0.0.37
type DataMultiError []error
DataMultiError is an error wrapping multiple validation errors returned by Data.ValidateAll() if the designated constraints aren't met.
func (DataMultiError) AllErrors ¶ added in v0.0.37
func (m DataMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (DataMultiError) Error ¶ added in v0.0.37
func (m DataMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type DataValidationError ¶ added in v0.0.37
type DataValidationError struct {
// contains filtered or unexported fields
}
DataValidationError is the validation error returned by Data.Validate if the designated constraints aren't met.
func (DataValidationError) Cause ¶ added in v0.0.37
func (e DataValidationError) Cause() error
Cause function returns cause value.
func (DataValidationError) Error ¶ added in v0.0.37
func (e DataValidationError) Error() string
Error satisfies the builtin error interface
func (DataValidationError) ErrorName ¶ added in v0.0.37
func (e DataValidationError) ErrorName() string
ErrorName returns error name.
func (DataValidationError) Field ¶ added in v0.0.37
func (e DataValidationError) Field() string
Field function returns field value.
func (DataValidationError) Key ¶ added in v0.0.37
func (e DataValidationError) Key() bool
Key function returns key value.
func (DataValidationError) Reason ¶ added in v0.0.37
func (e DataValidationError) Reason() string
Reason function returns reason value.
type ErrorReason ¶ added in v0.0.32
type ErrorReason int32
const ( ErrorReason_UNKOWN ErrorReason = 0 ErrorReason_DISCONNECT ErrorReason = 1 // 断链接了 ErrorReason_CHANNEL_CLOSED ErrorReason = 2 // channel 断了 )
func (ErrorReason) Descriptor ¶ added in v0.0.32
func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
func (ErrorReason) Enum ¶ added in v0.0.32
func (x ErrorReason) Enum() *ErrorReason
func (ErrorReason) EnumDescriptor
deprecated
added in
v0.0.32
func (ErrorReason) EnumDescriptor() ([]byte, []int)
Deprecated: Use ErrorReason.Descriptor instead.
func (ErrorReason) Number ¶ added in v0.0.32
func (x ErrorReason) Number() protoreflect.EnumNumber
func (ErrorReason) String ¶ added in v0.0.32
func (x ErrorReason) String() string
func (ErrorReason) Type ¶ added in v0.0.32
func (ErrorReason) Type() protoreflect.EnumType
type ExchangeConf ¶
type ExchangeConf struct { Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
func (*ExchangeConf) Descriptor
deprecated
func (*ExchangeConf) Descriptor() ([]byte, []int)
Deprecated: Use ExchangeConf.ProtoReflect.Descriptor instead.
func (*ExchangeConf) GetExchange ¶
func (x *ExchangeConf) GetExchange() string
func (*ExchangeConf) GetKey ¶
func (x *ExchangeConf) GetKey() string
func (*ExchangeConf) ProtoMessage ¶
func (*ExchangeConf) ProtoMessage()
func (*ExchangeConf) ProtoReflect ¶
func (x *ExchangeConf) ProtoReflect() protoreflect.Message
func (*ExchangeConf) Reset ¶
func (x *ExchangeConf) Reset()
func (*ExchangeConf) String ¶
func (x *ExchangeConf) String() string
func (*ExchangeConf) Validate ¶
func (m *ExchangeConf) Validate() error
Validate checks the field values on ExchangeConf 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 (*ExchangeConf) ValidateAll ¶ added in v0.0.8
func (m *ExchangeConf) ValidateAll() error
ValidateAll checks the field values on ExchangeConf 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 ExchangeConfMultiError, or nil if none found.
type ExchangeConfMultiError ¶ added in v0.0.8
type ExchangeConfMultiError []error
ExchangeConfMultiError is an error wrapping multiple validation errors returned by ExchangeConf.ValidateAll() if the designated constraints aren't met.
func (ExchangeConfMultiError) AllErrors ¶ added in v0.0.8
func (m ExchangeConfMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ExchangeConfMultiError) Error ¶ added in v0.0.8
func (m ExchangeConfMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ExchangeConfValidationError ¶
type ExchangeConfValidationError struct {
// contains filtered or unexported fields
}
ExchangeConfValidationError is the validation error returned by ExchangeConf.Validate if the designated constraints aren't met.
func (ExchangeConfValidationError) Cause ¶
func (e ExchangeConfValidationError) Cause() error
Cause function returns cause value.
func (ExchangeConfValidationError) Error ¶
func (e ExchangeConfValidationError) Error() string
Error satisfies the builtin error interface
func (ExchangeConfValidationError) ErrorName ¶
func (e ExchangeConfValidationError) ErrorName() string
ErrorName returns error name.
func (ExchangeConfValidationError) Field ¶
func (e ExchangeConfValidationError) Field() string
Field function returns field value.
func (ExchangeConfValidationError) Key ¶
func (e ExchangeConfValidationError) Key() bool
Key function returns key value.
func (ExchangeConfValidationError) Reason ¶
func (e ExchangeConfValidationError) Reason() string
Reason function returns reason value.
type ListenerConf ¶
type ListenerConf struct { Rabbit *RabbitConf `protobuf:"bytes,1,opt,name=rabbit,proto3" json:"rabbit,omitempty"` Queues []*ConsumerConf `protobuf:"bytes,2,rep,name=queues,proto3" json:"queues,omitempty"` // contains filtered or unexported fields }
func (*ListenerConf) Descriptor
deprecated
func (*ListenerConf) Descriptor() ([]byte, []int)
Deprecated: Use ListenerConf.ProtoReflect.Descriptor instead.
func (*ListenerConf) GetQueues ¶
func (x *ListenerConf) GetQueues() []*ConsumerConf
func (*ListenerConf) GetRabbit ¶
func (x *ListenerConf) GetRabbit() *RabbitConf
func (*ListenerConf) ProtoMessage ¶
func (*ListenerConf) ProtoMessage()
func (*ListenerConf) ProtoReflect ¶
func (x *ListenerConf) ProtoReflect() protoreflect.Message
func (*ListenerConf) Reset ¶
func (x *ListenerConf) Reset()
func (*ListenerConf) String ¶
func (x *ListenerConf) String() string
func (*ListenerConf) Validate ¶
func (m *ListenerConf) Validate() error
Validate checks the field values on ListenerConf 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 (*ListenerConf) ValidateAll ¶ added in v0.0.8
func (m *ListenerConf) ValidateAll() error
ValidateAll checks the field values on ListenerConf 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 ListenerConfMultiError, or nil if none found.
type ListenerConfMultiError ¶ added in v0.0.8
type ListenerConfMultiError []error
ListenerConfMultiError is an error wrapping multiple validation errors returned by ListenerConf.ValidateAll() if the designated constraints aren't met.
func (ListenerConfMultiError) AllErrors ¶ added in v0.0.8
func (m ListenerConfMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ListenerConfMultiError) Error ¶ added in v0.0.8
func (m ListenerConfMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ListenerConfValidationError ¶
type ListenerConfValidationError struct {
// contains filtered or unexported fields
}
ListenerConfValidationError is the validation error returned by ListenerConf.Validate if the designated constraints aren't met.
func (ListenerConfValidationError) Cause ¶
func (e ListenerConfValidationError) Cause() error
Cause function returns cause value.
func (ListenerConfValidationError) Error ¶
func (e ListenerConfValidationError) Error() string
Error satisfies the builtin error interface
func (ListenerConfValidationError) ErrorName ¶
func (e ListenerConfValidationError) ErrorName() string
ErrorName returns error name.
func (ListenerConfValidationError) Field ¶
func (e ListenerConfValidationError) Field() string
Field function returns field value.
func (ListenerConfValidationError) Key ¶
func (e ListenerConfValidationError) Key() bool
Key function returns key value.
func (ListenerConfValidationError) Reason ¶
func (e ListenerConfValidationError) Reason() string
Reason function returns reason value.
type ProducerConf ¶
type ProducerConf struct { Rabbit *RabbitConf `protobuf:"bytes,1,opt,name=rabbit,proto3" json:"rabbit,omitempty"` ContentType string `protobuf:"bytes,2,opt,name=contentType,proto3" json:"contentType,omitempty"` // contains filtered or unexported fields }
func (*ProducerConf) Descriptor
deprecated
func (*ProducerConf) Descriptor() ([]byte, []int)
Deprecated: Use ProducerConf.ProtoReflect.Descriptor instead.
func (*ProducerConf) GetContentType ¶
func (x *ProducerConf) GetContentType() string
func (*ProducerConf) GetRabbit ¶
func (x *ProducerConf) GetRabbit() *RabbitConf
func (*ProducerConf) ProtoMessage ¶
func (*ProducerConf) ProtoMessage()
func (*ProducerConf) ProtoReflect ¶
func (x *ProducerConf) ProtoReflect() protoreflect.Message
func (*ProducerConf) Reset ¶
func (x *ProducerConf) Reset()
func (*ProducerConf) String ¶
func (x *ProducerConf) String() string
func (*ProducerConf) Validate ¶
func (m *ProducerConf) Validate() error
Validate checks the field values on ProducerConf 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 (*ProducerConf) ValidateAll ¶ added in v0.0.8
func (m *ProducerConf) ValidateAll() error
ValidateAll checks the field values on ProducerConf 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 ProducerConfMultiError, or nil if none found.
type ProducerConfMultiError ¶ added in v0.0.8
type ProducerConfMultiError []error
ProducerConfMultiError is an error wrapping multiple validation errors returned by ProducerConf.ValidateAll() if the designated constraints aren't met.
func (ProducerConfMultiError) AllErrors ¶ added in v0.0.8
func (m ProducerConfMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ProducerConfMultiError) Error ¶ added in v0.0.8
func (m ProducerConfMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ProducerConfValidationError ¶
type ProducerConfValidationError struct {
// contains filtered or unexported fields
}
ProducerConfValidationError is the validation error returned by ProducerConf.Validate if the designated constraints aren't met.
func (ProducerConfValidationError) Cause ¶
func (e ProducerConfValidationError) Cause() error
Cause function returns cause value.
func (ProducerConfValidationError) Error ¶
func (e ProducerConfValidationError) Error() string
Error satisfies the builtin error interface
func (ProducerConfValidationError) ErrorName ¶
func (e ProducerConfValidationError) ErrorName() string
ErrorName returns error name.
func (ProducerConfValidationError) Field ¶
func (e ProducerConfValidationError) Field() string
Field function returns field value.
func (ProducerConfValidationError) Key ¶
func (e ProducerConfValidationError) Key() bool
Key function returns key value.
func (ProducerConfValidationError) Reason ¶
func (e ProducerConfValidationError) Reason() string
Reason function returns reason value.
type QueueConf ¶
type QueueConf struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*QueueConf) Descriptor
deprecated
func (*QueueConf) ProtoMessage ¶
func (*QueueConf) ProtoMessage()
func (*QueueConf) ProtoReflect ¶
func (x *QueueConf) ProtoReflect() protoreflect.Message
func (*QueueConf) Validate ¶
Validate checks the field values on QueueConf 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 (*QueueConf) ValidateAll ¶ added in v0.0.8
ValidateAll checks the field values on QueueConf 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 QueueConfMultiError, or nil if none found.
type QueueConfMultiError ¶ added in v0.0.8
type QueueConfMultiError []error
QueueConfMultiError is an error wrapping multiple validation errors returned by QueueConf.ValidateAll() if the designated constraints aren't met.
func (QueueConfMultiError) AllErrors ¶ added in v0.0.8
func (m QueueConfMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (QueueConfMultiError) Error ¶ added in v0.0.8
func (m QueueConfMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type QueueConfValidationError ¶
type QueueConfValidationError struct {
// contains filtered or unexported fields
}
QueueConfValidationError is the validation error returned by QueueConf.Validate if the designated constraints aren't met.
func (QueueConfValidationError) Cause ¶
func (e QueueConfValidationError) Cause() error
Cause function returns cause value.
func (QueueConfValidationError) Error ¶
func (e QueueConfValidationError) Error() string
Error satisfies the builtin error interface
func (QueueConfValidationError) ErrorName ¶
func (e QueueConfValidationError) ErrorName() string
ErrorName returns error name.
func (QueueConfValidationError) Field ¶
func (e QueueConfValidationError) Field() string
Field function returns field value.
func (QueueConfValidationError) Key ¶
func (e QueueConfValidationError) Key() bool
Key function returns key value.
func (QueueConfValidationError) Reason ¶
func (e QueueConfValidationError) Reason() string
Reason function returns reason value.
type RabbitConf ¶
type RabbitConf struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` Host string `protobuf:"bytes,3,opt,name=host,proto3" json:"host,omitempty"` Port int32 `protobuf:"varint,4,opt,name=port,proto3" json:"port,omitempty"` VHost string `protobuf:"bytes,5,opt,name=vHost,proto3" json:"vHost,omitempty"` // contains filtered or unexported fields }
func (*RabbitConf) Descriptor
deprecated
func (*RabbitConf) Descriptor() ([]byte, []int)
Deprecated: Use RabbitConf.ProtoReflect.Descriptor instead.
func (*RabbitConf) GetHost ¶
func (x *RabbitConf) GetHost() string
func (*RabbitConf) GetPassword ¶
func (x *RabbitConf) GetPassword() string
func (*RabbitConf) GetPort ¶
func (x *RabbitConf) GetPort() int32
func (*RabbitConf) GetUsername ¶
func (x *RabbitConf) GetUsername() string
func (*RabbitConf) GetVHost ¶
func (x *RabbitConf) GetVHost() string
func (*RabbitConf) ProtoMessage ¶
func (*RabbitConf) ProtoMessage()
func (*RabbitConf) ProtoReflect ¶
func (x *RabbitConf) ProtoReflect() protoreflect.Message
func (*RabbitConf) Reset ¶
func (x *RabbitConf) Reset()
func (*RabbitConf) String ¶
func (x *RabbitConf) String() string
func (*RabbitConf) URL ¶ added in v0.0.39
func (c *RabbitConf) URL() string
func (*RabbitConf) Validate ¶
func (m *RabbitConf) Validate() error
Validate checks the field values on RabbitConf 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 (*RabbitConf) ValidateAll ¶ added in v0.0.8
func (m *RabbitConf) ValidateAll() error
ValidateAll checks the field values on RabbitConf 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 RabbitConfMultiError, or nil if none found.
type RabbitConfMultiError ¶ added in v0.0.8
type RabbitConfMultiError []error
RabbitConfMultiError is an error wrapping multiple validation errors returned by RabbitConf.ValidateAll() if the designated constraints aren't met.
func (RabbitConfMultiError) AllErrors ¶ added in v0.0.8
func (m RabbitConfMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (RabbitConfMultiError) Error ¶ added in v0.0.8
func (m RabbitConfMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type RabbitConfValidationError ¶
type RabbitConfValidationError struct {
// contains filtered or unexported fields
}
RabbitConfValidationError is the validation error returned by RabbitConf.Validate if the designated constraints aren't met.
func (RabbitConfValidationError) Cause ¶
func (e RabbitConfValidationError) Cause() error
Cause function returns cause value.
func (RabbitConfValidationError) Error ¶
func (e RabbitConfValidationError) Error() string
Error satisfies the builtin error interface
func (RabbitConfValidationError) ErrorName ¶
func (e RabbitConfValidationError) ErrorName() string
ErrorName returns error name.
func (RabbitConfValidationError) Field ¶
func (e RabbitConfValidationError) Field() string
Field function returns field value.
func (RabbitConfValidationError) Key ¶
func (e RabbitConfValidationError) Key() bool
Key function returns key value.
func (RabbitConfValidationError) Reason ¶
func (e RabbitConfValidationError) Reason() string
Reason function returns reason value.
type RabbitListener ¶
type RabbitListener struct {
// contains filtered or unexported fields
}
func (*RabbitListener) Name ¶ added in v0.0.31
func (s *RabbitListener) Name() string
type RabbitMqSender ¶
type RabbitMqSender struct { ContentType string // contains filtered or unexported fields }
func (*RabbitMqSender) Close ¶
func (q *RabbitMqSender) Close() error
func (*RabbitMqSender) Name ¶
func (q *RabbitMqSender) Name() string