Documentation ¶
Overview ¶
Package internal is a generated GoMock package.
Package internal is a generated GoMock package.
Index ¶
- Constants
- Variables
- func GetRetryTopic(group string) string
- func NewHeartbeatData(clientID string) *heartbeatData
- func NewNamesrv(resolver primitive.NsResolver) (*namesrvs, error)
- func NewTraceDispatcher(traceCfg *primitive.TraceConfig) *traceDispatcher
- func ValidateGroup(group string)
- type BrokerData
- type CheckTransactionStateCallback
- type CheckTransactionStateRequestHeader
- type ClientOptions
- type ConsumeStatus
- type ConsumerRunningInfo
- type ConsumerSendMsgBackRequestHeader
- type CreateTopicRequestHeader
- type DeleteTopicRequestHeader
- type EndTransactionRequestHeader
- type FindBrokerResult
- type GetConsumerListRequestHeader
- type GetConsumerRunningInfoHeader
- type GetMaxOffsetRequestHeader
- type GetRouteInfoRequestHeader
- type InnerConsumer
- type InnerProducer
- type Keyset
- type MockInnerConsumer
- func (m *MockInnerConsumer) EXPECT() *MockInnerConsumerMockRecorder
- func (m *MockInnerConsumer) GetConsumerRunningInfo() *ConsumerRunningInfo
- 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) GetConsumerRunningInfo() *gomock.Call
- 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) AddrList() []string
- 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) UpdateNameServerAddress()
- func (m *MockNamesrvs) UpdateTopicRouteInfo(topic string) (*TopicRouteData, bool, error)
- type MockNamesrvsMockRecorder
- func (mr *MockNamesrvsMockRecorder) AddBroker(routeData interface{}) *gomock.Call
- func (mr *MockNamesrvsMockRecorder) AddrList() *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) UpdateNameServerAddress() *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 *PullMessageRequestHeader) (*primitive.PullResult, 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) UnregisterProducer(group string)
- func (m *MockRMQClient) UpdatePublishInfo(topic string, data *TopicRouteData, changed bool)
- 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, 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) 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) UnregisterProducer(group interface{}) *gomock.Call
- func (mr *MockRMQClientMockRecorder) UpdatePublishInfo(topic, data, changed interface{}) *gomock.Call
- func (mr *MockRMQClientMockRecorder) UpdateTopicRouteInfo() *gomock.Call
- type Namesrvs
- type ProcessQueueInfo
- type PullMessageRequestHeader
- type PullMessageResponse
- type QueryConsumerOffsetRequestHeader
- type QueryMessageRequestHeader
- type QueueData
- type RMQClient
- type SearchOffsetRequestHeader
- type SendMessageRequestHeader
- type SendMessageRequestV2Header
- type SendMessageResponse
- type ServiceState
- type SubscriptionData
- type TopicListRequestHeader
- type TopicPublishInfo
- type TopicRouteData
- type TraceBean
- type TraceContext
- type TraceDispatcher
- type TraceTransferBean
- type TraceType
- type TransactionListener
- type UpdateConsumerOffsetRequestHeader
- type ViewMessageRequestHeader
Constants ¶
const ( RetryGroupTopicPrefix = "%RETRY%" DefaultConsumerGroup = "DEFAULT_CONSUMER" ClientInnerProducerGroup = "CLIENT_INNER_PRODUCER" SystemTopicPrefix = "rmq_sys_" )
const ( PropNameServerAddr = "PROP_NAMESERVER_ADDR" PropThreadPoolCoreSize = "PROP_THREADPOOL_CORE_SIZE" PropConsumeOrderly = "PROP_CONSUMEORDERLY" PropConsumeType = "PROP_CONSUME_TYPE" PropClientVersion = "PROP_CLIENT_VERSION" PropConsumerStartTimestamp = "PROP_CONSUMER_START_TIMESTAMP" )
const ( ReqSendMessage = int16(10) ReqPullMessage = int16(11) ReqQueryMessage = int16(12) ReqQueryConsumerOffset = int16(14) ReqUpdateConsumerOffset = int16(15) ReqCreateTopic = int16(17) ReqSearchOffsetByTimestamp = int16(29) ReqGetMaxOffset = int16(30) ReqGetMinOffset = int16(31) ReqViewMessageByID = int16(33) ReqHeartBeat = int16(34) ReqConsumerSendMsgBack = int16(36) ReqENDTransaction = int16(37) ReqGetConsumerListByGroup = int16(38) ReqLockBatchMQ = int16(41) ReqUnlockBatchMQ = int16(42) ReqGetRouteInfoByTopic = int16(105) ReqGetBrokerClusterInfo = int16(106) ReqSendBatchMessage = int16(320) ReqCheckTransactionState = int16(39) ReqNotifyConsumerIdsChanged = int16(40) ReqGetAllTopicListFromNameServer = int16(206) ReqDeleteTopicInBroker = int16(215) ReqDeleteTopicInNameSrv = int16(216) 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 (
DEFAULT_NAMESRV_ADDR = "http://jmenv.tbsite.net:8080/rocketmq/nsaddr"
)
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 GetRetryTopic ¶
func NewHeartbeatData ¶
func NewHeartbeatData(clientID string) *heartbeatData
func NewNamesrv ¶
func NewNamesrv(resolver primitive.NsResolver) (*namesrvs, error)
NewNamesrv init Namesrv from namesrv addr string. addr primitive.NamesrvAddr
func NewTraceDispatcher ¶
func NewTraceDispatcher(traceCfg *primitive.TraceConfig) *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(properties 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 Resolver primitive.NsResolver }
func DefaultClientOptions ¶
func DefaultClientOptions() ClientOptions
func (*ClientOptions) ChangeInstanceNameToPID ¶
func (opt *ClientOptions) ChangeInstanceNameToPID()
func (*ClientOptions) String ¶
func (opt *ClientOptions) String() string
type ConsumeStatus ¶
type ConsumerRunningInfo ¶
type ConsumerRunningInfo struct { Properties map[string]string SubscriptionData map[*SubscriptionData]bool MQTable map[primitive.MessageQueue]ProcessQueueInfo StatusTable map[string]ConsumeStatus }
func NewConsumerRunningInfo ¶
func NewConsumerRunningInfo() *ConsumerRunningInfo
func (ConsumerRunningInfo) Encode ¶
func (info ConsumerRunningInfo) Encode() ([]byte, error)
type ConsumerSendMsgBackRequestHeader ¶
type ConsumerSendMsgBackRequestHeader struct { Group string Offset int64 DelayLevel int OriginMsgId string OriginTopic string UnitMode bool MaxReconsumeTimes int32 }
func (*ConsumerSendMsgBackRequestHeader) Encode ¶
func (request *ConsumerSendMsgBackRequestHeader) Encode() map[string]string
type CreateTopicRequestHeader ¶
type CreateTopicRequestHeader struct { Topic string DefaultTopic string ReadQueueNums int WriteQueueNums int Perm int TopicFilterType string TopicSysFlag int Order bool }
func (*CreateTopicRequestHeader) Encode ¶
func (request *CreateTopicRequestHeader) Encode() map[string]string
type DeleteTopicRequestHeader ¶
type DeleteTopicRequestHeader struct {
Topic string
}
func (*DeleteTopicRequestHeader) Encode ¶
func (request *DeleteTopicRequestHeader) Encode() map[string]string
type EndTransactionRequestHeader ¶
type EndTransactionRequestHeader struct { ProducerGroup string TranStateTableOffset int64 CommitLogOffset int64 CommitOrRollback int FromTransactionCheck bool MsgID string TransactionId string }
func (*EndTransactionRequestHeader) Encode ¶
func (request *EndTransactionRequestHeader) Encode() map[string]string
type FindBrokerResult ¶
type GetConsumerListRequestHeader ¶
type GetConsumerListRequestHeader struct {
ConsumerGroup string `json:"consumerGroup"`
}
func (*GetConsumerListRequestHeader) Encode ¶
func (request *GetConsumerListRequestHeader) Encode() map[string]string
type GetConsumerRunningInfoHeader ¶
type GetConsumerRunningInfoHeader struct {
// contains filtered or unexported fields
}
func (*GetConsumerRunningInfoHeader) Decode ¶
func (request *GetConsumerRunningInfoHeader) Decode(properties map[string]string)
func (*GetConsumerRunningInfoHeader) Encode ¶
func (request *GetConsumerRunningInfoHeader) Encode() map[string]string
type GetMaxOffsetRequestHeader ¶
func (*GetMaxOffsetRequestHeader) Encode ¶
func (request *GetMaxOffsetRequestHeader) Encode() map[string]string
type GetRouteInfoRequestHeader ¶
type GetRouteInfoRequestHeader struct {
Topic string
}
func (*GetRouteInfoRequestHeader) Encode ¶
func (request *GetRouteInfoRequestHeader) 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 GetConsumerRunningInfo() *ConsumerRunningInfo GetcType() string GetModel() string GetWhere() string }
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) GetConsumerRunningInfo ¶
func (m *MockInnerConsumer) GetConsumerRunningInfo() *ConsumerRunningInfo
GetConsumerRunningInfo mocks base method
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) GetConsumerRunningInfo ¶
func (mr *MockInnerConsumerMockRecorder) GetConsumerRunningInfo() *gomock.Call
GetConsumerRunningInfo indicates an expected call of GetConsumerRunningInfo
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) AddrList ¶
func (m *MockNamesrvs) AddrList() []string
AddrList 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) UpdateNameServerAddress ¶
func (m *MockNamesrvs) UpdateNameServerAddress()
UpdateNameServerAddress mocks base method
func (*MockNamesrvs) UpdateTopicRouteInfo ¶
func (m *MockNamesrvs) UpdateTopicRouteInfo(topic string) (*TopicRouteData, bool, error)
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) AddrList ¶
func (mr *MockNamesrvsMockRecorder) AddrList() *gomock.Call
AddrList indicates an expected call of AddrList
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) UpdateNameServerAddress ¶
func (mr *MockNamesrvsMockRecorder) UpdateNameServerAddress() *gomock.Call
UpdateNameServerAddress indicates an expected call of UpdateNameServerAddress
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, 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 *PullMessageRequestHeader) (*primitive.PullResult, error)
PullMessage 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) UnregisterProducer ¶
func (m *MockRMQClient) UnregisterProducer(group string)
UnregisterProducer mocks base method
func (*MockRMQClient) UpdatePublishInfo ¶
func (m *MockRMQClient) UpdatePublishInfo(topic string, data *TopicRouteData, changed bool)
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, 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) 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) UnregisterProducer ¶
func (mr *MockRMQClientMockRecorder) UnregisterProducer(group interface{}) *gomock.Call
UnregisterProducer indicates an expected call of UnregisterProducer
func (*MockRMQClientMockRecorder) UpdatePublishInfo ¶
func (mr *MockRMQClientMockRecorder) UpdatePublishInfo(topic, data, changed 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 { UpdateNameServerAddress() AddBroker(routeData *TopicRouteData) UpdateTopicRouteInfo(topic string) (routeData *TopicRouteData, changed bool, err error) 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) AddrList() []string // contains filtered or unexported methods }
type ProcessQueueInfo ¶
type ProcessQueueInfo struct { CommitOffset int64 `json:"commitOffset"` CachedMsgMinOffset int64 `json:"cachedMsgMinOffset"` CachedMsgMaxOffset int64 `json:"cachedMsgMaxOffset"` CachedMsgCount int `json:"cachedMsgCount"` CachedMsgSizeInMiB int64 `json:"cachedMsgSizeInMiB"` TransactionMsgMinOffset int64 `json:"transactionMsgMinOffset"` TransactionMsgMaxOffset int64 `json:"transactionMsgMaxOffset"` TransactionMsgCount int `json:"transactionMsgCount"` Locked bool `json:"locked"` TryUnlockTimes int64 `json:"tryUnlockTimes"` LastLockTimestamp int64 `json:"lastLockTimestamp"` Dropped bool `json:"dropped"` LastPullTimestamp int64 `json:"lastPullTimestamp"` LastConsumeTimestamp int64 `json:"lastConsumeTimestamp"` }
type PullMessageRequestHeader ¶
type PullMessageRequestHeader struct { ConsumerGroup string Topic string QueueId int32 QueueOffset int64 MaxMsgNums int32 SysFlag int32 CommitOffset int64 SuspendTimeoutMillis time.Duration SubExpression string SubVersion int64 ExpressionType string }
func (*PullMessageRequestHeader) Encode ¶
func (request *PullMessageRequestHeader) Encode() map[string]string
type PullMessageResponse ¶
type QueryConsumerOffsetRequestHeader ¶
func (*QueryConsumerOffsetRequestHeader) Encode ¶
func (request *QueryConsumerOffsetRequestHeader) Encode() map[string]string
type QueryMessageRequestHeader ¶
type QueryMessageRequestHeader struct { Topic string Key string MaxNum int BeginTimestamp int64 EndTimestamp int64 }
func (*QueryMessageRequestHeader) Decode ¶
func (request *QueryMessageRequestHeader) Decode(properties map[string]string) error
func (*QueryMessageRequestHeader) Encode ¶
func (request *QueryMessageRequestHeader) 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) UnregisterProducer(group string) InvokeSync(ctx context.Context, addr string, request *remote.RemotingCommand, timeoutMillis time.Duration) (*remote.RemotingCommand, error) InvokeAsync(ctx context.Context, addr string, request *remote.RemotingCommand, 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 *PullMessageRequestHeader) (*primitive.PullResult, error) RebalanceImmediately() UpdatePublishInfo(topic string, data *TopicRouteData, changed bool) }
func GetOrNewRocketMQClient ¶
func GetOrNewRocketMQClient(option ClientOptions, callbackCh chan interface{}) RMQClient
type SearchOffsetRequestHeader ¶
func (*SearchOffsetRequestHeader) Encode ¶
func (request *SearchOffsetRequestHeader) Encode() map[string]string
type SendMessageRequestHeader ¶
type SendMessageRequestHeader struct { ProducerGroup string Topic string QueueId int SysFlag int BornTimestamp int64 Flag int32 Properties string ReconsumeTimes int UnitMode bool MaxReconsumeTimes int Batch bool DefaultTopic string DefaultTopicQueueNums string }
func (*SendMessageRequestHeader) Encode ¶
func (request *SendMessageRequestHeader) Encode() map[string]string
type SendMessageRequestV2Header ¶
type SendMessageRequestV2Header struct {
*SendMessageRequestHeader
}
func (*SendMessageRequestV2Header) Encode ¶
func (request *SendMessageRequestV2Header) 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 int32
const ( StateCreateJust ServiceState = iota StateStartFailed StateRunning StateShutdown )
type SubscriptionData ¶
type TopicListRequestHeader ¶
type TopicListRequestHeader struct {
Topic string
}
func (*TopicListRequestHeader) Encode ¶
func (request *TopicListRequestHeader) Encode() map[string]string
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 UpdateConsumerOffsetRequestHeader ¶
type UpdateConsumerOffsetRequestHeader struct { ConsumerGroup string Topic string QueueId int CommitOffset int64 }
func (*UpdateConsumerOffsetRequestHeader) Encode ¶
func (request *UpdateConsumerOffsetRequestHeader) Encode() map[string]string
type ViewMessageRequestHeader ¶
type ViewMessageRequestHeader struct {
Offset int64
}
func (*ViewMessageRequestHeader) Encode ¶
func (request *ViewMessageRequestHeader) Encode() map[string]string