Documentation
¶
Index ¶
- func DefaultWait()
- func Start(app App)
- type Api
- type App
- type Master
- func (app *Master) GetApi() (api *Api)
- func (app *Master) GetMasterService() (masterSvc interfaces.NodeMasterService)
- func (app *Master) Init()
- func (app *Master) SetGrpcAddress(address interfaces.Address)
- func (app *Master) SetRunOnMaster(ok bool)
- func (app *Master) Start()
- func (app *Master) Stop()
- func (app *Master) Wait()
- type MasterApp
- type MasterOption
- type NodeApp
- type Worker
- type WorkerApp
- type WorkerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultWait ¶
func DefaultWait()
Types ¶
type Api ¶
type Api struct {
// dependencies
interfaces.WithConfigPath
// contains filtered or unexported fields
}
func (*Api) GetGinEngine ¶
func (*Api) GetHttpServer ¶
type Master ¶
type Master struct {
// dependencies
interfaces.WithConfigPath
// contains filtered or unexported fields
}
func (*Master) GetMasterService ¶
func (app *Master) GetMasterService() (masterSvc interfaces.NodeMasterService)
func (*Master) SetGrpcAddress ¶
func (app *Master) SetGrpcAddress(address interfaces.Address)
func (*Master) SetRunOnMaster ¶
type MasterApp ¶
type MasterApp interface {
NodeApp
SetRunOnMaster(ok bool)
GetApi() (api *Api)
GetMasterService() (masterSvc interfaces.NodeMasterService)
}
func GetMaster ¶
func GetMaster(opts ...MasterOption) MasterApp
func NewMaster ¶
func NewMaster(opts ...MasterOption) (app MasterApp)
type MasterOption ¶
type MasterOption func(app MasterApp)
func WithMasterConfigPath ¶
func WithMasterConfigPath(path string) MasterOption
func WithMasterGrpcAddress ¶
func WithMasterGrpcAddress(address interfaces.Address) MasterOption
func WithRunOnMaster ¶
func WithRunOnMaster(ok bool) MasterOption
type NodeApp ¶
type NodeApp interface {
App
interfaces.WithConfigPath
SetGrpcAddress(address interfaces.Address)
}
type Worker ¶
type Worker struct {
// dependencies
interfaces.WithConfigPath
// contains filtered or unexported fields
}
func NewWorker ¶
func NewWorker(opts ...WorkerOption) (app *Worker)
func (*Worker) SetGrpcAddress ¶
func (app *Worker) SetGrpcAddress(address interfaces.Address)
type WorkerOption ¶
type WorkerOption func(app WorkerApp)
func WithWorkerConfigPath ¶
func WithWorkerConfigPath(path string) WorkerOption
func WithWorkerGrpcAddress ¶
func WithWorkerGrpcAddress(address interfaces.Address) WorkerOption
Click to show internal directories.
Click to hide internal directories.