service

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: BSD-3-Clause Imports: 26 Imported by: 0

Documentation

Index

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 WithConfigPath(path string) Option

func WithHeartbeatInterval

func WithHeartbeatInterval(duration time.Duration) Option

func WithMonitorInterval

func WithMonitorInterval(duration time.Duration) Option

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

Jump to

Keyboard shortcuts

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