base

package
v0.0.0-...-96d424b Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SwitchCacheServerType

func SwitchCacheServerType(types CacheServerType) string

func SwitchSlotType

func SwitchSlotType(types SlotType) string

Types

type CacheServer

type CacheServer struct {
	ID       uint
	Types    CacheServerType
	TypeName string `json:"-"`
	IP       string //对应的ip地址.

}

type CacheServerType

type CacheServerType uint

CacheServer类型.

const (
	CACHESERVER_TYPE_NORMAL  CacheServerType = 1 //正常状态.
	CACHESERVER_TYPE_OFFLINE CacheServerType = 2 //离线.
	CACHESERVER_TYPE_MIGRATE CacheServerType = 3 //迁移.
)

type Slot

type Slot struct {
	ID       int
	Types    SlotType
	TypeName string   `json:"-"`
	IP       string   //插槽对应的ip地址.
	NewIP    string   //当插槽处于迁移状态的时候,当前属性才会有值.
	Conn     net.Conn `json:"-"`
	NewConn  net.Conn `json:"-"`
}

type SlotType

type SlotType uint

插槽类型.

const (
	SLOT_TYPE_NORMAL  SlotType = 1 //正常状态.
	SLOT_TYPE_MIGRATE SlotType = 2 //迁移状态.
)

Jump to

Keyboard shortcuts

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