hashicorp/memberlist
Github 地址:hashicorp/memberlist
是 Gossip 协议的一个 Golang 语言实现版本
本系列介绍 hashicorp/memberlist 相关实现
先从一些基本定义开始
协议
// messageType is an integer ID of a type of message that can be received
// on network channels from other members.
type messageType uint8// The list of available message types.
//
// WARNING: ONLY APPEND TO THIS LIST! The numeric values are part of the
// protocol itself.
const (pingMsg messageType