Documentation ¶
Overview ¶
Package deploy implements deployment of binaries and services to a Constellation instance.
It is used by the debugd.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Download ¶
type Download struct {
// contains filtered or unexported fields
}
Download downloads a bootstrapper from a given debugd instance.
func New ¶
func New(log *slog.Logger, dialer NetDialer, serviceManager serviceManager, transfer fileTransferer, info infoSetter, ) *Download
New creates a new Download.
func (*Download) DownloadDeployment ¶
DownloadDeployment will open a new grpc connection to another instance, attempting to download files from that instance.
type NetDialer ¶
type NetDialer interface {
DialContext(ctx context.Context, network, address string) (net.Conn, error)
}
NetDialer can open a net.Conn.
type ServiceManager ¶
type ServiceManager struct {
// contains filtered or unexported fields
}
ServiceManager receives ServiceManagerRequests and units via channels and performs the requests / creates the unit files.
func NewServiceManager ¶
func NewServiceManager(log *slog.Logger) *ServiceManager
NewServiceManager creates a new ServiceManager.
func (*ServiceManager) OverrideServiceUnitExecStart ¶ added in v2.6.0
func (s *ServiceManager) OverrideServiceUnitExecStart(ctx context.Context, unitName, execStart string) error
OverrideServiceUnitExecStart will override the ExecStart of a systemd unit.
func (*ServiceManager) SystemdAction ¶
func (s *ServiceManager) SystemdAction(ctx context.Context, request ServiceManagerRequest) error
SystemdAction will perform a systemd action on a service unit (start, stop, restart, reload).
func (*ServiceManager) WriteSystemdUnitFile ¶
func (s *ServiceManager) WriteSystemdUnitFile(ctx context.Context, unit SystemdUnit) error
WriteSystemdUnitFile will write a systemd unit to disk.
type ServiceManagerRequest ¶
type ServiceManagerRequest struct { Unit string Action SystemdAction }
ServiceManagerRequest describes a requested ServiceManagerAction to be performed on a specified service unit.
type SystemdAction ¶
type SystemdAction uint32
SystemdAction encodes the available actions.
const ( // Unknown is the default SystemdAction and does nothing. Unknown SystemdAction = iota // Start a systemd service. Start // Stop a systemd service. Stop // Restart a systemd service. Restart // Reload a systemd service. Reload )
func (SystemdAction) String ¶
func (i SystemdAction) String() string
type SystemdUnit ¶
SystemdUnit describes a systemd service file including the unit name and contents.