servicemgr

package
v0.0.0-...-303e327 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

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) Flush

func (s *ServiceMgr) Flush(ctx context.Context) 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) LoadData

func (s *ServiceMgr) LoadData(ctx context.Context) error

func (*ServiceMgr) NotifyLeaderChange

func (s *ServiceMgr) NotifyLeaderChange(ctx context.Context, leader uint64, host string)

func (*ServiceMgr) SetModuleName

func (s *ServiceMgr) SetModuleName(name string)

Jump to

Keyboard shortcuts

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