lmproxyproto

package
v0.0.0-...-325de3d Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2021 License: MIT Imports: 7 Imported by: 0

README

protoc --go_out=. --go_opt=paths=source_relative ./pkg/lmproxyproto/cmd.proto

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Status_name = map[int32]string{
		0: "Error",
		1: "Success",
	}
	Status_value = map[string]int32{
		"Error":   0,
		"Success": 1,
	}
)

Enum value maps for Status.

View Source
var (
	Role_name = map[int32]string{
		0: "Unknown",
		1: "Master",
		2: "Slave",
	}
	Role_value = map[string]int32{
		"Unknown": 0,
		"Master":  1,
		"Slave":   2,
	}
)

Enum value maps for Role.

View Source
var (
	ClusterState_name = map[int32]string{
		0: "WaitReady",
		1: "Ready",
		2: "Migration",
	}
	ClusterState_value = map[string]int32{
		"WaitReady": 0,
		"Ready":     1,
		"Migration": 2,
	}
)

Enum value maps for ClusterState.

View Source
var File_pkg_lmproxyproto_cmd_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type CMD

type CMD struct {
	Cmd   CMDType // cmd类型
	ID    uint64
	Param []byte // cmd参数
}

CMD CMD

func (*CMD) String

func (c *CMD) String() string

type CMDType

type CMDType uint8

CMDType cmd类型

const (
	// CMDTypeNone 无
	CMDTypeNone CMDType = iota
	// CMDTypeConnect 连接
	CMDTypeConnect
	// CMDTypeConnectResp 连接回执
	CMDTypeConnectResp
	// CMDTypeClusterConfigReq 配置请求
	CMDTypeClusterConfigReq
	// CMDTypeClusterConfigResp 配置返回
	CMDTypeClusterConfigResp
	// CMDTypeClusterConfigUpdate 配置更新
	CMDTypeClusterConfigUpdate
	// CMDTypeUploadClusterConfig 代理服务命令节点上传分布式配置
	CMDTypeUploadClusterConfig
	// CMDTypeClusterConfigUpload 节点上传配置
	CMDTypeClusterConfigUpload
	// CMDTypeRegisterNode 注册节点
	CMDTypeRegisterNode
	// CMDTypeRegisterNodeResp 注册节点返回
	CMDTypeRegisterNodeResp
	// CMDTypePing 心跳
	CMDTypePing
	// CMDTypePong 心跳响应
	CMDTypePong
	// CMDTypeStatusResp CMDTypeStatusResp
	CMDTypeStatusResp
	// CMDTypeExporting CMDTypeExporting
	CMDTypeExporting
	// CMDTypeExported CMDTypeExported
	CMDTypeExported
	// CMDTypeExportedAll CMDTypeExportedAll
	CMDTypeExportedAll
	// CMDTypeImportFrom CMDTypeImportFrom
	CMDTypeImportFrom
	// CMDTypeImported CMDTypeImported
	CMDTypeImported
	// CMDTypeClusterConfigListReq 请求分布式配置列表 (n-p)
	CMDTypeClusterConfigListReq
	// CMDTypeClusterConfigListResp 分布式配置列表返回 (p-n)
	CMDTypeClusterConfigListResp
	// CMDTypeClusterConfigListChange 分布配置列表有变动
	CMDTypeClusterConfigListChange
)

func (CMDType) String

func (c CMDType) String() string

func (CMDType) Uint8

func (c CMDType) Uint8() uint8

Uint8 Uint8

type ClusterConfig

type ClusterConfig struct {
	Version         int32         `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`                 // 配置版本
	SlotCount       int32         `protobuf:"varint,2,opt,name=slotCount,proto3" json:"slotCount,omitempty"`             // slot 总数量
	ClusterID       int32         `protobuf:"varint,3,opt,name=clusterID,proto3" json:"clusterID,omitempty"`             // cluster id
	Replica         int32         `protobuf:"varint,4,opt,name=replica,proto3" json:"replica,omitempty"`                 // 副本数
	State           ClusterState  `protobuf:"varint,5,opt,name=state,proto3,enum=ClusterState" json:"state,omitempty"`   // 状态
	Slots           []byte        `protobuf:"bytes,6,opt,name=slots,proto3" json:"slots,omitempty"`                      // slot bitmap
	Nodes           []*Node       `protobuf:"bytes,7,rep,name=nodes,proto3" json:"nodes,omitempty"`                      // 节点信息
	LeaderID        int32         `protobuf:"varint,8,opt,name=leaderID,proto3" json:"leaderID,omitempty"`               // 领导节点的id
	ImportClusterID int32         `protobuf:"varint,9,opt,name=importClusterID,proto3" json:"importClusterID,omitempty"` // 要导入的分布式ID
	ImportWill      []byte        `protobuf:"bytes,10,opt,name=importWill,proto3" json:"importWill,omitempty"`           // 将要引入的slots
	ExportWill      []byte        `protobuf:"bytes,11,opt,name=exportWill,proto3" json:"exportWill,omitempty"`           // 将要导出的slots
	Exporting       []byte        `protobuf:"bytes,12,opt,name=exporting,proto3" json:"exporting,omitempty"`             // 正在导出的slot(正在导出的slot将被锁定,不接受数据)
	ExportedList    *ExportedList `protobuf:"bytes,13,opt,name=exportedList,proto3" json:"exportedList,omitempty"`       // 已导出的slot
	Weight          int32         `protobuf:"varint,14,opt,name=weight,proto3" json:"weight,omitempty"`                  // 权重
	// contains filtered or unexported fields
}

func (*ClusterConfig) Descriptor deprecated

func (*ClusterConfig) Descriptor() ([]byte, []int)

Deprecated: Use ClusterConfig.ProtoReflect.Descriptor instead.

func (*ClusterConfig) GetClusterID

func (x *ClusterConfig) GetClusterID() int32

func (*ClusterConfig) GetExportWill

func (x *ClusterConfig) GetExportWill() []byte

func (*ClusterConfig) GetExportedList

func (x *ClusterConfig) GetExportedList() *ExportedList

func (*ClusterConfig) GetExporting

func (x *ClusterConfig) GetExporting() []byte

func (*ClusterConfig) GetImportClusterID

func (x *ClusterConfig) GetImportClusterID() int32

func (*ClusterConfig) GetImportWill

func (x *ClusterConfig) GetImportWill() []byte

func (*ClusterConfig) GetLeaderID

func (x *ClusterConfig) GetLeaderID() int32

func (*ClusterConfig) GetNodes

func (x *ClusterConfig) GetNodes() []*Node

func (*ClusterConfig) GetReplica

func (x *ClusterConfig) GetReplica() int32

func (*ClusterConfig) GetSlotCount

func (x *ClusterConfig) GetSlotCount() int32

func (*ClusterConfig) GetSlots

func (x *ClusterConfig) GetSlots() []byte

func (*ClusterConfig) GetState

func (x *ClusterConfig) GetState() ClusterState

func (*ClusterConfig) GetVersion

func (x *ClusterConfig) GetVersion() int32

func (*ClusterConfig) GetWeight

func (x *ClusterConfig) GetWeight() int32

func (*ClusterConfig) ProtoMessage

func (*ClusterConfig) ProtoMessage()

func (*ClusterConfig) ProtoReflect

func (x *ClusterConfig) ProtoReflect() protoreflect.Message

func (*ClusterConfig) Reset

func (x *ClusterConfig) Reset()

func (*ClusterConfig) String

func (x *ClusterConfig) String() string

type ClusterConfigChange

type ClusterConfigChange struct {
	ClusterID int32 `protobuf:"varint,1,opt,name=clusterID,proto3" json:"clusterID,omitempty"`
	Version   int32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

func (*ClusterConfigChange) Descriptor deprecated

func (*ClusterConfigChange) Descriptor() ([]byte, []int)

Deprecated: Use ClusterConfigChange.ProtoReflect.Descriptor instead.

func (*ClusterConfigChange) GetClusterID

func (x *ClusterConfigChange) GetClusterID() int32

func (*ClusterConfigChange) GetVersion

func (x *ClusterConfigChange) GetVersion() int32

func (*ClusterConfigChange) ProtoMessage

func (*ClusterConfigChange) ProtoMessage()

func (*ClusterConfigChange) ProtoReflect

func (x *ClusterConfigChange) ProtoReflect() protoreflect.Message

func (*ClusterConfigChange) Reset

func (x *ClusterConfigChange) Reset()

func (*ClusterConfigChange) String

func (x *ClusterConfigChange) String() string

type ClusterConfigListResp

type ClusterConfigListResp struct {
	ClusterConfigs []*ClusterConfig `protobuf:"bytes,1,rep,name=clusterConfigs,proto3" json:"clusterConfigs,omitempty"`
	// contains filtered or unexported fields
}

func (*ClusterConfigListResp) Descriptor deprecated

func (*ClusterConfigListResp) Descriptor() ([]byte, []int)

Deprecated: Use ClusterConfigListResp.ProtoReflect.Descriptor instead.

func (*ClusterConfigListResp) GetClusterConfigs

func (x *ClusterConfigListResp) GetClusterConfigs() []*ClusterConfig

func (*ClusterConfigListResp) ProtoMessage

func (*ClusterConfigListResp) ProtoMessage()

func (*ClusterConfigListResp) ProtoReflect

func (x *ClusterConfigListResp) ProtoReflect() protoreflect.Message

func (*ClusterConfigListResp) Reset

func (x *ClusterConfigListResp) Reset()

func (*ClusterConfigListResp) String

func (x *ClusterConfigListResp) String() string

type ClusterConfigReq

type ClusterConfigReq struct {
	ClusterID int32 `protobuf:"varint,3,opt,name=clusterID,proto3" json:"clusterID,omitempty"`
	// contains filtered or unexported fields
}

func (*ClusterConfigReq) Descriptor deprecated

func (*ClusterConfigReq) Descriptor() ([]byte, []int)

Deprecated: Use ClusterConfigReq.ProtoReflect.Descriptor instead.

func (*ClusterConfigReq) GetClusterID

func (x *ClusterConfigReq) GetClusterID() int32

func (*ClusterConfigReq) ProtoMessage

func (*ClusterConfigReq) ProtoMessage()

func (*ClusterConfigReq) ProtoReflect

func (x *ClusterConfigReq) ProtoReflect() protoreflect.Message

func (*ClusterConfigReq) Reset

func (x *ClusterConfigReq) Reset()

func (*ClusterConfigReq) String

func (x *ClusterConfigReq) String() string

type ClusterConfigResp

type ClusterConfigResp struct {
	Version int32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` // 配置版本
	// contains filtered or unexported fields
}

func (*ClusterConfigResp) Descriptor deprecated

func (*ClusterConfigResp) Descriptor() ([]byte, []int)

Deprecated: Use ClusterConfigResp.ProtoReflect.Descriptor instead.

func (*ClusterConfigResp) GetVersion

func (x *ClusterConfigResp) GetVersion() int32

func (*ClusterConfigResp) ProtoMessage

func (*ClusterConfigResp) ProtoMessage()

func (*ClusterConfigResp) ProtoReflect

func (x *ClusterConfigResp) ProtoReflect() protoreflect.Message

func (*ClusterConfigResp) Reset

func (x *ClusterConfigResp) Reset()

func (*ClusterConfigResp) String

func (x *ClusterConfigResp) String() string

type ClusterState

type ClusterState int32
const (
	ClusterState_WaitReady ClusterState = 0
	ClusterState_Ready     ClusterState = 1
	ClusterState_Migration ClusterState = 2
)

func (ClusterState) Descriptor

func (ClusterState) Enum

func (x ClusterState) Enum() *ClusterState

func (ClusterState) EnumDescriptor deprecated

func (ClusterState) EnumDescriptor() ([]byte, []int)

Deprecated: Use ClusterState.Descriptor instead.

func (ClusterState) Number

func (ClusterState) String

func (x ClusterState) String() string

func (ClusterState) Type

type ConnectInfo

type ConnectInfo struct {
	NodeID    int32 `protobuf:"varint,1,opt,name=nodeID,proto3" json:"nodeID,omitempty"`       // 节点ID
	ClusterID int32 `protobuf:"varint,2,opt,name=clusterID,proto3" json:"clusterID,omitempty"` // 分布式ID
	// contains filtered or unexported fields
}

func (*ConnectInfo) Descriptor deprecated

func (*ConnectInfo) Descriptor() ([]byte, []int)

Deprecated: Use ConnectInfo.ProtoReflect.Descriptor instead.

func (*ConnectInfo) GetClusterID

func (x *ConnectInfo) GetClusterID() int32

func (*ConnectInfo) GetNodeID

func (x *ConnectInfo) GetNodeID() int32

func (*ConnectInfo) ProtoMessage

func (*ConnectInfo) ProtoMessage()

func (*ConnectInfo) ProtoReflect

func (x *ConnectInfo) ProtoReflect() protoreflect.Message

func (*ConnectInfo) Reset

func (x *ConnectInfo) Reset()

func (*ConnectInfo) String

func (x *ConnectInfo) String() string

type ConnectReq

type ConnectReq struct {
	NodeID int32 `protobuf:"varint,1,opt,name=nodeID,proto3" json:"nodeID,omitempty"` // 节点ID
	// contains filtered or unexported fields
}

func (*ConnectReq) Descriptor deprecated

func (*ConnectReq) Descriptor() ([]byte, []int)

Deprecated: Use ConnectReq.ProtoReflect.Descriptor instead.

func (*ConnectReq) GetNodeID

func (x *ConnectReq) GetNodeID() int32

func (*ConnectReq) ProtoMessage

func (*ConnectReq) ProtoMessage()

func (*ConnectReq) ProtoReflect

func (x *ConnectReq) ProtoReflect() protoreflect.Message

func (*ConnectReq) Reset

func (x *ConnectReq) Reset()

func (*ConnectReq) String

func (x *ConnectReq) String() string

type ConnectResp

type ConnectResp struct {
	Status      Status       `protobuf:"varint,1,opt,name=status,proto3,enum=Status" json:"status,omitempty"` // 状态 0.失败 1.成功
	Reason      string       `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`              // 原因
	ProxyConfig *ProxyConfig `protobuf:"bytes,3,opt,name=proxyConfig,proto3" json:"proxyConfig,omitempty"`
	// contains filtered or unexported fields
}

func (*ConnectResp) Descriptor deprecated

func (*ConnectResp) Descriptor() ([]byte, []int)

Deprecated: Use ConnectResp.ProtoReflect.Descriptor instead.

func (*ConnectResp) GetProxyConfig

func (x *ConnectResp) GetProxyConfig() *ProxyConfig

func (*ConnectResp) GetReason

func (x *ConnectResp) GetReason() string

func (*ConnectResp) GetStatus

func (x *ConnectResp) GetStatus() Status

func (*ConnectResp) ProtoMessage

func (*ConnectResp) ProtoMessage()

func (*ConnectResp) ProtoReflect

func (x *ConnectResp) ProtoReflect() protoreflect.Message

func (*ConnectResp) Reset

func (x *ConnectResp) Reset()

func (*ConnectResp) String

func (x *ConnectResp) String() string

type Encoder

type Encoder struct {
	// contains filtered or unexported fields
}

Encoder 编码者

func NewEncoder

func NewEncoder() *Encoder

NewEncoder NewEncoder

func (*Encoder) Bytes

func (e *Encoder) Bytes() []byte

Bytes Bytes

func (*Encoder) Len

func (e *Encoder) Len() int

Len Len

func (*Encoder) WriteBinary

func (e *Encoder) WriteBinary(b []byte)

WriteBinary WriteBinary

func (*Encoder) WriteByte

func (e *Encoder) WriteByte(b byte) error

WriteByte WriteByte

func (*Encoder) WriteBytes

func (e *Encoder) WriteBytes(b []byte)

WriteBytes WriteBytes

func (*Encoder) WriteInt

func (e *Encoder) WriteInt(i int) error

WriteInt WriteInt

func (*Encoder) WriteInt16

func (e *Encoder) WriteInt16(i int)

WriteInt16 WriteInt16

func (*Encoder) WriteInt32

func (e *Encoder) WriteInt32(i int32)

WriteInt32 WriteInt32

func (*Encoder) WriteInt64

func (e *Encoder) WriteInt64(i int64)

WriteInt64 WriteInt64

func (*Encoder) WriteString

func (e *Encoder) WriteString(str string)

WriteString WriteString

func (*Encoder) WriteStringAll

func (e *Encoder) WriteStringAll(str string)

WriteStringAll WriteStringAll

func (*Encoder) WriteUint16

func (e *Encoder) WriteUint16(i uint16)

WriteUint16 WriteUint16

func (*Encoder) WriteUint32

func (e *Encoder) WriteUint32(i uint32)

WriteUint32 WriteUint32

func (*Encoder) WriteUint64

func (e *Encoder) WriteUint64(i uint64)

WriteUint64 WriteUint64

func (*Encoder) WriteUint8

func (e *Encoder) WriteUint8(i uint8)

WriteUint8 WriteUint8

func (*Encoder) WriteVariable

func (e *Encoder) WriteVariable(v int)

WriteVariable WriteVariable

type Exported

type Exported struct {
	No    string `protobuf:"bytes,1,opt,name=no,proto3" json:"no,omitempty"`
	Slots []byte `protobuf:"bytes,2,opt,name=slots,proto3" json:"slots,omitempty"` // 已导出的slots
	Path  string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"`   // 对应的备份路径
	// contains filtered or unexported fields
}

func (*Exported) Descriptor deprecated

func (*Exported) Descriptor() ([]byte, []int)

Deprecated: Use Exported.ProtoReflect.Descriptor instead.

func (*Exported) GetNo

func (x *Exported) GetNo() string

func (*Exported) GetPath

func (x *Exported) GetPath() string

func (*Exported) GetSlots

func (x *Exported) GetSlots() []byte

func (*Exported) ProtoMessage

func (*Exported) ProtoMessage()

func (*Exported) ProtoReflect

func (x *Exported) ProtoReflect() protoreflect.Message

func (*Exported) Reset

func (x *Exported) Reset()

func (*Exported) String

func (x *Exported) String() string

type ExportedList

type ExportedList struct {
	Exported []*Exported `protobuf:"bytes,1,rep,name=exported,proto3" json:"exported,omitempty"`
	// contains filtered or unexported fields
}

func (*ExportedList) Descriptor deprecated

func (*ExportedList) Descriptor() ([]byte, []int)

Deprecated: Use ExportedList.ProtoReflect.Descriptor instead.

func (*ExportedList) GetExported

func (x *ExportedList) GetExported() []*Exported

func (*ExportedList) ProtoMessage

func (*ExportedList) ProtoMessage()

func (*ExportedList) ProtoReflect

func (x *ExportedList) ProtoReflect() protoreflect.Message

func (*ExportedList) Reset

func (x *ExportedList) Reset()

func (*ExportedList) String

func (x *ExportedList) String() string

type Exporting

type Exporting struct {
	Slots []byte `protobuf:"bytes,1,opt,name=slots,proto3" json:"slots,omitempty"` // 导出中的slots
	// contains filtered or unexported fields
}

func (*Exporting) Descriptor deprecated

func (*Exporting) Descriptor() ([]byte, []int)

Deprecated: Use Exporting.ProtoReflect.Descriptor instead.

func (*Exporting) GetSlots

func (x *Exporting) GetSlots() []byte

func (*Exporting) ProtoMessage

func (*Exporting) ProtoMessage()

func (*Exporting) ProtoReflect

func (x *Exporting) ProtoReflect() protoreflect.Message

func (*Exporting) Reset

func (x *Exporting) Reset()

func (*Exporting) String

func (x *Exporting) String() string

type Imported

type Imported struct {
	No    string `protobuf:"bytes,1,opt,name=no,proto3" json:"no,omitempty"`
	Slots []byte `protobuf:"bytes,2,opt,name=slots,proto3" json:"slots,omitempty"` // 已导入的slots
	// contains filtered or unexported fields
}

func (*Imported) Descriptor deprecated

func (*Imported) Descriptor() ([]byte, []int)

Deprecated: Use Imported.ProtoReflect.Descriptor instead.

func (*Imported) GetNo

func (x *Imported) GetNo() string

func (*Imported) GetSlots

func (x *Imported) GetSlots() []byte

func (*Imported) ProtoMessage

func (*Imported) ProtoMessage()

func (*Imported) ProtoReflect

func (x *Imported) ProtoReflect() protoreflect.Message

func (*Imported) Reset

func (x *Imported) Reset()

func (*Imported) String

func (x *Imported) String() string

type Node

type Node struct {
	NodeID       int32  `protobuf:"varint,1,opt,name=nodeID,proto3" json:"nodeID,omitempty"`            // 节点ID
	NodeRaftAddr string `protobuf:"bytes,2,opt,name=nodeRaftAddr,proto3" json:"nodeRaftAddr,omitempty"` // 节点Raft地址
	NodeAPIAddr  string `protobuf:"bytes,3,opt,name=nodeAPIAddr,proto3" json:"nodeAPIAddr,omitempty"`   // api地址 类似 http://xxx.xxx.xxx.xxx:8080
	NodeRPCAddr  string `protobuf:"bytes,4,opt,name=nodeRPCAddr,proto3" json:"nodeRPCAddr,omitempty"`   // 节点RPC通讯地址
	TcpAddr      string `protobuf:"bytes,5,opt,name=tcpAddr,proto3" json:"tcpAddr,omitempty"`           // 节点tcp对外地址
	WsAddr       string `protobuf:"bytes,6,opt,name=wsAddr,proto3" json:"wsAddr,omitempty"`             // 节点websocket对外地址
	Role         Role   `protobuf:"varint,7,opt,name=role,proto3,enum=Role" json:"role,omitempty"`
	Join         bool   `protobuf:"varint,8,opt,name=join,proto3" json:"join,omitempty"` // 是否是新加入的节点
	// contains filtered or unexported fields
}

func (*Node) Descriptor deprecated

func (*Node) Descriptor() ([]byte, []int)

Deprecated: Use Node.ProtoReflect.Descriptor instead.

func (*Node) GetJoin

func (x *Node) GetJoin() bool

func (*Node) GetNodeAPIAddr

func (x *Node) GetNodeAPIAddr() string

func (*Node) GetNodeID

func (x *Node) GetNodeID() int32

func (*Node) GetNodeRPCAddr

func (x *Node) GetNodeRPCAddr() string

func (*Node) GetNodeRaftAddr

func (x *Node) GetNodeRaftAddr() string

func (*Node) GetRole

func (x *Node) GetRole() Role

func (*Node) GetTcpAddr

func (x *Node) GetTcpAddr() string

func (*Node) GetWsAddr

func (x *Node) GetWsAddr() string

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) ProtoReflect

func (x *Node) ProtoReflect() protoreflect.Message

func (*Node) Reset

func (x *Node) Reset()

func (*Node) String

func (x *Node) String() string

type Ping

type Ping struct {
	Version      int32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`           //配置版本
	ClusterID    int32 `protobuf:"varint,2,opt,name=clusterID,proto3" json:"clusterID,omitempty"`       // 分布式ID
	LeaderID     int32 `protobuf:"varint,3,opt,name=leaderID,proto3" json:"leaderID,omitempty"`         // 领导ID
	TotalVersion int32 `protobuf:"varint,4,opt,name=totalVersion,proto3" json:"totalVersion,omitempty"` // 所有分布式配置的总版本(集群内的所有clusterConfig的version累加的值)
	// contains filtered or unexported fields
}

func (*Ping) Descriptor deprecated

func (*Ping) Descriptor() ([]byte, []int)

Deprecated: Use Ping.ProtoReflect.Descriptor instead.

func (*Ping) GetClusterID

func (x *Ping) GetClusterID() int32

func (*Ping) GetLeaderID

func (x *Ping) GetLeaderID() int32

func (*Ping) GetTotalVersion

func (x *Ping) GetTotalVersion() int32

func (*Ping) GetVersion

func (x *Ping) GetVersion() int32

func (*Ping) ProtoMessage

func (*Ping) ProtoMessage()

func (*Ping) ProtoReflect

func (x *Ping) ProtoReflect() protoreflect.Message

func (*Ping) Reset

func (x *Ping) Reset()

func (*Ping) String

func (x *Ping) String() string

type Protocol

type Protocol struct {
}

Protocol 协议

func NewProtocol

func NewProtocol() *Protocol

NewProtocol 创建一个协议

func (*Protocol) Decode

func (p *Protocol) Decode(data []byte) (*CMD, error)

Decode 解码

func (*Protocol) DecodeWithReader

func (p *Protocol) DecodeWithReader(reader io.Reader) (*CMD, error)

DecodeWithReader 解码

func (*Protocol) Encode

func (p *Protocol) Encode(c *CMD) ([]byte, error)

Encode 编码

func (*Protocol) Int32

func (p *Protocol) Int32(b []byte) int32

Int32 Int32

func (*Protocol) Uint64

func (p *Protocol) Uint64(b []byte) uint64

Uint64 Uint64

type ProxyConfig

type ProxyConfig struct {
	UploadSlotBackupURL  string `protobuf:"bytes,1,opt,name=uploadSlotBackupURL,proto3" json:"uploadSlotBackupURL,omitempty"`   // 上传slot的url地址
	DowloadSlotBackupURL string `protobuf:"bytes,2,opt,name=dowloadSlotBackupURL,proto3" json:"dowloadSlotBackupURL,omitempty"` // 下载slot备份的地址
	RemoveSlotBackupURL  string `protobuf:"bytes,3,opt,name=removeSlotBackupURL,proto3" json:"removeSlotBackupURL,omitempty"`   // 移除slot备份的地址
	// contains filtered or unexported fields
}

func (*ProxyConfig) Descriptor deprecated

func (*ProxyConfig) Descriptor() ([]byte, []int)

Deprecated: Use ProxyConfig.ProtoReflect.Descriptor instead.

func (*ProxyConfig) GetDowloadSlotBackupURL

func (x *ProxyConfig) GetDowloadSlotBackupURL() string

func (*ProxyConfig) GetRemoveSlotBackupURL

func (x *ProxyConfig) GetRemoveSlotBackupURL() string

func (*ProxyConfig) GetUploadSlotBackupURL

func (x *ProxyConfig) GetUploadSlotBackupURL() string

func (*ProxyConfig) ProtoMessage

func (*ProxyConfig) ProtoMessage()

func (*ProxyConfig) ProtoReflect

func (x *ProxyConfig) ProtoReflect() protoreflect.Message

func (*ProxyConfig) Reset

func (x *ProxyConfig) Reset()

func (*ProxyConfig) String

func (x *ProxyConfig) String() string

type RegisterNodeResp

type RegisterNodeResp struct {
	Status    Status `protobuf:"varint,1,opt,name=status,proto3,enum=Status" json:"status,omitempty"` // 状态 0.失败 1.成功
	Reason    string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`              // 原因
	ClusterID int32  `protobuf:"varint,3,opt,name=clusterID,proto3" json:"clusterID,omitempty"`       // 分布式ID
	// contains filtered or unexported fields
}

func (*RegisterNodeResp) Descriptor deprecated

func (*RegisterNodeResp) Descriptor() ([]byte, []int)

Deprecated: Use RegisterNodeResp.ProtoReflect.Descriptor instead.

func (*RegisterNodeResp) GetClusterID

func (x *RegisterNodeResp) GetClusterID() int32

func (*RegisterNodeResp) GetReason

func (x *RegisterNodeResp) GetReason() string

func (*RegisterNodeResp) GetStatus

func (x *RegisterNodeResp) GetStatus() Status

func (*RegisterNodeResp) ProtoMessage

func (*RegisterNodeResp) ProtoMessage()

func (*RegisterNodeResp) ProtoReflect

func (x *RegisterNodeResp) ProtoReflect() protoreflect.Message

func (*RegisterNodeResp) Reset

func (x *RegisterNodeResp) Reset()

func (*RegisterNodeResp) String

func (x *RegisterNodeResp) String() string

type Role

type Role int32
const (
	Role_Unknown Role = 0
	Role_Master  Role = 1
	Role_Slave   Role = 2
)

func (Role) Descriptor

func (Role) Descriptor() protoreflect.EnumDescriptor

func (Role) Enum

func (x Role) Enum() *Role

func (Role) EnumDescriptor deprecated

func (Role) EnumDescriptor() ([]byte, []int)

Deprecated: Use Role.Descriptor instead.

func (Role) Number

func (x Role) Number() protoreflect.EnumNumber

func (Role) String

func (x Role) String() string

func (Role) Type

func (Role) Type() protoreflect.EnumType

type Status

type Status int32
const (
	Status_Error   Status = 0
	Status_Success Status = 1
)

func (Status) Descriptor

func (Status) Descriptor() protoreflect.EnumDescriptor

func (Status) Enum

func (x Status) Enum() *Status

func (Status) EnumDescriptor deprecated

func (Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use Status.Descriptor instead.

func (Status) Number

func (x Status) Number() protoreflect.EnumNumber

func (Status) String

func (x Status) String() string

func (Status) Type

func (Status) Type() protoreflect.EnumType

type StatusResp

type StatusResp struct {
	Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=Status" json:"status,omitempty"` // 状态 0.失败 1.成功
	Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`              // 原因
	// contains filtered or unexported fields
}

func (*StatusResp) Descriptor deprecated

func (*StatusResp) Descriptor() ([]byte, []int)

Deprecated: Use StatusResp.ProtoReflect.Descriptor instead.

func (*StatusResp) GetReason

func (x *StatusResp) GetReason() string

func (*StatusResp) GetStatus

func (x *StatusResp) GetStatus() Status

func (*StatusResp) ProtoMessage

func (*StatusResp) ProtoMessage()

func (*StatusResp) ProtoReflect

func (x *StatusResp) ProtoReflect() protoreflect.Message

func (*StatusResp) Reset

func (x *StatusResp) Reset()

func (*StatusResp) String

func (x *StatusResp) String() string

Jump to

Keyboard shortcuts

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