Documentation ¶
Index ¶
- Variables
- func NewNodeConfigService(opts ...Option) (svc2 interfaces.NodeConfigService, err error)
- func ProvideConfigService(path string) func() (interfaces.NodeConfigService, error)
- type Config
- type Option
- type Options
- type Service
- func (svc *Service) GetAuthKey() (res string)
- func (svc *Service) GetBasicNodeInfo() (res interfaces.Entity)
- func (svc *Service) GetConfigPath() (path string)
- func (svc *Service) GetMaxRunners() (res int)
- func (svc *Service) GetNodeKey() (res string)
- func (svc *Service) GetNodeName() (res string)
- func (svc *Service) Init() (err error)
- func (svc *Service) IsMaster() (res bool)
- func (svc *Service) Reload() (err error)
- func (svc *Service) SetConfigPath(path string)
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfigOptions = &Options{ Key: utils.NewUUIDString(), IsMaster: utils.IsMaster(), AuthKey: constants.DefaultGrpcAuthKey, MaxRunners: 0, }
View Source
var DefaultMaxRunner = 8
Functions ¶
func NewNodeConfigService ¶
func NewNodeConfigService(opts ...Option) (svc2 interfaces.NodeConfigService, err error)
func ProvideConfigService ¶
func ProvideConfigService(path string) func() (interfaces.NodeConfigService, error)
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) GetAuthKey ¶
func (*Service) GetBasicNodeInfo ¶
func (svc *Service) GetBasicNodeInfo() (res interfaces.Entity)
func (*Service) GetConfigPath ¶
func (*Service) GetMaxRunners ¶
func (*Service) GetNodeKey ¶
func (*Service) GetNodeName ¶
func (*Service) SetConfigPath ¶
Click to show internal directories.
Click to hide internal directories.