Documentation ¶
Overview ¶
Package internal is a generated GoMock package.
Package internal is a generated GoMock package.
Index ¶
- Constants
- Variables
- func GetOrNewRocketMQClient(option ClientOptions, callbackCh chan interface{}) *rmqClient
- func GetRetryTopic(group string) string
- func NewHeartbeatData(clientID string) *heartbeatData
- func NewNamesrv(addr primitive.NamesrvAddr) (*namesrvs, error)
- func NewTraceDispatcher(traceTopic string, access primitive.AccessChannel, nameServerAddrs []string) *traceDispatcher
- func ValidateGroup(group string)
- type BrokerData
- type CheckTransactionStateCallback
- type CheckTransactionStateRequestHeader
- type ClientOptions
- type ConsumerSendMsgBackRequest
- type EndTransactionRequestHeader
- type FindBrokerResult
- type GetConsumerList
- type GetMaxOffsetRequest
- type GetRouteInfoRequest
- type InnerConsumer
- type InnerProducer
- type Keyset
- type MockInnerConsumer
- func (m *MockInnerConsumer) EXPECT() *MockInnerConsumerMockRecorder
- func (m *MockInnerConsumer) IsSubscribeTopicNeedUpdate(topic string) bool
- func (m *MockInnerConsumer) IsUnitMode() bool
- func (m *MockInnerConsumer) PersistConsumerOffset() error
- func (m *MockInnerConsumer) Rebalance()
- func (m *MockInnerConsumer) SubscriptionDataList() []*SubscriptionData
- func (m *MockInnerConsumer) UpdateTopicSubscribeInfo(topic string, mqs []*primitive.MessageQueue)
- type MockInnerConsumerMockRecorder
- func (mr *MockInnerConsumerMockRecorder) IsSubscribeTopicNeedUpdate(topic interface{}) *gomock.Call
- func (mr *MockInnerConsumerMockRecorder) IsUnitMode() *gomock.Call
- func (mr *MockInnerConsumerMockRecorder) PersistConsumerOffset() *gomock.Call
- func (mr *MockInnerConsumerMockRecorder) Rebalance() *gomock.Call
- func (mr *MockInnerConsumerMockRecorder) SubscriptionDataList() *gomock.Call
- func (mr *MockInnerConsumerMockRecorder) UpdateTopicSubscribeInfo(topic, mqs interface{}) *gomock.Call
- type MockInnerProducer
- func (m *MockInnerProducer) EXPECT() *MockInnerProducerMockRecorder
- func (m *MockInnerProducer) IsPublishTopicNeedUpdate(topic string) bool
- func (m *MockInnerProducer) IsUnitMode() bool
- func (m *MockInnerProducer) PublishTopicList() []string
- func (m *MockInnerProducer) UpdateTopicPublishInfo(topic string, info *TopicPublishInfo)
- type MockInnerProducerMockRecorder
- func (mr *MockInnerProducerMockRecorder) IsPublishTopicNeedUpdate(topic interface{}) *gomock.Call
- func (mr *MockInnerProducerMockRecorder) IsUnitMode() *gomock.Call
- func (mr *MockInnerProducerMockRecorder) PublishTopicList() *gomock.Call
- func (mr *MockInnerProducerMockRecorder) UpdateTopicPublishInfo(topic, info interface{}) *gomock.Call
- type MockNamesrvs
- func (m *MockNamesrvs) AddBroker(routeData *TopicRouteData)
- func (m *MockNamesrvs) EXPECT() *MockNamesrvsMockRecorder
- func (m *MockNamesrvs) FetchPublishMessageQueues(topic string) ([]*primitive.MessageQueue, error)
- func (m *MockNamesrvs) FetchSubscribeMessageQueues(topic string) ([]*primitive.MessageQueue, error)
- func (m *MockNamesrvs) FindBrokerAddrByName(brokerName string) string
- func (m *MockNamesrvs) FindBrokerAddrByTopic(topic string) string
- func (m *MockNamesrvs) FindBrokerAddressInSubscribe(brokerName string, brokerId int64, onlyThisBroker bool) *FindBrokerResult
- func (m *MockNamesrvs) UpdateTopicRouteInfo(topic string) *TopicRouteData
- type MockNamesrvsMockRecorder
- func (mr *MockNamesrvsMockRecorder) AddBroker(routeData interface{}) *gomock.Call
- func (mr *MockNamesrvsMockRecorder) FetchPublishMessageQueues(topic interface{}) *gomock.Call
- func (mr *MockNamesrvsMockRecorder) FetchSubscribeMessageQueues(topic interface{}) *gomock.Call
- func (mr *MockNamesrvsMockRecorder) FindBrokerAddrByName(brokerName interface{}) *gomock.Call
- func (mr *MockNamesrvsMockRecorder) FindBrokerAddrByTopic(topic interface{}) *gomock.Call
- func (mr *MockNamesrvsMockRecorder) FindBrokerAddressInSubscribe(brokerName, brokerId, onlyThisBroker interface{}) *gomock.Call
- func (mr *MockNamesrvsMockRecorder) UpdateTopicRouteInfo(topic interface{}) *gomock.Call
- type MockRMQClient
- func (m *MockRMQClient) CheckClientInBroker()
- func (m *MockRMQClient) ClientID() string
- func (m *MockRMQClient) EXPECT() *MockRMQClientMockRecorder
- func (m *MockRMQClient) InvokeAsync(ctx context.Context, addr string, request *remote.RemotingCommand, ...) error
- func (m *MockRMQClient) InvokeOneWay(ctx context.Context, addr string, request *remote.RemotingCommand, ...) error
- func (m *MockRMQClient) InvokeSync(ctx context.Context, addr string, request *remote.RemotingCommand, ...) (*remote.RemotingCommand, error)
- func (m *MockRMQClient) ProcessSendResponse(brokerName string, cmd *remote.RemotingCommand, resp *primitive.SendResult, ...) error
- func (m *MockRMQClient) PullMessage(ctx context.Context, brokerAddrs string, request *PullMessageRequest) (*primitive.PullResult, error)
- func (m *MockRMQClient) PullMessageAsync(ctx context.Context, brokerAddrs string, request *PullMessageRequest, ...) error
- func (m *MockRMQClient) RebalanceImmediately()
- func (m *MockRMQClient) RegisterConsumer(group string, consumer InnerConsumer) error
- func (m *MockRMQClient) RegisterProducer(group string, producer InnerProducer)
- func (m *MockRMQClient) SendHeartbeatToAllBrokerWithLock()
- func (m *MockRMQClient) Shutdown()
- func (m *MockRMQClient) Start()
- func (m *MockRMQClient) UnregisterConsumer(group string)
- func (m *MockRMQClient) UpdatePublishInfo(topic string, data *TopicRouteData)
- func (m *MockRMQClient) UpdateTopicRouteInfo()
- type MockRMQClientMockRecorder
- func (mr *MockRMQClientMockRecorder) CheckClientInBroker() *gomock.Call
- func (mr *MockRMQClientMockRecorder) ClientID() *gomock.Call
- func (mr *MockRMQClientMockRecorder) InvokeAsync(ctx, addr, request, timeoutMillis, f interface{}) *gomock.Call
- func (mr *MockRMQClientMockRecorder) InvokeOneWay(ctx, addr, request, timeoutMillis interface{}) *gomock.Call
- func (mr *MockRMQClientMockRecorder) InvokeSync(ctx, addr, request, timeoutMillis interface{}) *gomock.Call
- func (mr *MockRMQClientMockRecorder) ProcessSendResponse(brokerName, cmd, resp interface{}, msgs ...interface{}) *gomock.Call
- func (mr *MockRMQClientMockRecorder) PullMessage(ctx, brokerAddrs, request interface{}) *gomock.Call
- func (mr *MockRMQClientMockRecorder) PullMessageAsync(ctx, brokerAddrs, request, f interface{}) *gomock.Call
- func (mr *MockRMQClientMockRecorder) RebalanceImmediately() *gomock.Call
- func (mr *MockRMQClientMockRecorder) RegisterConsumer(group, consumer interface{}) *gomock.Call
- func (mr *MockRMQClientMockRecorder) RegisterProducer(group, producer interface{}) *gomock.Call
- func (mr *MockRMQClientMockRecorder) SendHeartbeatToAllBrokerWithLock() *gomock.Call
- func (mr *MockRMQClientMockRecorder) Shutdown() *gomock.Call
- func (mr *MockRMQClientMockRecorder) Start() *gomock.Call
- func (mr *MockRMQClientMockRecorder) UnregisterConsumer(group interface{}) *gomock.Call
- func (mr *MockRMQClientMockRecorder) UpdatePublishInfo(topic, data interface{}) *gomock.Call
- func (mr *MockRMQClientMockRecorder) UpdateTopicRouteInfo() *gomock.Call
- type Namesrvs
- type PullMessageRequest
- type PullMessageResponse
- type QueryConsumerOffsetRequest
- type QueueData
- type RMQClient
- type SearchOffsetRequest
- type SendMessageRequest
- type SendMessageResponse
- type ServiceState
- type SubscriptionData
- type TopicPublishInfo
- type TopicRouteData
- type TraceBean
- type TraceContext
- type TraceDispatcher
- type TraceTransferBean
- type TraceType
- type TransactionListener
- type UpdateConsumerOffsetRequest
Constants ¶
const ( RetryGroupTopicPrefix = "%RETRY%" DefaultConsumerGroup = "DEFAULT_CONSUMER" ClientInnerProducerGroup = "CLIENT_INNER_PRODUCER" SystemTopicPrefix = "rmq_sys_" )
const ( ReqSendMessage = int16(10) ReqPullMessage = int16(11) ReqQueryConsumerOffset = int16(14) ReqUpdateConsumerOffset = int16(15) ReqSearchOffsetByTimestamp = int16(30) ReqGetMaxOffset = int16(30) ReqHeartBeat = int16(34) ReqConsumerSendMsgBack = int16(36) ReqENDTransaction = int16(37) ReqGetConsumerListByGroup = int16(38) ReqLockBatchMQ = int16(41) ReqUnlockBatchMQ = int16(42) ReqGetRouteInfoByTopic = int16(105) ReqSendBatchMessage = int16(320) ReqCheckTransactionState = int16(39) ReqNotifyConsumerIdsChanged = int16(40) ReqResetConsuemrOffset = int16(220) ReqGetConsumerRunningInfo = int16(307) ReqConsumeMessageDirectly = int16(309) )
const ( ResSuccess = int16(0) ResError = int16(1) ResFlushDiskTimeout = int16(10) ResSlaveNotAvailable = int16(11) ResFlushSlaveTimeout = int16(12) ResTopicNotExist = int16(17) ResPullNotFound = int16(19) ResPullRetryImmediately = int16(20) ResPullOffsetMoved = int16(21) )
const ( EnvNameServerAddr = "NAMESRV_ADDR" MasterId = int64(0) )
const ( RmqSysTraceTopic = "RMQ_SYS_TRACE_TOPIC" ProducerType traceDispatcherType = iota ConsumerType TraceTopicPrefix = SystemTopicPrefix + "TRACE_DATA_" TraceGroupName = "_INNER_TRACE_PRODUCER" )
const (
V4_1_0 = 0
)
Variables ¶
var ( ErrNoNameserver = errors.New("nameServerAddrs can't be empty.") ErrMultiIP = errors.New("multiple IP addr does not support") ErrIllegalIP = errors.New("IP addr error") )
var (
ErrServiceState = errors.New("service close is not running, please check")
)
var (
ErrTopicNotExist = errors.New("topic not exist")
)
Functions ¶
func GetOrNewRocketMQClient ¶
func GetOrNewRocketMQClient(option ClientOptions, callbackCh chan interface{}) *rmqClient
func GetRetryTopic ¶
func NewHeartbeatData ¶
func NewHeartbeatData(clientID string) *heartbeatData
func NewNamesrv ¶
func NewNamesrv(addr primitive.NamesrvAddr) (*namesrvs, error)
NewNamesrv init Namesrv from namesrv addr string.
func NewTraceDispatcher ¶
func NewTraceDispatcher(traceTopic string, access primitive.AccessChannel, nameServerAddrs []string) *traceDispatcher
func ValidateGroup ¶
func ValidateGroup(group string)
Types ¶
type BrokerData ¶
type BrokerData struct { Cluster string `json:"cluster"` BrokerName string `json:"brokerName"` BrokerAddresses map[int64]string `json:"brokerAddrs"` // contains filtered or unexported fields }
BrokerData BrokerData
func (*BrokerData) Equals ¶
func (b *BrokerData) Equals(bd *BrokerData) bool
type CheckTransactionStateCallback ¶
type CheckTransactionStateCallback struct { Addr net.Addr Msg primitive.MessageExt Header CheckTransactionStateRequestHeader }
remotingClient callback TransactionProducer
type CheckTransactionStateRequestHeader ¶
type CheckTransactionStateRequestHeader struct { TranStateTableOffset int64 CommitLogOffset int64 MsgId string TransactionId string OffsetMsgId string }
func (*CheckTransactionStateRequestHeader) Decode ¶
func (request *CheckTransactionStateRequestHeader) Decode(ext map[string]string)
func (*CheckTransactionStateRequestHeader) Encode ¶
func (request *CheckTransactionStateRequestHeader) Encode() map[string]string
type ClientOptions ¶
type ClientOptions struct { GroupName string NameServerAddrs primitive.NamesrvAddr Namesrv *namesrvs ClientIP string InstanceName string UnitMode bool UnitName string VIPChannelEnabled bool RetryTimes int Interceptors []primitive.Interceptor Credentials primitive.Credentials Namespace string }
func DefaultClientOptions ¶
func DefaultClientOptions() ClientOptions
func (*ClientOptions) ChangeInstanceNameToPID ¶
func (opt *ClientOptions) ChangeInstanceNameToPID()
func (*ClientOptions) String ¶
func (opt *ClientOptions) String() string
type ConsumerSendMsgBackRequest ¶
type ConsumerSendMsgBackRequest struct { Group string `json:"group"` Offset int64 `json:"offset"` DelayLevel int `json:"delayLevel"` OriginMsgId string `json:"originMsgId"` OriginTopic string `json:"originTopic"` UnitMode bool `json:"unitMode"` MaxReconsumeTimes int32 `json:"maxReconsumeTimes"` }
func (*ConsumerSendMsgBackRequest) Encode ¶
func (request *ConsumerSendMsgBackRequest) Encode() map[string]string
type EndTransactionRequestHeader ¶
type EndTransactionRequestHeader struct { ProducerGroup string `json:"producerGroup"` TranStateTableOffset int64 `json:"tranStateTableOffset"` CommitLogOffset int64 `json:"commitLogOffset"` CommitOrRollback int `json:"commitOrRollback"` FromTransactionCheck bool `json:"fromTransactionCheck"` MsgID string `json:"msgId"` TransactionId string `json:"transactionId"` }
func (*EndTransactionRequestHeader) Encode ¶
func (request *EndTransactionRequestHeader) Encode() map[string]string
type FindBrokerResult ¶
type GetConsumerList ¶
type GetConsumerList struct {
ConsumerGroup string `json:"consumerGroup"`
}
func (*GetConsumerList) Encode ¶
func (request *GetConsumerList) Encode() map[string]string
type GetMaxOffsetRequest ¶
func (*GetMaxOffsetRequest) Encode ¶
func (request *GetMaxOffsetRequest) Encode() map[string]string
type GetRouteInfoRequest ¶
type GetRouteInfoRequest struct {
Topic string `json:"topic"`
}
func (*GetRouteInfoRequest) Decode ¶
func (request *GetRouteInfoRequest) Decode(properties map[string]string) error
func (*GetRouteInfoRequest) Encode ¶
func (request *GetRouteInfoRequest) Encode() map[string]string
type InnerConsumer ¶
type InnerConsumer interface { PersistConsumerOffset() error UpdateTopicSubscribeInfo(topic string, mqs []*primitive.MessageQueue) IsSubscribeTopicNeedUpdate(topic string) bool SubscriptionDataList() []*SubscriptionData Rebalance() IsUnitMode() bool }
type InnerProducer ¶
type MockInnerConsumer ¶
type MockInnerConsumer struct {
// contains filtered or unexported fields
}
MockInnerConsumer is a mock of InnerConsumer interface
func NewMockInnerConsumer ¶
func NewMockInnerConsumer(ctrl *gomock.Controller) *MockInnerConsumer
NewMockInnerConsumer creates a new mock instance
func (*MockInnerConsumer) EXPECT ¶
func (m *MockInnerConsumer) EXPECT() *MockInnerConsumerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockInnerConsumer) IsSubscribeTopicNeedUpdate ¶
func (m *MockInnerConsumer) IsSubscribeTopicNeedUpdate(topic string) bool
IsSubscribeTopicNeedUpdate mocks base method
func (*MockInnerConsumer) IsUnitMode ¶
func (m *MockInnerConsumer) IsUnitMode() bool
IsUnitMode mocks base method
func (*MockInnerConsumer) PersistConsumerOffset ¶
func (m *MockInnerConsumer) PersistConsumerOffset() error
PersistConsumerOffset mocks base method
func (*MockInnerConsumer) Rebalance ¶
func (m *MockInnerConsumer) Rebalance()
Rebalance mocks base method
func (*MockInnerConsumer) SubscriptionDataList ¶
func (m *MockInnerConsumer) SubscriptionDataList() []*SubscriptionData
SubscriptionDataList mocks base method
func (*MockInnerConsumer) UpdateTopicSubscribeInfo ¶
func (m *MockInnerConsumer) UpdateTopicSubscribeInfo(topic string, mqs []*primitive.MessageQueue)
UpdateTopicSubscribeInfo mocks base method
type MockInnerConsumerMockRecorder ¶
type MockInnerConsumerMockRecorder struct {
// contains filtered or unexported fields
}
MockInnerConsumerMockRecorder is the mock recorder for MockInnerConsumer
func (*MockInnerConsumerMockRecorder) IsSubscribeTopicNeedUpdate ¶
func (mr *MockInnerConsumerMockRecorder) IsSubscribeTopicNeedUpdate(topic interface{}) *gomock.Call
IsSubscribeTopicNeedUpdate indicates an expected call of IsSubscribeTopicNeedUpdate
func (*MockInnerConsumerMockRecorder) IsUnitMode ¶
func (mr *MockInnerConsumerMockRecorder) IsUnitMode() *gomock.Call
IsUnitMode indicates an expected call of IsUnitMode
func (*MockInnerConsumerMockRecorder) PersistConsumerOffset ¶
func (mr *MockInnerConsumerMockRecorder) PersistConsumerOffset() *gomock.Call
PersistConsumerOffset indicates an expected call of PersistConsumerOffset
func (*MockInnerConsumerMockRecorder) Rebalance ¶
func (mr *MockInnerConsumerMockRecorder) Rebalance() *gomock.Call
Rebalance indicates an expected call of Rebalance
func (*MockInnerConsumerMockRecorder) SubscriptionDataList ¶
func (mr *MockInnerConsumerMockRecorder) SubscriptionDataList() *gomock.Call
SubscriptionDataList indicates an expected call of SubscriptionDataList
func (*MockInnerConsumerMockRecorder) UpdateTopicSubscribeInfo ¶
func (mr *MockInnerConsumerMockRecorder) UpdateTopicSubscribeInfo(topic, mqs interface{}) *gomock.Call
UpdateTopicSubscribeInfo indicates an expected call of UpdateTopicSubscribeInfo
type MockInnerProducer ¶
type MockInnerProducer struct {
// contains filtered or unexported fields
}
MockInnerProducer is a mock of InnerProducer interface
func NewMockInnerProducer ¶
func NewMockInnerProducer(ctrl *gomock.Controller) *MockInnerProducer
NewMockInnerProducer creates a new mock instance
func (*MockInnerProducer) EXPECT ¶
func (m *MockInnerProducer) EXPECT() *MockInnerProducerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockInnerProducer) IsPublishTopicNeedUpdate ¶
func (m *MockInnerProducer) IsPublishTopicNeedUpdate(topic string) bool
IsPublishTopicNeedUpdate mocks base method
func (*MockInnerProducer) IsUnitMode ¶
func (m *MockInnerProducer) IsUnitMode() bool
IsUnitMode mocks base method
func (*MockInnerProducer) PublishTopicList ¶
func (m *MockInnerProducer) PublishTopicList() []string
PublishTopicList mocks base method
func (*MockInnerProducer) UpdateTopicPublishInfo ¶
func (m *MockInnerProducer) UpdateTopicPublishInfo(topic string, info *TopicPublishInfo)
UpdateTopicPublishInfo mocks base method
type MockInnerProducerMockRecorder ¶
type MockInnerProducerMockRecorder struct {
// contains filtered or unexported fields
}
MockInnerProducerMockRecorder is the mock recorder for MockInnerProducer
func (*MockInnerProducerMockRecorder) IsPublishTopicNeedUpdate ¶
func (mr *MockInnerProducerMockRecorder) IsPublishTopicNeedUpdate(topic interface{}) *gomock.Call
IsPublishTopicNeedUpdate indicates an expected call of IsPublishTopicNeedUpdate
func (*MockInnerProducerMockRecorder) IsUnitMode ¶
func (mr *MockInnerProducerMockRecorder) IsUnitMode() *gomock.Call
IsUnitMode indicates an expected call of IsUnitMode
func (*MockInnerProducerMockRecorder) PublishTopicList ¶
func (mr *MockInnerProducerMockRecorder) PublishTopicList() *gomock.Call
PublishTopicList indicates an expected call of PublishTopicList
func (*MockInnerProducerMockRecorder) UpdateTopicPublishInfo ¶
func (mr *MockInnerProducerMockRecorder) UpdateTopicPublishInfo(topic, info interface{}) *gomock.Call
UpdateTopicPublishInfo indicates an expected call of UpdateTopicPublishInfo
type MockNamesrvs ¶
type MockNamesrvs struct {
// contains filtered or unexported fields
}
MockNamesrvs is a mock of Namesrvs interface
func NewMockNamesrvs ¶
func NewMockNamesrvs(ctrl *gomock.Controller) *MockNamesrvs
NewMockNamesrvs creates a new mock instance
func (*MockNamesrvs) AddBroker ¶
func (m *MockNamesrvs) AddBroker(routeData *TopicRouteData)
AddBroker mocks base method
func (*MockNamesrvs) EXPECT ¶
func (m *MockNamesrvs) EXPECT() *MockNamesrvsMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockNamesrvs) FetchPublishMessageQueues ¶
func (m *MockNamesrvs) FetchPublishMessageQueues(topic string) ([]*primitive.MessageQueue, error)
FetchPublishMessageQueues mocks base method
func (*MockNamesrvs) FetchSubscribeMessageQueues ¶
func (m *MockNamesrvs) FetchSubscribeMessageQueues(topic string) ([]*primitive.MessageQueue, error)
FetchSubscribeMessageQueues mocks base method
func (*MockNamesrvs) FindBrokerAddrByName ¶
func (m *MockNamesrvs) FindBrokerAddrByName(brokerName string) string
FindBrokerAddrByName mocks base method
func (*MockNamesrvs) FindBrokerAddrByTopic ¶
func (m *MockNamesrvs) FindBrokerAddrByTopic(topic string) string
FindBrokerAddrByTopic mocks base method
func (*MockNamesrvs) FindBrokerAddressInSubscribe ¶
func (m *MockNamesrvs) FindBrokerAddressInSubscribe(brokerName string, brokerId int64, onlyThisBroker bool) *FindBrokerResult
FindBrokerAddressInSubscribe mocks base method
func (*MockNamesrvs) UpdateTopicRouteInfo ¶
func (m *MockNamesrvs) UpdateTopicRouteInfo(topic string) *TopicRouteData
UpdateTopicRouteInfo mocks base method
type MockNamesrvsMockRecorder ¶
type MockNamesrvsMockRecorder struct {
// contains filtered or unexported fields
}
MockNamesrvsMockRecorder is the mock recorder for MockNamesrvs
func (*MockNamesrvsMockRecorder) AddBroker ¶
func (mr *MockNamesrvsMockRecorder) AddBroker(routeData interface{}) *gomock.Call
AddBroker indicates an expected call of AddBroker
func (*MockNamesrvsMockRecorder) FetchPublishMessageQueues ¶
func (mr *MockNamesrvsMockRecorder) FetchPublishMessageQueues(topic interface{}) *gomock.Call
FetchPublishMessageQueues indicates an expected call of FetchPublishMessageQueues
func (*MockNamesrvsMockRecorder) FetchSubscribeMessageQueues ¶
func (mr *MockNamesrvsMockRecorder) FetchSubscribeMessageQueues(topic interface{}) *gomock.Call
FetchSubscribeMessageQueues indicates an expected call of FetchSubscribeMessageQueues
func (*MockNamesrvsMockRecorder) FindBrokerAddrByName ¶
func (mr *MockNamesrvsMockRecorder) FindBrokerAddrByName(brokerName interface{}) *gomock.Call
FindBrokerAddrByName indicates an expected call of FindBrokerAddrByName
func (*MockNamesrvsMockRecorder) FindBrokerAddrByTopic ¶
func (mr *MockNamesrvsMockRecorder) FindBrokerAddrByTopic(topic interface{}) *gomock.Call
FindBrokerAddrByTopic indicates an expected call of FindBrokerAddrByTopic
func (*MockNamesrvsMockRecorder) FindBrokerAddressInSubscribe ¶
func (mr *MockNamesrvsMockRecorder) FindBrokerAddressInSubscribe(brokerName, brokerId, onlyThisBroker interface{}) *gomock.Call
FindBrokerAddressInSubscribe indicates an expected call of FindBrokerAddressInSubscribe
func (*MockNamesrvsMockRecorder) UpdateTopicRouteInfo ¶
func (mr *MockNamesrvsMockRecorder) UpdateTopicRouteInfo(topic interface{}) *gomock.Call
UpdateTopicRouteInfo indicates an expected call of UpdateTopicRouteInfo
type MockRMQClient ¶
type MockRMQClient struct {
// contains filtered or unexported fields
}
MockRMQClient is a mock of RMQClient interface
func NewMockRMQClient ¶
func NewMockRMQClient(ctrl *gomock.Controller) *MockRMQClient
NewMockRMQClient creates a new mock instance
func (*MockRMQClient) CheckClientInBroker ¶
func (m *MockRMQClient) CheckClientInBroker()
CheckClientInBroker mocks base method
func (*MockRMQClient) ClientID ¶
func (m *MockRMQClient) ClientID() string
ClientID mocks base method
func (*MockRMQClient) EXPECT ¶
func (m *MockRMQClient) EXPECT() *MockRMQClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockRMQClient) InvokeAsync ¶
func (m *MockRMQClient) InvokeAsync(ctx context.Context, addr string, request *remote.RemotingCommand, timeoutMillis time.Duration, f func(*remote.RemotingCommand, error)) error
InvokeAsync mocks base method
func (*MockRMQClient) InvokeOneWay ¶
func (m *MockRMQClient) InvokeOneWay(ctx context.Context, addr string, request *remote.RemotingCommand, timeoutMillis time.Duration) error
InvokeOneWay mocks base method
func (*MockRMQClient) InvokeSync ¶
func (m *MockRMQClient) InvokeSync(ctx context.Context, addr string, request *remote.RemotingCommand, timeoutMillis time.Duration) (*remote.RemotingCommand, error)
InvokeSync mocks base method
func (*MockRMQClient) ProcessSendResponse ¶
func (m *MockRMQClient) ProcessSendResponse(brokerName string, cmd *remote.RemotingCommand, resp *primitive.SendResult, msgs ...*primitive.Message) error
ProcessSendResponse mocks base method
func (*MockRMQClient) PullMessage ¶
func (m *MockRMQClient) PullMessage(ctx context.Context, brokerAddrs string, request *PullMessageRequest) (*primitive.PullResult, error)
PullMessage mocks base method
func (*MockRMQClient) PullMessageAsync ¶
func (m *MockRMQClient) PullMessageAsync(ctx context.Context, brokerAddrs string, request *PullMessageRequest, f func(*primitive.PullResult)) error
PullMessageAsync mocks base method
func (*MockRMQClient) RebalanceImmediately ¶
func (m *MockRMQClient) RebalanceImmediately()
RebalanceImmediately mocks base method
func (*MockRMQClient) RegisterConsumer ¶
func (m *MockRMQClient) RegisterConsumer(group string, consumer InnerConsumer) error
RegisterConsumer mocks base method
func (*MockRMQClient) RegisterProducer ¶
func (m *MockRMQClient) RegisterProducer(group string, producer InnerProducer)
RegisterProducer mocks base method
func (*MockRMQClient) SendHeartbeatToAllBrokerWithLock ¶
func (m *MockRMQClient) SendHeartbeatToAllBrokerWithLock()
SendHeartbeatToAllBrokerWithLock mocks base method
func (*MockRMQClient) UnregisterConsumer ¶
func (m *MockRMQClient) UnregisterConsumer(group string)
UnregisterConsumer mocks base method
func (*MockRMQClient) UpdatePublishInfo ¶
func (m *MockRMQClient) UpdatePublishInfo(topic string, data *TopicRouteData)
UpdatePublishInfo mocks base method
func (*MockRMQClient) UpdateTopicRouteInfo ¶
func (m *MockRMQClient) UpdateTopicRouteInfo()
UpdateTopicRouteInfo mocks base method
type MockRMQClientMockRecorder ¶
type MockRMQClientMockRecorder struct {
// contains filtered or unexported fields
}
MockRMQClientMockRecorder is the mock recorder for MockRMQClient
func (*MockRMQClientMockRecorder) CheckClientInBroker ¶
func (mr *MockRMQClientMockRecorder) CheckClientInBroker() *gomock.Call
CheckClientInBroker indicates an expected call of CheckClientInBroker
func (*MockRMQClientMockRecorder) ClientID ¶
func (mr *MockRMQClientMockRecorder) ClientID() *gomock.Call
ClientID indicates an expected call of ClientID
func (*MockRMQClientMockRecorder) InvokeAsync ¶
func (mr *MockRMQClientMockRecorder) InvokeAsync(ctx, addr, request, timeoutMillis, f interface{}) *gomock.Call
InvokeAsync indicates an expected call of InvokeAsync
func (*MockRMQClientMockRecorder) InvokeOneWay ¶
func (mr *MockRMQClientMockRecorder) InvokeOneWay(ctx, addr, request, timeoutMillis interface{}) *gomock.Call
InvokeOneWay indicates an expected call of InvokeOneWay
func (*MockRMQClientMockRecorder) InvokeSync ¶
func (mr *MockRMQClientMockRecorder) InvokeSync(ctx, addr, request, timeoutMillis interface{}) *gomock.Call
InvokeSync indicates an expected call of InvokeSync
func (*MockRMQClientMockRecorder) ProcessSendResponse ¶
func (mr *MockRMQClientMockRecorder) ProcessSendResponse(brokerName, cmd, resp interface{}, msgs ...interface{}) *gomock.Call
ProcessSendResponse indicates an expected call of ProcessSendResponse
func (*MockRMQClientMockRecorder) PullMessage ¶
func (mr *MockRMQClientMockRecorder) PullMessage(ctx, brokerAddrs, request interface{}) *gomock.Call
PullMessage indicates an expected call of PullMessage
func (*MockRMQClientMockRecorder) PullMessageAsync ¶
func (mr *MockRMQClientMockRecorder) PullMessageAsync(ctx, brokerAddrs, request, f interface{}) *gomock.Call
PullMessageAsync indicates an expected call of PullMessageAsync
func (*MockRMQClientMockRecorder) RebalanceImmediately ¶
func (mr *MockRMQClientMockRecorder) RebalanceImmediately() *gomock.Call
RebalanceImmediately indicates an expected call of RebalanceImmediately
func (*MockRMQClientMockRecorder) RegisterConsumer ¶
func (mr *MockRMQClientMockRecorder) RegisterConsumer(group, consumer interface{}) *gomock.Call
RegisterConsumer indicates an expected call of RegisterConsumer
func (*MockRMQClientMockRecorder) RegisterProducer ¶
func (mr *MockRMQClientMockRecorder) RegisterProducer(group, producer interface{}) *gomock.Call
RegisterProducer indicates an expected call of RegisterProducer
func (*MockRMQClientMockRecorder) SendHeartbeatToAllBrokerWithLock ¶
func (mr *MockRMQClientMockRecorder) SendHeartbeatToAllBrokerWithLock() *gomock.Call
SendHeartbeatToAllBrokerWithLock indicates an expected call of SendHeartbeatToAllBrokerWithLock
func (*MockRMQClientMockRecorder) Shutdown ¶
func (mr *MockRMQClientMockRecorder) Shutdown() *gomock.Call
Shutdown indicates an expected call of Shutdown
func (*MockRMQClientMockRecorder) Start ¶
func (mr *MockRMQClientMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start
func (*MockRMQClientMockRecorder) UnregisterConsumer ¶
func (mr *MockRMQClientMockRecorder) UnregisterConsumer(group interface{}) *gomock.Call
UnregisterConsumer indicates an expected call of UnregisterConsumer
func (*MockRMQClientMockRecorder) UpdatePublishInfo ¶
func (mr *MockRMQClientMockRecorder) UpdatePublishInfo(topic, data interface{}) *gomock.Call
UpdatePublishInfo indicates an expected call of UpdatePublishInfo
func (*MockRMQClientMockRecorder) UpdateTopicRouteInfo ¶
func (mr *MockRMQClientMockRecorder) UpdateTopicRouteInfo() *gomock.Call
UpdateTopicRouteInfo indicates an expected call of UpdateTopicRouteInfo
type Namesrvs ¶
type Namesrvs interface { AddBroker(routeData *TopicRouteData) UpdateTopicRouteInfo(topic string) *TopicRouteData FetchPublishMessageQueues(topic string) ([]*primitive.MessageQueue, error) FindBrokerAddrByTopic(topic string) string FindBrokerAddrByName(brokerName string) string FindBrokerAddressInSubscribe(brokerName string, brokerId int64, onlyThisBroker bool) *FindBrokerResult FetchSubscribeMessageQueues(topic string) ([]*primitive.MessageQueue, error) // contains filtered or unexported methods }
type PullMessageRequest ¶
type PullMessageRequest struct { ConsumerGroup string `json:"consumerGroup"` Topic string `json:"topic"` QueueId int32 `json:"queueId"` QueueOffset int64 `json:"queueOffset"` MaxMsgNums int32 `json:"maxMsgNums"` SysFlag int32 `json:"sysFlag"` CommitOffset int64 `json:"commitOffset"` SuspendTimeoutMillis time.Duration `json:"suspendTimeoutMillis"` SubExpression string `json:"subscription"` SubVersion int64 `json:"subVersion"` ExpressionType string `json:"expressionType"` }
func (*PullMessageRequest) Encode ¶
func (request *PullMessageRequest) Encode() map[string]string
type PullMessageResponse ¶
type QueryConsumerOffsetRequest ¶
type QueryConsumerOffsetRequest struct { ConsumerGroup string `json:"consumerGroup"` Topic string `json:"topic"` QueueId int `json:"queueId"` }
func (*QueryConsumerOffsetRequest) Encode ¶
func (request *QueryConsumerOffsetRequest) Encode() map[string]string
type QueueData ¶
type QueueData struct { BrokerName string `json:"brokerName"` ReadQueueNums int `json:"readQueueNums"` WriteQueueNums int `json:"writeQueueNums"` Perm int `json:"perm"` TopicSynFlag int `json:"topicSynFlag"` }
QueueData QueueData
type RMQClient ¶
type RMQClient interface { Start() Shutdown() ClientID() string RegisterProducer(group string, producer InnerProducer) InvokeSync(ctx context.Context, addr string, request *remote.RemotingCommand, timeoutMillis time.Duration) (*remote.RemotingCommand, error) InvokeAsync(ctx context.Context, addr string, request *remote.RemotingCommand, timeoutMillis time.Duration, f func(*remote.RemotingCommand, error)) error InvokeOneWay(ctx context.Context, addr string, request *remote.RemotingCommand, timeoutMillis time.Duration) error CheckClientInBroker() SendHeartbeatToAllBrokerWithLock() UpdateTopicRouteInfo() ProcessSendResponse(brokerName string, cmd *remote.RemotingCommand, resp *primitive.SendResult, msgs ...*primitive.Message) error RegisterConsumer(group string, consumer InnerConsumer) error UnregisterConsumer(group string) PullMessage(ctx context.Context, brokerAddrs string, request *PullMessageRequest) (*primitive.PullResult, error) PullMessageAsync(ctx context.Context, brokerAddrs string, request *PullMessageRequest, f func(result *primitive.PullResult)) error RebalanceImmediately() UpdatePublishInfo(topic string, data *TopicRouteData) }
type SearchOffsetRequest ¶
type SearchOffsetRequest struct { Topic string `json:"topic"` QueueId int `json:"queueId"` Timestamp int64 `json:"timestamp"` }
func (*SearchOffsetRequest) Encode ¶
func (request *SearchOffsetRequest) Encode() map[string]string
type SendMessageRequest ¶
type SendMessageRequest struct { ProducerGroup string `json:"producerGroup"` Topic string `json:"topic"` QueueId int `json:"queueId"` SysFlag int `json:"sysFlag"` BornTimestamp int64 `json:"bornTimestamp"` Flag int32 `json:"flag"` Properties string `json:"properties"` ReconsumeTimes int `json:"reconsumeTimes"` UnitMode bool `json:"unitMode"` MaxReconsumeTimes int `json:"maxReconsumeTimes"` Batch bool }
func (*SendMessageRequest) Decode ¶
func (request *SendMessageRequest) Decode(properties map[string]string) error
func (*SendMessageRequest) Encode ¶
func (request *SendMessageRequest) Encode() map[string]string
type SendMessageResponse ¶
type SendMessageResponse struct { MsgId string QueueId int32 QueueOffset int64 TransactionId string MsgRegion string }
func (*SendMessageResponse) Decode ¶
func (response *SendMessageResponse) Decode(properties map[string]string)
type ServiceState ¶
type ServiceState int
const ( StateCreateJust ServiceState = iota StateStartFailed StateRunning StateShutdown )
type SubscriptionData ¶
type TopicPublishInfo ¶
type TopicPublishInfo struct { OrderTopic bool HaveTopicRouterInfo bool MqList []*primitive.MessageQueue RouteData *TopicRouteData TopicQueueIndex int32 }
key is topic, value is TopicPublishInfo
type TopicRouteData ¶
type TopicRouteData struct { OrderTopicConf string QueueDataList []*QueueData `json:"queueDatas"` BrokerDataList []*BrokerData `json:"brokerDatas"` }
TopicRouteData TopicRouteData
func (*TopicRouteData) String ¶
func (routeData *TopicRouteData) String() string
type TraceContext ¶
type TraceDispatcher ¶
type TraceDispatcher interface { GetTraceTopicName() string Start() Append(ctx TraceContext) bool Close() }
type TraceTransferBean ¶
type TraceTransferBean struct {
// contains filtered or unexported fields
}
type TransactionListener ¶
type TransactionListener interface { }
type UpdateConsumerOffsetRequest ¶
type UpdateConsumerOffsetRequest struct { ConsumerGroup string `json:"consumerGroup"` Topic string `json:"topic"` QueueId int `json:"queueId"` CommitOffset int64 `json:"commitOffset"` }
func (*UpdateConsumerOffsetRequest) Encode ¶
func (request *UpdateConsumerOffsetRequest) Encode() map[string]string