master

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Master

type Master struct{}

主节点处理

func NewMaster

func NewMaster() *Master

func (*Master) Close

func (m *Master) Close()

func (*Master) Run

func (m *Master) Run()

type MasterHttpServer

type MasterHttpServer struct{}

func (*MasterHttpServer) MemberNode

func (s *MasterHttpServer) MemberNode(ss session.Session, input *deal.MemberNodeRequest) error

获取所有的node

func (*MasterHttpServer) ServerNode

func (s *MasterHttpServer) ServerNode(ss session.Session, input *deal.ServerNodeRequest) error

获取所有的node

type MasterServer

type MasterServer struct {
	Mux            sync.Mutex
	MemberSessions []session.Session
	ServerSessions []session.Session
	MemberMchID    uint64
}

主节点的服务对象

func (*MasterServer) MemberHeart

func (s *MasterServer) MemberHeart(ss session.Session, input *deal.Ping) error

member ping

func (*MasterServer) MemberInfo

func (s *MasterServer) MemberInfo(ss session.Session, input *deal.MemberInfoNotice) error

member session

func (*MasterServer) MemberStart

func (s *MasterServer) MemberStart(ss session.Session, input *deal.MemberStartRequest) error

member start

func (*MasterServer) MemberStop

func (s *MasterServer) MemberStop(ss session.Session, input *deal.MemberStopNotice) error

member stop

func (*MasterServer) ServerHeart

func (s *MasterServer) ServerHeart(ss session.Session, input *deal.Ping) error

member ping

func (*MasterServer) ServerStart

func (s *MasterServer) ServerStart(ss session.Session, input *deal.ServerStartRequest) error

server start

func (*MasterServer) ServerStop

func (s *MasterServer) ServerStop(ss session.Session, input *deal.ServerStopNotice) error

member stop

Jump to

Keyboard shortcuts

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