system

package
v0.4.1-beta.7 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2025 License: MIT Imports: 39 Imported by: 0

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

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

func (s *DefaultService) Install(ctx context.Context, version string) (string, 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

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

func NewExecutor(logger *shared.Logger, handler http.Handler) *Executor

NewExecutor creates a task executor that uses the web server's routes.

func (*Executor) Execute

func (e *Executor) Execute(ctx context.Context, task *tasks.Task) *tasks.Result

Execute runs a task by converting it to an HTTP request and routing it internally.

type Syncer

type Syncer struct {
	// contains filtered or unexported fields
}

func NewSyncer

func NewSyncer(cfg *shared.Config, logger *shared.Logger, inst store.InstanceStore, results store.TaskResultStore, handler http.Handler) *Syncer

func (*Syncer) Start

func (s *Syncer) Start(ctx context.Context)

Jump to

Keyboard shortcuts

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