Documentation ¶
Index ¶
- Constants
- func NodeToService(val []byte) *common.ClusterInfo
- type MailBox
- func (m *MailBox) Create(info *rpc.MailBox) bool
- func (m *MailBox) Delete(Id int64) error
- func (m *MailBox) DeleteAll() error
- func (m *MailBox) Get(Id int64) *rpc.MailBox
- func (m *MailBox) Init(endpoints []string, info *common.ClusterInfo)
- func (m *MailBox) Lease(leaseId int64) error
- func (m *MailBox) Run()
- func (m *MailBox) Start()
- type Master
- type STATUS
- type Service
- type Snowflake
- type StubMailBox
- func (s *StubMailBox) Count(stubType rpc.STUB) int64
- func (s *StubMailBox) Create(info *common.StubMailBox) bool
- func (s *StubMailBox) Get(stubType rpc.STUB, Id int64) *common.StubMailBox
- func (s *StubMailBox) Init(endpoints []string, info *common.ClusterInfo)
- func (s *StubMailBox) Lease(info *common.StubMailBox) error
- func (s *StubMailBox) Run()
- func (s *StubMailBox) Start()
- type StubMailBoxMap
Constants ¶
View Source
const ( MAILBOX_DIR = "mailbox/" MAILBOX_TL_TIME = 20 * 60 )
View Source
const ( STUB_DIR = "stub/" STUB_TTL_TIME = 30 )
View Source
const (
ETCD_DIR = "server/"
)
Variables ¶
This section is empty.
Functions ¶
func NodeToService ¶
func NodeToService(val []byte) *common.ClusterInfo
Types ¶
type MailBox ¶
type MailBox struct { *common.ClusterInfo // contains filtered or unexported fields }
publish
type Master ¶
type Master struct { common.IClusterInfo // contains filtered or unexported fields }
监控服务器
func (*Master) InitServices ¶
func (m *Master) InitServices()
type Service ¶
type Service struct { *common.ClusterInfo // contains filtered or unexported fields }
注册服务器
type StubMailBox ¶
type StubMailBox struct { *common.ClusterInfo // contains filtered or unexported fields }
publish
func (*StubMailBox) Create ¶
func (s *StubMailBox) Create(info *common.StubMailBox) bool
func (*StubMailBox) Get ¶
func (s *StubMailBox) Get(stubType rpc.STUB, Id int64) *common.StubMailBox
func (*StubMailBox) Init ¶
func (s *StubMailBox) Init(endpoints []string, info *common.ClusterInfo)
初始化pub
func (*StubMailBox) Lease ¶
func (s *StubMailBox) Lease(info *common.StubMailBox) error
func (*StubMailBox) Start ¶
func (s *StubMailBox) Start()
Click to show internal directories.
Click to hide internal directories.