models

package
v0.0.0-...-ba2213e Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

SystemTopics 默认系统Topic Author: tianyuliang Since: 2017/11/13

Functions

func AccurateDecimal

func AccurateDecimal(value decimal.Decimal, precision int) float64

AccurateDecimal 校验精度,小数点后保留指定位数

示例: AccurateDecimal(1234.56789, 2) // 1234.56

Author: tianyuliang Since: 2017/8/15

func IsDLQTopic

func IsDLQTopic(topic string) bool

IsDLQTopic 是否为死信队列的Topic Author: tianyuliang Since: 2017/11/6

func IsNormalTopic

func IsNormalTopic(topic string) bool

IsNormalTopic 是否正常的Topic Author: tianyuliang Since: 2017/11/6

func IsRetryTopic

func IsRetryTopic(topic string) bool

IsRetryTopic 是否为重试队列的Topic Author: tianyuliang Since: 2017/11/6

func IsSystemTopic

func IsSystemTopic(topic string) bool

IsSystemTopic 是否为系统Topic Author: tianyuliang Since: 2017/11/6

Types

type BlotMessage

type BlotMessage struct {
	Base     *MessageExtVo         `json:"base"`     // 消息基础属性
	Track    []*track.MessageTrack `json:"track"`    // 消息消费结果
	BodyPath string                `json:"bodyPath"` // 消息body内容存储在web服务器的路径
}

BlotMessage 消息消费结果查询、消费轨迹 Author: tianyuliang Since: 2017/11/7

func NewBlotMessage

func NewBlotMessage(base *MessageExtVo, messageTrack []*track.MessageTrack, msgBodyPath string) *BlotMessage

NewBlotMessage 初始化 Author: tianyuliang Since: 2017/11/13

type BrokerRuntimeInfo

type BrokerRuntimeInfo struct {
	BrokerVersionDesc           string  `json:"brokerVersionDesc"`
	BrokerVersion               string  `json:"brokerVersion"`
	MsgPutTotalYesterdayMorning string  `json:"msgPutTotalYesterdayMorning"`
	MsgPutTotalTodayMorning     string  `json:"msgPutTotalTodayMorning"`
	MsgPutTotalTodayNow         string  `json:"msgPutTotalTodayNow"`
	MsgGetTotalYesterdayMorning string  `json:"msgGetTotalYesterdayMorning"`
	MsgGetTotalTodayNow         string  `json:"msgGetTotalTodayNow"`
	SendThreadPoolQueueSize     string  `json:"sendThreadPoolQueueSize"`
	SendThreadPoolQueueCapacity string  `json:"sendThreadPoolQueueCapacity"`
	MsgGetTotalTodayMorning     string  `json:"msgGetTotalTodayMorning"`
	InTps                       float64 `json:"inTps"`
	OutTps                      float64 `json:"outTps"`
}

BrokerRuntimeInfo broker运行状态 Author: tianyuliang Since: 2017/11/7

func (*BrokerRuntimeInfo) ToCluterGeneral

func (self *BrokerRuntimeInfo) ToCluterGeneral(brokerAddr, brokerName string, brokerId int) *ClusterGeneral

ToCluterGeneral 转化CluterGeneral Author: tianyuliang Since: 2017/11/13

type ClusterGeneral

type ClusterGeneral struct {
	InTotalToday  int64     `json:"inTotalToday"`  // 今天发送的消息数
	OutTotalYest  int64     `json:"outTotalYest"`  // 昨天消费的消息数
	BrokerRole    string    `json:"brokerRole"`    // broker角色 master/slave
	BrokerAddr    string    `json:"brokerAddr"`    // broker地址
	BrokerId      int       `json:"brokerId"`      // brokerId(0:表示Master, 非0表示Slave)
	BrokerName    string    `json:"brokerName"`    // broker名称(一组Master/Slave共用一个broker名称)
	InTPS         JSONFloat `json:"inTPS"`         // 发送消息TPS(当前broker节点)
	OutTPS        JSONFloat `json:"outTPS"`        // 消费消息TPS(当前broker节点)
	InTotalYest   int64     `json:"inTotalYest"`   // 昨天发送的消息数
	OutTotalToday int64     `json:"outTotalToday"` // 今天消费的消息数
	Version       string    `json:"version"`       // 当前broker节点版本号
	VersionDesc   string    `json:"versionDesc"`   // 当前broker节点版本描述
}

ClusterGeneral Cluster详情 Author: tianyuliang Since: 2017/11/7

type ClusterGeneralVo

type ClusterGeneralVo struct {
	BrokerGeneral []*ClusterGeneral `json:"brokerGeneral"` // broker节点
	NamesrvAddrs  []string          `json:"namesrvAddrs"`  // namesrv节点
	ClusterName   string            `json:"clusterName"`   // 集群名称
}

ClusterGeneralVo Cluster集群列表 Author: tianyuliang Since: 2017/11/7

func NewClusterGeneralVo

func NewClusterGeneralVo() *ClusterGeneralVo

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

type ClusterGeneralVoWapper

type ClusterGeneralVoWapper struct {
	ClusterGeneralVo []*ClusterGeneralVo `json:"clusters"`
}

ClusterGeneralVoWapper Cluster集群列表包装器 Author: tianyuliang Since: 2017/11/13

func NewClusterGeneralVoWapper

func NewClusterGeneralVoWapper() *ClusterGeneralVoWapper

NewClusterGeneralVoWapper 初始化ClusterGeneralVoWapper Author: tianyuliang Since: 2017/11/15

type ClusterList

type ClusterList struct {
	ClusterNames []string `json:"clusterNames"`
}

ClusterList Cluster列表 Author: tianyuliang Since: 2017/11/7

type ConnectionDetail

type ConnectionDetail struct {
	ConsumerOnLine *ConsumerOnLine `json:"consumer"`
	ProducerOnLine *ProducerOnLine `json:"producer"`
}

ConnectionDetail 在线进程详情 Author: tianyuliang Since: 2017/11/7

type ConnectionOnline

type ConnectionOnline struct {
	ClusterName      string   `json:"clusterName"`      // 集群名称
	Topic            string   `json:"topic"`            // 集群名称
	ProduceNums      int      `json:"produceNums"`      // 生产进程总数
	ConsumerGroupIds []string `json:"consumerGroupIds"` // 消费组ID
	ConsumeNums      int      `json:"consumeNums"`      // 消费进程总数
}

ConnectionOnline 在线进程列表 Author: tianyuliang Since: 2017/11/7

func NewConnectionOnline

func NewConnectionOnline(clusterName, topic string, consumerGroupIds []string, consumeNums, produceNums int) *ConnectionOnline

NewConnectionOnline 初始化ConnectionOnline Author: tianyuliang Since: 2017/11/10

type ConnectionOnlines

type ConnectionOnlines []*ConnectionOnline

func (ConnectionOnlines) Len

func (self ConnectionOnlines) Len() int

func (ConnectionOnlines) Less

func (self ConnectionOnlines) Less(i, j int) bool

func (ConnectionOnlines) Swap

func (self ConnectionOnlines) Swap(i, j int)

type ConnectionVo

type ConnectionVo struct {
	IP  string `json:"ip"`  // 消费进程所在的服务器IP
	PID int64  `json:"pid"` // 进程pid
}

ConnectionVo 消费进程列表 Author: tianyuliang Since: 2017/11/7

type ConsumeTrackVo

type ConsumeTrackVo struct {
	Connection      []*ConnectionVo `json:"connection"`
	ConsumerGroupId string          `json:"consumerGroupId"` // 消费组ID
	Code            int             `json:"code"`            // 消息消费结果 0:消费成功, 1:失败
	TrackType       int             `json:"trackType"`       // 消息轨迹类型
}

ConsumeExtVo 消费轨迹-消费节点 Author: tianyuliang Since: 2017/11/7

type ConsumerConnectionVo

type ConsumerConnectionVo struct {
	ConsumerGroupId     string                 `json:"consumerGroupId"`     // 消费者组ID
	ClientId            string                 `json:"clientId"`            // 消费者客户端实例
	ClientAddr          string                 `json:"clientAddr"`          // 消费者客户端地址
	Language            string                 `json:"language"`            // 客户端语言
	VersionDesc         string                 `json:"versionDesc"`         // mq版本号描述
	Version             int                    `json:"version"`             // mq版本号
	ConsumeTps          float64                `json:"consumeTps"`          // 实时消费Tps
	ConsumeFromWhere    string                 `json:"consumeFromWhere"`    // 从哪里开始消费
	ConsumeType         string                 `json:"consumeType"`         // 消费类型(主动、被动)
	DiffTotal           int64                  `json:"diffTotal"`           // 消息堆积总数
	MessageModel        string                 `json:"messageModel"`        // 消息模式(集群、广播)
	SubscribeTopicTable []*SubscribeTopicTable `json:"subscribeTopicTable"` // 消费者订阅Topic列表
}

ConsumerConnection 消费者进程 Author: tianyuliang Since: 2017/7/14

func ToConsumerConnectionVo

func ToConsumerConnectionVo(c *body.Connection, cc *body.ConsumerConnectionPlus, progress *ConsumerProgress, consumerGroupId string) *ConsumerConnectionVo

ToConsumerConnectionVo 转化为消费进程对象 Author: tianyuliang Since: 2017/7/14

type ConsumerGroup

type ConsumerGroup struct {
	BrokerOffset   int64 `json:"brokerOffset"`
	ConsumerOffset int64 `json:"consumerOffset"`
	Diff           int64 `json:"diff"`
	*message.MessageQueue
}

ConsumerGroup 消费组 Author: tianyuliang Since: 2017/11/7

func NewConsumerGroup

func NewConsumerGroup() *ConsumerGroup

NewConsumerGroup 初始化ConsumerGroup Author: tianyuliang Since: 2017/11/10

func ToConsumerGroup

func ToConsumerGroup(mq *message.MessageQueue, wapper *admin.OffsetWrapper) (consumerGroup *ConsumerGroup, diff int64)

ToConsumerGroup 转化为ConsumerGroup Author: tianyuliang Since: 2017/11/10

type ConsumerGroupVo

type ConsumerGroupVo struct {
	ClusterName     string    `json:"clusterName"`     // 集群名称
	Topic           string    `json:"topic"`           // 集群名称
	TopicType       TopicType `json:"topicType"`       // topic类型
	ConsumerGroupId string    `json:"consumerGroupId"` // 消费组ID
}

ConsumerGroupList 消费组列表 Author: tianyuliang Since: 2017/11/7

func NewConsumerGroupVo

func NewConsumerGroupVo(clusterName, topic, consumerGroupId string) *ConsumerGroupVo

NewConsumerGroupVo 初始化ConsumerGroupVo Author: tianyuliang Since: 2017/11/10

type ConsumerOnLine

type ConsumerOnLine struct {
	ClusterName string                  `json:"clusterName"` // 集群名称
	Topic       string                  `json:"topic"`       // topic名称
	Describe    string                  `json:"describe"`    // 查询结果的描述
	Connection  []*ConsumerConnectionVo `json:"groups"`      // 在线消费进程
}

ConsumerOnLine 在线消费进程 Author: tianyuliang Since: 2017/11/7

type ConsumerProgress

type ConsumerProgress struct {
	ConsumeGroupId string           `json:"consumeGroupId"`
	Tps            float64          `json:"consumeTps"` // 保留2位小数
	DiffTotal      int64            `json:"diffTotal"`
	Data           []*ConsumerGroup `json:"data"`
	Total          int64            `json:"total"`
}

ConsumerProgress 消费进度 Author: tianyuliang Since: 2017/11/7

func NewConsumerProgress

func NewConsumerProgress(data []*ConsumerGroup, total, diffTotal int64, consumeGroupId string, tps float64) *ConsumerProgress

NewConsumerProgress 初始化 Author: tianyuliang Since: 2017/11/10

type CreateTopic

type CreateTopic struct {
	ClusterName string `json:"clusterName" valid:"required"` // 集群名称
	Topic       string `json:"topic" valid:"required"`       // topic名称
}

CreateTopic 创建Topic Author: tianyuliang Since: 2017/11/7

func (*CreateTopic) ToTopicConfig

func (t *CreateTopic) ToTopicConfig() *stgcommon.TopicConfig

ToTopicConfig 转化为stgcommon.TopicConfig Author: tianyuliang Since: 2017/11/9

func (*CreateTopic) Validate

func (createTopic *CreateTopic) Validate() error

Validate 参数验证

type DeleteTopic

type DeleteTopic struct {
	ClusterName string `json:"clusterName"` // 集群名称
	Topic       string `json:"topic"`       // topic名称
}

DeleteTopic 删除Topic Author: tianyuliang Since: 2017/11/7

func (*DeleteTopic) Validate

func (deleteTopic *DeleteTopic) Validate() error

Validate 参数验证

type GeneralNode

type GeneralNode struct {
	Producers int64 `json:"producers"` // 在线producer进程的个数
	Consumers int64 `json:"consumers"` // 在线conumer进程的个数
	Clusters  int64 `json:"clusters"`  // cluster节点个数
	Brokers   int64 `json:"brokers"`   // broker节点个数
	Namesrvs  int64 `json:"namesrvs"`  // namesrv节点个数
	Topics    int64 `json:"topics"`    // topic个数
}

GeneralNode 统计各模块个数 Author: tianyuliang Since: 2017/11/7

func NewGeneralNode

func NewGeneralNode(producerCount, consumerCount, clusterCount, brokerCount, namesrvCount, topicCount int64) *GeneralNode

NewGeneralNode 初始化GeneralNode Author: tianyuliang Since: 2017/11/13

type GeneralStats

type GeneralStats struct {
	OutTotalTodayAll int64 `json:"outTotalTodayAll"` // 今天消费消息总数(所有节点)
	OutTotalYestAll  int64 `json:"outTotalYestAll"`  // 昨天消费消息总数(所有节点)
	InTotalYestAll   int64 `json:"inTotalYestAll"`   // 昨天发送消息总数(所有节点)
	InTotalTodayAll  int64 `json:"inTotalTodayAll"`  // 今天发送消息总数(所有节点)
}

GeneralVo 统计broker发送、消费总条数 Author: tianyuliang Since: 2017/11/7

func NewGeneralStats

func NewGeneralStats(outTotalToday, outTotalYest, inTotalYest, inTotalToday int64) *GeneralStats

NewGeneralStats 初始化GeneralStats Author: tianyuliang Since: 2017/11/13

type GeneralVo

type GeneralVo struct {
	GeneralStats *GeneralStats `json:"stats"`   // broker发送消息、消费消息总数
	GeneralNode  *GeneralNode  `json:"general"` // 各种统计数字
}

GeneralVo 首页概览 Author: tianyuliang Since: 2017/11/7

type JSONFloat

type JSONFloat float64

JSONFloat 统计类 Author: tianyuliang Since: 2017/7/19

func (JSONFloat) AccurateJSONFloat

func (p JSONFloat) AccurateJSONFloat() float64

AccurateJSONFloat 校验精度,小数点后保留4位

示例: AccurateJSONFloat(1234.56789) // 1234.5678

Author: tianyuliang Since: 2017/8/15

func (JSONFloat) MarshalJSON

func (p JSONFloat) MarshalJSON() ([]byte, error)

MarshalJSON 用于结构体序列化为float64类型值(小数点后面保留2位数字, 同时将其转化为字符串) Author: tianyuliang Since: 2017/7/19

type MessageBodyVo

type MessageBodyVo struct {
	MsgBody string `json:"msgBody"` // 消息内容
	MsgId   string `json:"msgId"`   // 消息ID
}

MessageBodyVo 单独查询Body消息内容 Author: tianyuliang Since: 2017/11/7

func NewMessageBodyVo

func NewMessageBodyVo(msgId, msgBody string) *MessageBodyVo

NewMessageBodyVo 初始化MessageBodyVo Author: tianyuliang Since: 2017/11/9

type MessageExtVo

type MessageExtVo struct {
	Topic                     string            `json:"topic"`                     // 消息主题
	Flag                      int32             `json:"flag"`                      // 消息标志,系统不做干预,完全由应用决定如何使用
	Properties                map[string]string `json:"properties"`                // 消息属性,都是系统属性,禁止应用设置
	Body                      string            `json:"body"`                      // 消息体
	QueueId                   int32             `json:"queueId"`                   // 队列ID<PUT>
	StoreSize                 int32             `json:"storeSize"`                 // 存储记录大小
	QueueOffset               int64             `json:"queueOffset"`               // 队列偏移量
	SysFlag                   int32             `json:"sysFlag"`                   // 消息标志位 <PUT>
	BornTimestamp             string            `json:"bornTimestamp"`             // 消息在客户端创建时间戳 <PUT>
	BornHost                  string            `json:"bornHost"`                  // 消息来自哪里 <PUT>
	StoreTimestamp            string            `json:"storeTimestamp"`            // 消息在服务器存储时间戳
	StoreHost                 string            `json:"storeHost"`                 // 消息存储在哪个服务器 <PUT>
	MsgId                     string            `json:"msgId"`                     // 消息ID
	CommitLogOffset           int64             `json:"commitLogOffset"`           // 消息对应的Commit Log Offset
	BodyCRC                   int32             `json:"bodyCRC"`                   // 消息体CRC
	ReconsumeTimes            int32             `json:"reconsumeTimes"`            // 当前消息被某个订阅组重新消费了几次(订阅组之间独立计数)
	PreparedTransactionOffset int64             `json:"preparedTransactionOffset"` // 事务预处理偏移量
}

func ToMessageExtVo

func ToMessageExtVo(msg *message.MessageExt) *MessageExtVo

ToMessageExtVo 转化为MessageExtVo Author: tianyuliang Since: 2017/11/13

type MessageTrackBase

type MessageTrackBase struct {
	MessageTrack []*MessageTrackExt `json:"track"`        // 消息消费轨迹
	CurrentMsgId string             `json:"currentMsgId"` // 当前消息ID
	OriginMsgId  string             `json:"originMsgId"`  // 源消息ID
}

MessageTrackVo 消息轨迹节点 Author: tianyuliang Since: 2017/11/7

type MessageTrackExt

type MessageTrackExt struct {
	ConsumeExt []*ConsumeTrackVo `json:"consumeExt"` // 消费节点
	ProduceExt *ProduceTrackVo   `json:"produceExt"` // 生产节点
	TopicExt   *TopicTrackVo     `json:"topicExt"`   // topic节点
}

MessageTrackVo 消息轨迹节点 Author: tianyuliang Since: 2017/11/7

type MessageTrackExtWapper

type MessageTrackExtWapper struct {
	TrackWapper  *MessageTrackExt `json:"track"`
	CurrentMsgId string           `json:"currentMsgId"` // 当前消息ID
	OriginMsgId  string           `json:"originMsgId"`  // 源消息ID
}

MessageTrackVo 消息轨迹节点 Author: tianyuliang Since: 2017/11/13

func NewMessageTrackExtWapper

func NewMessageTrackExtWapper(currentMsgId string) *MessageTrackExtWapper

NewMessageTrackExtWapper 初始化MessageTrackExtWapper Author: tianyuliang Since: 2017/11/13

type ProduceTrackVo

type ProduceTrackVo struct {
	BornIp            string `json:"bornIp"`            // 消息来源IP
	BornTimestamp     string `json:"bornTimestamp"`     // 消息在客户端创建时间
	Code              int    `json:"code"`              // 消息发送结果 0:消费成功, 1:失败
	ProducerGroupId   string `json:"producerGroupId"`   // 生产组ID
	SendTimeConsuming int64  `json:"sendTimeConsuming"` // 发送消息耗时(毫秒)
}

ProduceTrackVo 消费轨迹-生产节点 Author: tianyuliang Since: 2017/11/7

type ProducerOnLine

type ProducerOnLine struct {
	ClusterName     string             `json:"clusterName"`     // 集群名称
	Topic           string             `json:"topic"`           // topic名称
	ProducerGroupId string             `json:"producerGroupId"` // 生产组者组ID
	Describe        string             `json:"describe"`        // 查询结果的描述
	Connection      []*body.Connection `json:"groups"`          // 在线生产进程
}

ProducerOnLine 在线生产进程 Author: tianyuliang Since: 2017/11/7

type ResultVo

type ResultVo struct {
	Result bool `json:"result"` // 操作结果 true:操作成功, false:操作失败
}

type SubscribeTopicTable

type SubscribeTopicTable struct {
	Topic           string   `json:"topic"`
	SubString       string   `json:"tags"`
	ClassFilterMode bool     `json:"classFilterMode"`
	TagsSet         []string `json:"tagsSet"`
	CodeSet         []int32  `json:"codeSet"`
	SubVersion      int64    `json:"subVersion"`
}

func ToSubscribeTopicTables

func ToSubscribeTopicTables(cc *body.ConsumerConnectionPlus) (subscribeTables []*SubscribeTopicTable)

ToSubscribeTopicTables 消费者订阅Topic列表 Author: tianyuliang Since: 2017/7/14

func (*SubscribeTopicTable) String

func (s *SubscribeTopicTable) String() string

String 打印SubscribeTopicTable数据 Author: tianyuliang Since: 2017/11/16

type TopicConfigVo

type TopicConfigVo struct {
	BrokerAddr     string `json:"brokerAddr"`     // broker地址
	BrokerId       int    `json:"brokerId"`       // brokerid
	BrokerName     string `json:"brokerName"`     // broker名称
	WriteQueueNums int    `json:"writeQueueNums"` // 写队列数
	Unit           bool   `json:"unit"`           // 是否为单元topic
	ReadQueueNums  int    `json:"readQueueNums"`  // 读队列数
	Order          bool   `json:"order"`          // 是否为顺序topic
	Perm           int    `json:"perm"`           // 对应的broker读写权限
}

TopicConfigVo topic配置项 Author: tianyuliang Since: 2017/11/7

type TopicStats

type TopicStats struct {
	ClusterName    string    `json:"clusterName"`    // 集群名称
	Topic          string    `json:"topic"`          // topic名称
	TopicType      TopicType `json:"topicType"`      // topic类型
	BrokerName     string    `json:"brokerName"`     // broker名称
	QueueID        int       `json:"queueId"`        // 队列ID
	MinOffset      int64     `json:"minOffset"`      // 最小偏移量
	MaxOffset      int64     `json:"maxOffset"`      // 最大偏移量
	LastUpdateTime string    `json:"lastUpdateTime"` // 最近更新时间
}

TopicStats topic数据的存储状态 Author: tianyuliang Since: 2017/11/6

func ToTopicStats

func ToTopicStats(mq *message.MessageQueue, topicOffset *admin.TopicOffset, topic, clusterName string) *TopicStats

ToTopicStats 转化为topic状态 Author: tianyuliang Since: 2017/11/6

type TopicTrackVo

type TopicTrackVo struct {
	Key   string `json:"key"`   // 消息key
	Tag   string `json:"tag"`   // 消息Tag
	Topic string `json:"topic"` // topic名称
}

TopicTrackVo 消费轨迹-topic节点 Author: tianyuliang Since: 2017/11/7

type TopicType

type TopicType int

TopicType topic类型 Author: tianyuliang Since: 2017/11/6

const (
	ALL_TOPIC    TopicType = iota // 查询所有Topic
	NORMAL_TOPIC                  // 正常队列的Topic
	RETRY_TOPIC                   // 重试队列Topic
	DLQ_TOPIC                     // 死信队列Topic
)

func ParseTopicType

func ParseTopicType(topic string) TopicType

ParseTopicType 转化为topic类型 Author: tianyuliang Since: 2017/11/6

func (TopicType) ToString

func (topicType TopicType) ToString() string

ToString 转化为字符串 Author: tianyuliang Since: 2017/11/6

type TopicVo

type TopicVo struct {
	TopicConfigVo *TopicConfigVo `json:"topicConfig"`
	ClusterName   string         `json:"clusterName"`   // 集群名称
	Topic         string         `json:"topic"`         // topic名称
	TopicType     TopicType      `json:"topicType"`     // topic类型
	IsSystemTopic bool           `json:"isSystemTopic"` // 是否为系统Topic
}

TopicVo 查询Topic列表 Author: tianyuliang Since: 2017/11/9

func ToTopicVo

func ToTopicVo(wapper *body.TopicBrokerClusterWapper) *TopicVo

ToTopicVo 转化为TopicVo Author: tianyuliang Since: 2017/11/9

func (*TopicVo) ToString

func (t *TopicVo) ToString() string

ToString 打印TopicVo结构体内容 Author: tianyuliang Since: 2017/11/9

type TopicVos

type TopicVos []*TopicVo

func (TopicVos) Len

func (self TopicVos) Len() int

func (TopicVos) Less

func (self TopicVos) Less(i, j int) bool

func (TopicVos) Swap

func (self TopicVos) Swap(i, j int)

type UpdateTopic

type UpdateTopic struct {
	ClusterName    string `json:"clusterName" valid:"required"` // 集群名称
	Topic          string `json:"topic" valid:"required"`       // topic名称
	BrokerAddr     string `json:"brokerAddr" valid:"required"`  // broker地址
	WriteQueueNums int    `json:"writeQueueNums" valid:"min=8"` // 写队列数
	ReadQueueNums  int    `json:"readQueueNums" valid:"min=8"`  // 读队列数
	Unit           bool   `json:"unit"`                         // 是否为单元topic
	Order          bool   `json:"order"`                        // 是否为顺序topic
}

UpdateTopic 删除Topic Author: tianyuliang Since: 2017/11/7

func (*UpdateTopic) ToTopicConfig

func (t *UpdateTopic) ToTopicConfig() *stgcommon.TopicConfig

ToTopicConfig 转化为stgcommon.TopicConfig Author: tianyuliang Since: 2017/11/9

func (*UpdateTopic) Validate

func (updateTopic *UpdateTopic) Validate() error

Validate 参数验证

Jump to

Keyboard shortcuts

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