rabbitmq

package
v0.0.39 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ExchangeDirect  = amqp.ExchangeDirect
	ExchangeFanout  = amqp.ExchangeFanout
	ExchangeTopic   = amqp.ExchangeTopic
	ExchangeHeaders = amqp.ExchangeHeaders
)
View Source
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.

View Source
var File_client_rabbitmq_conf_proto protoreflect.FileDescriptor

Functions

func Client added in v0.0.37

func Client(ctx context.Context, msg []byte) []byte

func ErrorChannelClosed added in v0.0.32

func ErrorChannelClosed(format string, args ...interface{}) *errors.Error

channel 断了

func ErrorDisconnect added in v0.0.32

func ErrorDisconnect(format string, args ...interface{}) *errors.Error

断链接了

func ErrorUnkown added in v0.0.32

func ErrorUnkown(format string, args ...interface{}) *errors.Error

func IsChannelClosed added in v0.0.32

func IsChannelClosed(err error) bool

channel 断了

func IsDisconnect added in v0.0.32

func IsDisconnect(err error) bool

断链接了

func IsUnkown added in v0.0.32

func IsUnkown(err error) bool

func MustNewListener

func MustNewListener(c *ListenerConf, handler ConsumeHandler) queue.MessageQueue

func NewListener

func NewListener(c *ListenerConf, handler ConsumeHandler) (consumer queue.MessageQueue, err error)

func Server added in v0.0.37

func Server(msg []byte) (context.Context, context.CancelFunc, []byte, error)

Types

type Admin

type Admin struct {
	// contains filtered or unexported fields
}

func MustNewAdmin

func MustNewAdmin(c *RabbitConf) *Admin

func (*Admin) Bind

func (q *Admin) Bind(queueName string, routekey string, exchange, kind string, args amqp.Table) error

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

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

Cause function returns cause value.

func (AdminExchangeConfValidationError) Error added in v0.0.31

Error satisfies the builtin error interface

func (AdminExchangeConfValidationError) ErrorName added in v0.0.31

ErrorName returns error name.

func (AdminExchangeConfValidationError) Field added in v0.0.31

Field function returns field value.

func (AdminExchangeConfValidationError) Key added in v0.0.31

Key function returns key value.

func (AdminExchangeConfValidationError) Reason added in v0.0.31

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

Cause function returns cause value.

func (AdminQueueConfValidationError) Error added in v0.0.31

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

Field function returns field value.

func (AdminQueueConfValidationError) Key added in v0.0.31

Key function returns key value.

func (AdminQueueConfValidationError) Reason added in v0.0.31

Reason function returns reason value.

type ConsumeHandle

type ConsumeHandle func(ctx context.Context, topic string, key, message []byte) error

type ConsumeHandler

type ConsumeHandler interface {
	Consume(ctx context.Context, topic string, key, message []byte) error
}

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

Cause function returns cause value.

func (ConsumerConfValidationError) Error

Error satisfies the builtin error interface

func (ConsumerConfValidationError) ErrorName

func (e ConsumerConfValidationError) ErrorName() string

ErrorName returns error name.

func (ConsumerConfValidationError) Field

Field function returns field value.

func (ConsumerConfValidationError) Key

Key function returns key value.

func (ConsumerConfValidationError) Reason

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

Deprecated: Use Data.ProtoReflect.Descriptor instead.

func (*Data) GetBody added in v0.0.37

func (x *Data) GetBody() []byte

func (*Data) GetMd added in v0.0.37

func (x *Data) GetMd() map[string]string

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) Reset added in v0.0.37

func (x *Data) Reset()

func (*Data) String added in v0.0.37

func (x *Data) String() string

func (*Data) Validate added in v0.0.37

func (m *Data) Validate() error

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

func (m *Data) ValidateAll() error

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

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

Cause function returns cause value.

func (ExchangeConfValidationError) Error

Error satisfies the builtin error interface

func (ExchangeConfValidationError) ErrorName

func (e ExchangeConfValidationError) ErrorName() string

ErrorName returns error name.

func (ExchangeConfValidationError) Field

Field function returns field value.

func (ExchangeConfValidationError) Key

Key function returns key value.

func (ExchangeConfValidationError) Reason

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

Cause function returns cause value.

func (ListenerConfValidationError) Error

Error satisfies the builtin error interface

func (ListenerConfValidationError) ErrorName

func (e ListenerConfValidationError) ErrorName() string

ErrorName returns error name.

func (ListenerConfValidationError) Field

Field function returns field value.

func (ListenerConfValidationError) Key

Key function returns key value.

func (ListenerConfValidationError) Reason

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

Cause function returns cause value.

func (ProducerConfValidationError) Error

Error satisfies the builtin error interface

func (ProducerConfValidationError) ErrorName

func (e ProducerConfValidationError) ErrorName() string

ErrorName returns error name.

func (ProducerConfValidationError) Field

Field function returns field value.

func (ProducerConfValidationError) Key

Key function returns key value.

func (ProducerConfValidationError) Reason

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

Deprecated: Use QueueConf.ProtoReflect.Descriptor instead.

func (*QueueConf) GetName

func (x *QueueConf) GetName() string

func (*QueueConf) ProtoMessage

func (*QueueConf) ProtoMessage()

func (*QueueConf) ProtoReflect

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

func (*QueueConf) Reset

func (x *QueueConf) Reset()

func (*QueueConf) String

func (x *QueueConf) String() string

func (*QueueConf) Validate

func (m *QueueConf) Validate() error

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

func (m *QueueConf) ValidateAll() error

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

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

Error satisfies the builtin error interface

func (RabbitConfValidationError) ErrorName

func (e RabbitConfValidationError) ErrorName() string

ErrorName returns error name.

func (RabbitConfValidationError) Field

Field function returns field value.

func (RabbitConfValidationError) Key

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

func (*RabbitListener) Start

func (s *RabbitListener) Start(context.Context) error

func (*RabbitListener) Stop

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

func (*RabbitMqSender) Send

func (q *RabbitMqSender) Send(ctx context.Context, header map[string]interface{}, exchange string, routeKey string, msg []byte) error

type Sender added in v0.0.39

type Sender interface {
	Name() string
	Send(ctx context.Context, header map[string]interface{}, exchange string, routeKey string, msg []byte) error
	Close() error
}

func MustNewSender

func MustNewSender(c *ProducerConf) Sender

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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