Documentation ¶
Index ¶
- func NewMasterService(opts ...Option) (res interfaces.NodeMasterService, err error)
- func ProvideMasterService(path string, opts ...Option) func() (interfaces.NodeMasterService, error)
- func ProvideWorkerService(path string, opts ...Option) func() (interfaces.NodeWorkerService, error)
- type MasterService
- func (svc *MasterService) GetAddress() (address interfaces.Address)
- func (svc *MasterService) GetConfigPath() (path string)
- func (svc *MasterService) GetConfigService() (cfgSvc interfaces.NodeConfigService)
- func (svc *MasterService) GetServer() (svr interfaces.GrpcServer)
- func (svc *MasterService) Init() (err error)
- func (svc *MasterService) Monitor()
- func (svc *MasterService) Register() (err error)
- func (svc *MasterService) SetAddress(address interfaces.Address)
- func (svc *MasterService) SetConfigPath(path string)
- func (svc *MasterService) SetMonitorInterval(duration time.Duration)
- func (svc *MasterService) Start()
- func (svc *MasterService) Stop()
- func (svc *MasterService) StopOnError()
- func (svc *MasterService) Wait()
- type Option
- type WorkerService
- func (svc *WorkerService) GetAddress() (address interfaces.Address)
- func (svc *WorkerService) GetConfigPath() (path string)
- func (svc *WorkerService) GetConfigService() (cfgSvc interfaces.NodeConfigService)
- func (svc *WorkerService) Init() (err error)
- func (svc *WorkerService) Recv()
- func (svc *WorkerService) Register()
- func (svc *WorkerService) ReportStatus()
- func (svc *WorkerService) SetAddress(address interfaces.Address)
- func (svc *WorkerService) SetConfigPath(path string)
- func (svc *WorkerService) SetHeartbeatInterval(duration time.Duration)
- func (svc *WorkerService) Start()
- func (svc *WorkerService) Stop()
- func (svc *WorkerService) Wait()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMasterService ¶
func NewMasterService(opts ...Option) (res interfaces.NodeMasterService, err error)
func ProvideMasterService ¶
func ProvideMasterService(path string, opts ...Option) func() (interfaces.NodeMasterService, error)
func ProvideWorkerService ¶
func ProvideWorkerService(path string, opts ...Option) func() (interfaces.NodeWorkerService, error)
Types ¶
type MasterService ¶
type MasterService struct {
// contains filtered or unexported fields
}
func (*MasterService) GetAddress ¶
func (svc *MasterService) GetAddress() (address interfaces.Address)
func (*MasterService) GetConfigPath ¶
func (svc *MasterService) GetConfigPath() (path string)
func (*MasterService) GetConfigService ¶
func (svc *MasterService) GetConfigService() (cfgSvc interfaces.NodeConfigService)
func (*MasterService) GetServer ¶
func (svc *MasterService) GetServer() (svr interfaces.GrpcServer)
func (*MasterService) Init ¶
func (svc *MasterService) Init() (err error)
func (*MasterService) Monitor ¶
func (svc *MasterService) Monitor()
func (*MasterService) Register ¶
func (svc *MasterService) Register() (err error)
func (*MasterService) SetAddress ¶
func (svc *MasterService) SetAddress(address interfaces.Address)
func (*MasterService) SetConfigPath ¶
func (svc *MasterService) SetConfigPath(path string)
func (*MasterService) SetMonitorInterval ¶
func (svc *MasterService) SetMonitorInterval(duration time.Duration)
func (*MasterService) Start ¶
func (svc *MasterService) Start()
func (*MasterService) Stop ¶
func (svc *MasterService) Stop()
func (*MasterService) StopOnError ¶
func (svc *MasterService) StopOnError()
func (*MasterService) Wait ¶
func (svc *MasterService) Wait()
type Option ¶
type Option func(svc interfaces.NodeService)
func WithAddress ¶
func WithAddress(address interfaces.Address) Option
func WithConfigPath ¶
func WithHeartbeatInterval ¶
func WithMonitorInterval ¶
func WithStopOnError ¶
func WithStopOnError() Option
type WorkerService ¶
type WorkerService struct {
// contains filtered or unexported fields
}
func NewWorkerService ¶
func NewWorkerService(opts ...Option) (res *WorkerService, err error)
func (*WorkerService) GetAddress ¶
func (svc *WorkerService) GetAddress() (address interfaces.Address)
func (*WorkerService) GetConfigPath ¶
func (svc *WorkerService) GetConfigPath() (path string)
func (*WorkerService) GetConfigService ¶
func (svc *WorkerService) GetConfigService() (cfgSvc interfaces.NodeConfigService)
func (*WorkerService) Init ¶
func (svc *WorkerService) Init() (err error)
func (*WorkerService) Recv ¶
func (svc *WorkerService) Recv()
func (*WorkerService) Register ¶
func (svc *WorkerService) Register()
func (*WorkerService) ReportStatus ¶
func (svc *WorkerService) ReportStatus()
func (*WorkerService) SetAddress ¶
func (svc *WorkerService) SetAddress(address interfaces.Address)
func (*WorkerService) SetConfigPath ¶
func (svc *WorkerService) SetConfigPath(path string)
func (*WorkerService) SetHeartbeatInterval ¶
func (svc *WorkerService) SetHeartbeatInterval(duration time.Duration)
func (*WorkerService) Start ¶
func (svc *WorkerService) Start()
func (*WorkerService) Stop ¶
func (svc *WorkerService) Stop()
func (*WorkerService) Wait ¶
func (svc *WorkerService) Wait()
Click to show internal directories.
Click to hide internal directories.