Documentation
¶
Overview ¶
Package system implements the daemon's system service: sync, install/upgrade, registration, and health. Internal-only; external code should use pkg/core/system. Concrete system service implementations are in internal/system.
Index ¶
- type DefaultService
- func (s *DefaultService) GetInfo(ctx context.Context) (utils.SystemInfo, error)
- func (s *DefaultService) GetMode(ctx context.Context) (system.ModeStatus, error)
- func (s *DefaultService) GetTasks(ctx context.Context, status string) (system.TaskSummary, error)
- func (s *DefaultService) Install(ctx context.Context, version string) (string, error)
- func (s *DefaultService) IsRegistered(ctx context.Context) (system.RegistrationStatus, error)
- func (s *DefaultService) RegisterInstance(ctx context.Context, req system.RegisterInstanceRequest) error
- func (s *DefaultService) RequestDomain(ctx context.Context, req system.RequestDomainRequest) (string, error)
- func (s *DefaultService) RunDoctor(ctx context.Context) (string, error)
- func (s *DefaultService) SetMode(ctx context.Context, req system.SetModeRequest) (system.ModeStatus, error)
- func (s *DefaultService) SystemStatus(ctx context.Context) (system.SystemStatus, error)
- func (s *DefaultService) UpdateBootstrapToken(ctx context.Context, req system.UpdateBootstrapTokenRequest) error
- type Executor
- type Syncer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultService ¶
type DefaultService struct {
// contains filtered or unexported fields
}
func NewDefaultService ¶
func NewDefaultService(cfg *shared.Config, store store.InstanceStore, results store.TaskResultStore) *DefaultService
func (*DefaultService) GetInfo ¶
func (s *DefaultService) GetInfo(ctx context.Context) (utils.SystemInfo, error)
func (*DefaultService) GetMode ¶
func (s *DefaultService) GetMode(ctx context.Context) (system.ModeStatus, error)
GetMode returns the current daemon mode.
func (*DefaultService) GetTasks ¶
func (s *DefaultService) GetTasks(ctx context.Context, status string) (system.TaskSummary, error)
func (*DefaultService) IsRegistered ¶
func (s *DefaultService) IsRegistered(ctx context.Context) (system.RegistrationStatus, error)
func (*DefaultService) RegisterInstance ¶
func (s *DefaultService) RegisterInstance(ctx context.Context, req system.RegisterInstanceRequest) error
func (*DefaultService) RequestDomain ¶
func (s *DefaultService) RequestDomain(ctx context.Context, req system.RequestDomainRequest) (string, error)
During the installation process, this method is used to register the instance with the base, used for routing traffic to this instance instead of directly hitting it. This is to ensure HTTPS traffic is enforced on dployr instance. Please refer to the documentation at https://docs.dployr.dev/installation for more details.
func (*DefaultService) RunDoctor ¶
func (s *DefaultService) RunDoctor(ctx context.Context) (string, error)
func (*DefaultService) SetMode ¶
func (s *DefaultService) SetMode(ctx context.Context, req system.SetModeRequest) (system.ModeStatus, error)
SetMode updates the daemon mode.
func (*DefaultService) SystemStatus ¶
func (s *DefaultService) SystemStatus(ctx context.Context) (system.SystemStatus, error)
func (*DefaultService) UpdateBootstrapToken ¶
func (s *DefaultService) UpdateBootstrapToken(ctx context.Context, req system.UpdateBootstrapTokenRequest) error
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
Executor runs tasks by routing them through existing HTTP handlers.
func NewExecutor ¶
NewExecutor creates a task executor that uses the web server's routes.