Documentation ¶
Overview ¶
Package wrappers is used to generate wrappers and service units and also desktop files for snap applications.
Index ¶
- func AddSnapBinaries(s *snap.Info) (err error)
- func AddSnapDBusActivationFiles(s *snap.Info) error
- func AddSnapDesktopFiles(s *snap.Info) (err error)
- func AddSnapIcons(s *snap.Info) error
- func AddSnapServices(s *snap.Info, opts *AddSnapServicesOptions, inter interacter) (err error)
- func AddSnapdSnapServices(s *snap.Info, inter interacter) error
- func DeriveSnapdDBusConfig(s *snap.Info) (sessionContent, systemContent map[string]osutil.FileState, err error)
- func QueryDisabledServices(info *snap.Info, pb progress.Meter) ([]string, error)
- func RemoveSnapBinaries(s *snap.Info) error
- func RemoveSnapDBusActivationFiles(s *snap.Info) error
- func RemoveSnapDesktopFiles(s *snap.Info) error
- func RemoveSnapIcons(s *snap.Info) error
- func RemoveSnapServices(s *snap.Info, inter interacter) error
- func RemoveSnapdSnapServicesOnCore(s *snap.Info, inter interacter) error
- func RestartServices(svcs []*snap.AppInfo, flags *RestartServicesFlags, inter interacter, ...) error
- func ServicesEnableState(s *snap.Info, inter interacter) (map[string]bool, error)
- func StartServices(apps []*snap.AppInfo, disabledSvcs []string, flags *StartServicesFlags, ...) (err error)
- func StopServices(apps []*snap.AppInfo, flags *StopServicesFlags, reason snap.ServiceStopReason, ...) error
- type AddSnapServicesOptions
- type RestartServicesFlags
- type StartServicesFlags
- type StopServicesFlags
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddSnapBinaries ¶
AddSnapBinaries writes the wrapper binaries for the applications from the snap which aren't services.
func AddSnapDesktopFiles ¶
AddSnapDesktopFiles puts in place the desktop files for the applications from the snap.
func AddSnapIcons ¶
func AddSnapServices ¶
func AddSnapServices(s *snap.Info, opts *AddSnapServicesOptions, inter interacter) (err error)
AddSnapServices adds service units for the applications from the snap which are services. Services do not get enabled nor started.
func AddSnapdSnapServices ¶
AddSnapdSnapServices sets up the services based on a given snapd snap in the system.
func DeriveSnapdDBusConfig ¶
func QueryDisabledServices ¶
QueryDisabledServices returns a list of all currently disabled snap services in the snap.
func RemoveSnapBinaries ¶
RemoveSnapBinaries removes the wrapper binaries for the applications from the snap which aren't services from.
func RemoveSnapDesktopFiles ¶
RemoveSnapDesktopFiles removes the added desktop files for the applications in the snap.
func RemoveSnapIcons ¶
func RemoveSnapServices ¶
RemoveSnapServices disables and removes service units for the applications from the snap which are services. The optional flag indicates whether services are removed as part of undoing of first install of a given snap.
func RemoveSnapdSnapServicesOnCore ¶
RemoveSnapdSnapServicesOnCore removes the snapd services generated by a prior call to AddSnapdSnapServices. The core snap is used as the reference for restoring the system state, making this undo helper suitable for use when reverting the first installation of the snapd snap on a core device.
func RestartServices ¶
func RestartServices(svcs []*snap.AppInfo, flags *RestartServicesFlags, inter interacter, tm timings.Measurer) error
Restart or reload services; if reload flag is set then "systemctl reload-or-restart" is attempted.
func ServicesEnableState ¶
ServicesEnableState returns a map of service names from the given snap, together with their enable/disable status.
func StartServices ¶
func StartServices(apps []*snap.AppInfo, disabledSvcs []string, flags *StartServicesFlags, inter interacter, tm timings.Measurer) (err error)
StartServices starts service units for the applications from the snap which are services. Service units will be started in the order provided by the caller.
func StopServices ¶
func StopServices(apps []*snap.AppInfo, flags *StopServicesFlags, reason snap.ServiceStopReason, inter interacter, tm timings.Measurer) error
StopServices stops and optionally disables service units for the applications from the snap which are services.
Types ¶
type AddSnapServicesOptions ¶
type RestartServicesFlags ¶
type RestartServicesFlags struct {
Reload bool
}
type StartServicesFlags ¶
type StartServicesFlags struct {
Enable bool
}
StartServicesFlags carries extra flags for StartServices.
type StopServicesFlags ¶
type StopServicesFlags struct {
Disable bool
}
StopServicesFlags carries extra flags for StopServices.