Documentation ¶
Index ¶
- Constants
- type ServiceMgr
- func (s *ServiceMgr) Apply(ctx context.Context, opTypes []int32, datas [][]byte, ...) error
- func (s *ServiceMgr) Flush(ctx context.Context) error
- func (s *ServiceMgr) GetModuleName() string
- func (s *ServiceMgr) GetServiceInfo(sname string) (info clustermgr.ServiceInfo)
- func (s *ServiceMgr) IsRegistered(name string, host string) bool
- func (s *ServiceMgr) ListServiceInfo() (info clustermgr.ServiceInfo, err error)
- func (s *ServiceMgr) LoadData(ctx context.Context) error
- func (s *ServiceMgr) NotifyLeaderChange(ctx context.Context, leader uint64, host string)
- func (s *ServiceMgr) SetModuleName(name string)
Constants ¶
View Source
const ( OpRegister int32 = iota + 1 OpUnregister OpHeartbeat )
View Source
const ( DbPut dbOpType = iota DbDelete )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServiceMgr ¶
type ServiceMgr struct {
// contains filtered or unexported fields
}
func NewServiceMgr ¶
func NewServiceMgr(t *normaldb.ServiceTable) *ServiceMgr
func (*ServiceMgr) Apply ¶
func (s *ServiceMgr) Apply(ctx context.Context, opTypes []int32, datas [][]byte, contexts []base.ProposeContext) error
func (*ServiceMgr) GetModuleName ¶
func (s *ServiceMgr) GetModuleName() string
func (*ServiceMgr) GetServiceInfo ¶
func (s *ServiceMgr) GetServiceInfo(sname string) (info clustermgr.ServiceInfo)
func (*ServiceMgr) IsRegistered ¶
func (s *ServiceMgr) IsRegistered(name string, host string) bool
func (*ServiceMgr) ListServiceInfo ¶
func (s *ServiceMgr) ListServiceInfo() (info clustermgr.ServiceInfo, err error)
func (*ServiceMgr) NotifyLeaderChange ¶
func (s *ServiceMgr) NotifyLeaderChange(ctx context.Context, leader uint64, host string)
func (*ServiceMgr) SetModuleName ¶
func (s *ServiceMgr) SetModuleName(name string)
Click to show internal directories.
Click to hide internal directories.