protocol

package
v0.0.0-...-a3dc05e Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterInfo

type ClusterInfo struct {
	ServerAddrTable  map[string]*Server
	ClusterAddrTable map[string]*hashset.Set /* serverrName */
}

ClusterInfo cluster info

type DataVersion

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

DataVersion DataVersion

func (*DataVersion) Counter

func (dv *DataVersion) Counter() int64

Counter counter getter

func (*DataVersion) NextVersion

func (dv *DataVersion) NextVersion()

NextVersion atomic set next version

func (*DataVersion) Timestamp

func (dv *DataVersion) Timestamp() int64

Timestamp timestamp getter

type LiveServer

type LiveServer struct {
	LastUpdateTimestamp int64
	HaServerAddr        string
	DataVersion         *DataVersion
	Conn                gnet.Conn
}

LiveServer online server

func NewLiveServer

func NewLiveServer(lastUpdateTimestamp int64, haServerAddr string, dataVersion *DataVersion, conn gnet.Conn) *LiveServer

NewLiveServer new or not new?

type Server

type Server struct {
	ServerName string
	// contains filtered or unexported fields
}

Server server info

func NewServer

func NewServer(cluster, serverName string, serverAddrs map[int]string) *Server

NewServer new

func (*Server) GetServerAddrs

func (s *Server) GetServerAddrs() map[int]string

GetServerAddrs getter

Jump to

Keyboard shortcuts

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