body

package
v0.0.0-...-d86056c Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2018 License: Apache-2.0 Imports: 7 Imported by: 3

Documentation

Overview

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BrokerStatsData

type BrokerStatsData struct {
	StatsMinute *BrokerStatsItem `json:"statsMinute"`
	StatsHour   *BrokerStatsItem `json:"statsHour"`
	StatsDay    *BrokerStatsItem `json:"statsDay"`
}

BrokerStatsData Broker统计数据 Author rongzhihong Since 2017/9/19

func NewBrokerStatsData

func NewBrokerStatsData() *BrokerStatsData

BrokerStatsData Broker统计数据 Author rongzhihong Since 2017/9/19

type BrokerStatsItem

type BrokerStatsItem struct {
	Sum   int64   `json:"sum"`
	Tps   float64 `json:"tps"`
	Avgpt float64 `json:"avgpt"`
}

BrokerStatsItem Broker统计最小数据单元 Author rongzhihong Since 2017/9/19

type ClusterBrokerWapper

type ClusterBrokerWapper struct {
	ClusterName string `json:"clusterName"`
	BrokerName  string `json:"brokerName"`
	BrokerAddr  string `json:"brokerAddr"`
	BrokerId    int    `json:"brokerId"`
}

ClusterBrokerInfo cluster与broker包装器 Author: tianyuliang Since: 2017/11/15

func NewClusterBrokerWapper

func NewClusterBrokerWapper(clusterName, brokerName, brokerAddr string, brokerId int) *ClusterBrokerWapper

NewClusterBrokerWapper 初始化 Author: tianyuliang Since: 2017/11/15

func (*ClusterBrokerWapper) String

func (wapper *ClusterBrokerWapper) String() string

String 格式化ClusterBrokerWapper数据 Author: tianyuliang Since: 2017/11/15

type ClusterInfo

type ClusterInfo struct {
	BrokerAddrTable  map[string]*base.BrokerData `json:"brokerAddrTable"`  // brokerName[BrokerData]
	ClusterAddrTable map[string]set.Set          `json:"clusterAddrTable"` // clusterName[set<brokerName>]
}

ClusterInfo 协议中传输对象,内容为集群信息 Author: tianyuliang Since: 2017/9/4

func NewClusterInfo

func NewClusterInfo() *ClusterInfo

NewClusterInfo 初始化 Author: tianyuliang Since: 2017/9/4

func (*ClusterInfo) RetrieveAllAddrByCluster

func (ci *ClusterInfo) RetrieveAllAddrByCluster(clusterName string) []string

RetrieveAllAddrByCluster 处理所有brokerAddr地址 Author: tianyuliang Since: 2017/9/4

func (*ClusterInfo) RetrieveAllClusterNames

func (ci *ClusterInfo) RetrieveAllClusterNames() []string

RetrieveAllClusterNames 处理所有brokerName名称 Author: tianyuliang Since: 2017/9/4

type ClusterPlusInfo

type ClusterPlusInfo struct {
	BrokerAddrTable  map[string]*base.BrokerData `json:"brokerAddrTable"`  // brokerName[BrokerData]
	ClusterAddrTable map[string][]string         `json:"clusterAddrTable"` // clusterName[set<brokerName>]
}

ClusterPlusInfo 协议中传输对象,内容为集群信息

注意: set.Set类型在反序列化过程无法解析,因此额外设置ClusterPlusInfo类型来解析

Author: tianyuliang Since: 2017/9/4

func NewClusterPlusInfo

func NewClusterPlusInfo() *ClusterPlusInfo

NewClusterPlusInfo 初始化 Author: tianyuliang Since: 2017/9/4

func (*ClusterPlusInfo) ClusterInfo

func (plus *ClusterPlusInfo) ClusterInfo() *ClusterInfo

ClusterInfo 转化为 ClusterInfo 类型 Author: tianyuliang Since: 2017/11/8

func (*ClusterPlusInfo) ResolveClusterBrokerWapper

func (cpi *ClusterPlusInfo) ResolveClusterBrokerWapper() ([]string, []*ClusterBrokerWapper)

RetrieveAllAddrByCluster 处理所有brokerAddr地址 Author: tianyuliang Since: 2017/9/4

func (*ClusterPlusInfo) RetrieveAllAddrByCluster

func (cpi *ClusterPlusInfo) RetrieveAllAddrByCluster(clusterName string) ([]string, []*ClusterBrokerWapper)

RetrieveAllAddrByCluster 处理所有brokerAddr地址 Author: tianyuliang Since: 2017/9/4

func (*ClusterPlusInfo) RetrieveAllClusterNames

func (cpi *ClusterPlusInfo) RetrieveAllClusterNames() []string

RetrieveAllClusterNames 处理所有brokerName名称 Author: tianyuliang Since: 2017/9/4

func (*ClusterPlusInfo) String

func (plus *ClusterPlusInfo) String() string

String 格式化 Author: tianyuliang Since: 2017/11/15

type Connection

type Connection struct {
	ClientId   string `json:"clientId"`   // 客户端实例
	ClientAddr string `json:"clientAddr"` // 客户端地址
	Language   string `json:"language"`   // 开发语言
	Version    int32  `json:"version"`    // mq发行版本号
}

Connection 连接信息 Author rongzhihong Since 2017/9/19

func NewConnection

func NewConnection(clientId, clientAddr, language string, version int32) *Connection

NewConnection 初始化Connection Author: tianyuliang Since: 2017/11/16

func (*Connection) String

func (conn *Connection) String() string

String 格式化Connection结构体的数据 Author: tianyuliang Since: 2017/11/16

type ConsumerConnection

type ConsumerConnection struct {
	ConnectionSet     set.Set                    `json:"connectionSet"`     // type: Connection
	SubscriptionTable *concurrent.ConcurrentMap  `json:"subscriptionTable"` // topic<*SubscriptionDataPlus>
	ConsumeType       heartbeat.ConsumeType      `json:"consumeType"`
	MessageModel      heartbeat.MessageModel     `json:"messageModel"`
	ConsumeFromWhere  heartbeat.ConsumeFromWhere `json:"consumeFromWhere"`
}

ConsumerConnection 消费者连接信息 Author rongzhihong Since 2017/9/19

func NewConsumerConnection

func NewConsumerConnection() *ConsumerConnection

NewConsumerConnection 初始化 Author rongzhihong Since 2017/9/19

func (*ConsumerConnection) ComputeMinVersion

func (consumerConn *ConsumerConnection) ComputeMinVersion() int32

ComputeMinVersion 计算最小版本号 Author rongzhihong Since 2017/9/19

type ConsumerConnectionPlus

type ConsumerConnectionPlus struct {
	ConnectionSet     []*Connection                              `json:"connectionSet"`     // type: Connection
	SubscriptionTable map[string]*heartbeat.SubscriptionDataPlus `json:"subscriptionTable"` // topic<*SubscriptionDataPlus>
	ConsumeType       heartbeat.ConsumeType                      `json:"consumeType"`
	MessageModel      heartbeat.MessageModel                     `json:"messageModel"`
	ConsumeFromWhere  heartbeat.ConsumeFromWhere                 `json:"consumeFromWhere"`
}

ConsumerConnectionPlus 消费者连接信息(处理set集合无法反序列化问题) Author rongzhihong Since 2017/9/19

func NewConsumerConnectionPlus

func NewConsumerConnectionPlus() *ConsumerConnectionPlus

NewConsumerConnection 初始化 Author rongzhihong Since 2017/9/19

func (*ConsumerConnectionPlus) ToConsumerConnection

func (plus *ConsumerConnectionPlus) ToConsumerConnection() *ConsumerConnection

ToConsumerConnection 转化为ConsumerConnection Author: tianyuliang Since: 2017/11/13

type GetConsumerStatus

type GetConsumerStatus struct {
	MessageQueueTable map[*message.MessageQueue]int64            `json:"messageQueueTable"`
	ConsumerTable     map[string]map[*message.MessageQueue]int64 `json:"consumerTable"`
}

GetConsumerStatus 获得消费状态的body Author rongzhihong Since 2017/9/19

func NewGetConsumerStatus

func NewGetConsumerStatus() *GetConsumerStatus

type GetConsumersByGroupResponse

type GetConsumersByGroupResponse struct {
	ConsumerIdList []string `json:"consumerIdList"`
}

GetConsumersByGroupResponse: 获取消费者列表 Author: yintongqiang Since: 2017/8/23

func (*GetConsumersByGroupResponse) CheckFields

func (header *GetConsumersByGroupResponse) CheckFields() error

type GroupList

type GroupList struct {
	GroupList set.Set `json:"groupList"`
}

GroupList 分组集合 Author rongzhihong Since 2017/9/19

func NewGroupList

func NewGroupList() *GroupList

NewGroupList 初始化 Author: tianyuliang Since: 2017/11/1

func (*GroupList) String

func (gl *GroupList) String() string

String 打印结构信息 Author: tianyuliang Since: 2017/11/1

type LockBatchRequest

type LockBatchRequest struct {
	ConsumerGroup string  `json:"consumerGroup"`
	ClientId      string  `json:"clientId"`
	MQSet         set.Set `json:"mq_set"`
}

LockBatchRequest 锁队列请求头 Author rongzhihong Since 2017/9/19

func NewLockBatchRequest

func NewLockBatchRequest() *LockBatchRequest

type LockBatchResponse

type LockBatchResponse struct {
	LockOKMQSet set.Set `json:"lockOKMQSet"`
}

LockBatchResponse 锁队列响应头 Author rongzhihong Since 2017/9/19

func NewLockBatchResponse

func NewLockBatchResponse() *LockBatchResponse

type ProducerConnection

type ProducerConnection struct {
	ConnectionSet set.Set `json:"connectionSet"`
}

ProducerConnection 生产者连接 Author rongzhihong Since 2017/9/19

func NewProducerConnection

func NewProducerConnection() *ProducerConnection

NewProducerConnection 初始化 Author rongzhihong Since 2017/9/19

type QueryConsumeTimeSpan

type QueryConsumeTimeSpan struct {
	ConsumeTimeSpanSet set.Set `json:"consumeTimeSpanSet"`
}

QueryConsumeTimeSpan 查询消费时间跨度 Author rongzhihong Since 2017/9/19

func NewQueryConsumeTimeSpan

func NewQueryConsumeTimeSpan() *QueryConsumeTimeSpan

type QueryCorrectionOffset

type QueryCorrectionOffset struct {
	CorrectionOffsets map[int]int64 `json:"correctionOffsets"`
}

QueryCorrectionOffset 查找被修正 offset (转发组件)的返回内容 Author rongzhihong Since 2017/9/19

func NewQueryCorrectionOffset

func NewQueryCorrectionOffset() *QueryCorrectionOffset

type QueueTimeSpan

type QueueTimeSpan struct {
	MessageQueue     *message.MessageQueue `json:"messageQueue"`
	MinTimeStamp     int64                 `json:"minTimeStamp"`
	MaxTimeStamp     int64                 `json:"maxTimeStamp"`
	ConsumeTimeStamp int64                 `json:"consumeTimeStamp"`
}

QueueTimeSpan 查询时间宽度 Author rongzhihong Since 2017/9/19

func (*QueueTimeSpan) GetConsumeTimeStampStr

func (timespan *QueueTimeSpan) GetConsumeTimeStampStr() string

GetConsumeTimeStampStr 消费时间 Author rongzhihong Since 2017/9/19

func (*QueueTimeSpan) GetMaxTimeStampStr

func (timespan *QueueTimeSpan) GetMaxTimeStampStr() string

GetMaxTimeStampStr 终止时间 Author rongzhihong Since 2017/9/19

func (*QueueTimeSpan) GetMinTimeStampStr

func (timespan *QueueTimeSpan) GetMinTimeStampStr() string

GetMinTimeStampStr 起始时间 Author rongzhihong Since 2017/9/19

type RegisterBrokerRequest

type RegisterBrokerRequest struct {
	TpConfigSerializeWrapper *base.TopicConfigSerializeWrapper `json:"topicConfigSerializeWrapper"`
	FilterServerList         []string                          `json:"filterServerList"`
}

RegisterBrokerRequest 注册Broker-请求/响应体 Author gaoyanlei Since 2017/8/22

func NewRegisterBrokerRequest

func NewRegisterBrokerRequest(topicConfigWrapper *base.TopicConfigSerializeWrapper, filterServerList []string) *RegisterBrokerRequest

type ResetOffset

type ResetOffset struct {
	OffsetTable map[*message.MessageQueue]int64 `json:"offsetTable"`
}

ResetOffset 重置偏移量的body Author rongzhihong Since 2017/9/18

func NewResetOffset

func NewResetOffset() *ResetOffset

type TopicBrokerClusterWapper

type TopicBrokerClusterWapper struct {
	ClusterName          string                   `json:"clusterName"`
	TopicName            string                   `json:"topic"`
	TpUpdateConfigWapper *TopicUpdateConfigWapper `json:"topicConfig"`
}

func NewTopicBrokerClusterWapper

func NewTopicBrokerClusterWapper(clusterName, topicName string, queueData *base.QueueData) *TopicBrokerClusterWapper

type TopicList

type TopicList struct {
	TopicList  set.Set `json:"topicList"`  // topic列表
	BrokerAddr string  `json:"brokerAddr"` // broker地址
}

TopicList topic列表 Author: tianyuliang Since: 2017/9/16

func NewTopicList

func NewTopicList() *TopicList

NewTopicList 初始化 Author: tianyuliang Since: 2017/9/16

type TopicPlusList

type TopicPlusList struct {
	TopicList        []string                     `json:"topicList"`        // topic列表
	BrokerAddr       string                       `json:"brokerAddr"`       // broker地址
	TopicQueueTable  map[string][]*base.QueueData `json:"topicQueueTable"`  // 额外增加字段 topic<*route.QueueData>
	ClusterAddrTable map[string][]string          `json:"clusterAddrTable"` // clusterName[set<brokerName>]
}

TopicPlusList 拓展Topic列表 Author: tianyuliang Since: 2017/9/16

func NewTopicPlusList

func NewTopicPlusList() *TopicPlusList

NewTopicPlusList 初始化 Author: tianyuliang Since: 2017/9/16

type TopicUpdateConfigWapper

type TopicUpdateConfigWapper struct {
	TopicName      string `json:"topicName"`
	ClusterName    string `json:"clusterName"`
	Order          bool   `json:"order"`
	WriteQueueNums int    `json:"writeQueueNums"`
	ReadQueueNums  int    `json:"readQueueNums"`
	BrokerAddr     string `json:"brokerAddr"`
	BrokerId       int    `json:"brokerId"`
	BrokerName     string `json:"brokerName"`
	Unit           bool   `json:"unit"`
	Perm           int    `json:"perm"`
	TopicSynFlag   int    `json:"topicSynFlag"`
}

func NewTopicUpdateConfigWapper

func NewTopicUpdateConfigWapper(clusterName, topicName string, queueData *base.QueueData) *TopicUpdateConfigWapper

type UnlockBatchRequest

type UnlockBatchRequest struct {
	ConsumerGroup string  `json:"consumerGroup"`
	ClientId      string  `json:"clientId"`
	MQSet         set.Set `json:"mqSet"`
}

UnlockBatchRequest 解锁队列响应头 Author rongzhihong Since 2017/9/19

func NewUnlockBatchRequest

func NewUnlockBatchRequest() *UnlockBatchRequest

Jump to

Keyboard shortcuts

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