heartbeat

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: 4 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.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsumeFromWhere

type ConsumeFromWhere int

ConsumeFromWhere 从哪里开始消费 Author: yintongqiang Since: 2017/8/8

const (
	// 一个新的订阅组第一次启动从队列的最后位置开始消费<br>
	// 后续再启动接着上次消费的进度开始消费
	CONSUME_FROM_LAST_OFFSET ConsumeFromWhere = iota

	// 一个新的订阅组第一次启动从队列的最前位置开始消费<br>
	// 后续再启动接着上次消费的进度开始消费
	CONSUME_FROM_FIRST_OFFSET

	// 一个新的订阅组第一次启动从指定时间点开始消费<br>
	// 后续再启动接着上次消费的进度开始消费<br>
	// 时间点设置参见DefaultMQPushConsumer.consumeTimestamp参数
	CONSUME_FROM_TIMESTAMP
)

func (ConsumeFromWhere) String

func (cfw ConsumeFromWhere) String() string

String 从哪里开始消费,转化为相应的字符串 Author: yintongqiang Since: 2017/8/8

type ConsumeType

type ConsumeType int

ConsumeType 消费类型枚举 Author: yintongqiang Since: 2017/8/8

const (
	CONSUME_ACTIVELY  ConsumeType = iota // 主动方式消费(常见于pull消费)
	CONSUME_PASSIVELY                    // 被动方式消费(常见于push消费)
)

func (ConsumeType) String

func (ct ConsumeType) String() string

String 转化为对应的字符串 Author: yintongqiang Since: 2017/8/8

type ConsumerData

type ConsumerData struct {
	GroupName         string             `json:"groupName"`
	ConsumeType       ConsumeType        `json:"consumeType"`
	MessageModel      MessageModel       `json:"messageModel"`
	ConsumeFromWhere  ConsumeFromWhere   `json:"consumeFromWhere"`
	SubscriptionDatas []SubscriptionData `json:"subscriptionDataSet"`
	UnitMode          bool               `json:"unitMode"`
}

ConsumerData 消费者 Author: yintongqiang Since: 2017/8/8

func (*ConsumerData) String

func (cd *ConsumerData) String() string

String 消费者 Author: rongzhihong Since: 2017/9/14

type ConsumerDataPlus

type ConsumerDataPlus struct {
	GroupName           string                 `json:"groupName"`
	ConsumeType         ConsumeType            `json:"consumeType"`
	MessageModel        MessageModel           `json:"messageModel"`
	ConsumeFromWhere    ConsumeFromWhere       `json:"consumeFromWhere"`
	SubscriptionDataSet []SubscriptionDataPlus `json:"subscriptionDataSet"`
	UnitMode            bool                   `json:"unitMode"`
}

func (*ConsumerDataPlus) String

func (cds *ConsumerDataPlus) String() string

String 格式ConsumerDataPlus信息 Author: rongzhihong Since: 2017/9/14

type HeartbeatData

type HeartbeatData struct {
	ClientID      string         `json:"clientID"`
	ProducerDatas []ProducerData `json:"producerDataSet"`
	ConsumerDatas []ConsumerData `json:"consumerDataSet"`
}

HeartbeatData 客户端与broker心跳结构体 Author: yintongqiang Since: 2017/8/8

func NewHeartbeatData

func NewHeartbeatData() *HeartbeatData

NewHeartbeatData 初始化broker心跳结构体 Author: rongzhihong Since: 2017/9/21

func (*HeartbeatData) Decode

func (heartbeatData *HeartbeatData) Decode(byte []byte) *HeartbeatData

func (*HeartbeatData) Encode

func (heartbeatData *HeartbeatData) Encode() []byte

type HeartbeatDataPlus

type HeartbeatDataPlus struct {
	ClientID        string             `json:"clientID"`
	ProducerDataSet []ProducerData     `json:"producerDataSet"`
	ConsumerDataSet []ConsumerDataPlus `json:"consumerDataSet"`
}

func (*HeartbeatDataPlus) Decode

func (heartbeatDataPlus *HeartbeatDataPlus) Decode(byte []byte) *HeartbeatDataPlus

type MessageModel

type MessageModel int

MessageModel 消息类型枚举 Author: yintongqiang Since: 2017/8/8

const (
	BROADCASTING MessageModel = iota // 广播消费模式
	CLUSTERING                       // 集群消费模式
)

func (MessageModel) String

func (m MessageModel) String() string

消费类型枚举 Author: yintongqiang Since: 2017/8/8

type ProducerData

type ProducerData struct {
	GroupName string `json:"groupName"` // 生产者组名称(ProducerGroupName)
}

ProducerData 生产者心跳信息 Author: yintongqiang Since: 2017/8/9

type SubscriptionData

type SubscriptionData struct {
	SubAll          string  `json:"-"`
	ClassFilterMode bool    `json:"classFilterMode"`
	Topic           string  `json:"topic"`
	SubString       string  `json:"subString"`
	TagsSet         set.Set `json:"tagsSet"`
	CodeSet         set.Set `json:"codeSet"`
	SubVersion      int     `json:"subVersion"`
}

SubscriptionData: 订阅信息结构体 Author: yintongqiang Since: 2017/8/9

func (*SubscriptionData) String

func (sd *SubscriptionData) String() string

String 格式化订阅信息结构体的内容 Author: tianyuliang Since: 2017/11/6

type SubscriptionDataPlus

type SubscriptionDataPlus struct {
	SubAll          string   `json:"-"`
	ClassFilterMode bool     `json:"classFilterMode"`
	Topic           string   `json:"topic"`
	SubString       string   `json:"subString"`
	TagsSet         []string `json:"tagsSet"`
	CodeSet         []int32  `json:"codeSet"`
	SubVersion      int      `json:"subVersion"`
}

func (*SubscriptionDataPlus) String

func (sdp *SubscriptionDataPlus) String() string

String 格式化订阅信息结构体的内容 Author: tianyuliang Since: 2017/11/6

Jump to

Keyboard shortcuts

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