kernel

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2026 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const DBusInterface = "org.altlinux.APM.kernel"

Variables

This section is empty.

Functions

func CommandList

func CommandList(appConfig *app.Config, reporter *reply.Reporter) *cli.Command

func DBusFactory

func DBusFactory(appConfig *app.Config, reporter *reply.Reporter) service.DBusModule

Types

type Actions

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

Actions объединяет методы для выполнения системных действий.

func NewActions

func NewActions(appConfig *app.Config, reporter *reply.Reporter) *Actions

NewActions создаёт новый экземпляр Actions.

func (*Actions) CleanOldKernels

func (a *Actions) CleanOldKernels(ctx context.Context, noBackup bool, dryRun bool) (*CleanOldKernelsResponse, error)

CleanOldKernels удаляет старые ядра

func (*Actions) GenerateOnlineDoc

func (a *Actions) GenerateOnlineDoc(ctx context.Context) error

GenerateOnlineDoc запускает веб-сервер с HTML документацией для DBus API

func (*Actions) GetCurrentKernel

func (a *Actions) GetCurrentKernel(ctx context.Context) (*GetCurrentKernelResponse, error)

GetCurrentKernel возвращает информацию о текущем ядре

func (*Actions) InstallKernel

func (a *Actions) InstallKernel(ctx context.Context, flavour string, modules []string, includeHeaders bool, dryRun bool) (*InstallUpdateKernelResponse, error)

InstallKernel устанавливает ядро с указанным flavour

func (*Actions) InstallKernelModules

func (a *Actions) InstallKernelModules(ctx context.Context, flavour string,
	modules []string, dryRun bool) (*InstallKernelModulesResponse, error)

InstallKernelModules устанавливает модули ядра

func (*Actions) ListKernelModules

func (a *Actions) ListKernelModules(ctx context.Context, flavour string) (*ListKernelModulesResponse, error)

ListKernelModules возвращает список модулей для ядра

func (*Actions) ListKernels

func (a *Actions) ListKernels(ctx context.Context, flavour string, installedOnly bool) (*ListKernelsResponse, error)

ListKernels возвращает список ядер

func (*Actions) RemoveKernelModules

func (a *Actions) RemoveKernelModules(ctx context.Context, flavour string,
	modules []string, dryRun bool) (*RemoveKernelModulesResponse, error)

RemoveKernelModules удаляет модули ядра

func (*Actions) UpdateKernel

func (a *Actions) UpdateKernel(ctx context.Context, flavour string, modules []string, includeHeaders bool, dryRun bool) (*InstallUpdateKernelResponse, error)

UpdateKernel обновляет ядро до последней версии

type BackgroundTaskResponse

type BackgroundTaskResponse struct {
	Message     string `json:"message"`
	Transaction string `json:"transaction"`
}

BackgroundTaskResponse структура ответа при запуске фоновой задачи

type CleanOldKernelsResponse

type CleanOldKernelsResponse struct {
	Message       string                 `json:"message"`
	RemoveKernels []service.Info         `json:"removeKernels"`
	KeptKernels   []WithReasons          `json:"keptKernels"`
	Preview       *aptlib.PackageChanges `json:"preview,omitempty"`
}

CleanOldKernelsResponse структура ответа для CleanOldKernels метода

type DBusWrapper

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

DBusWrapper предоставляет обёртку для действий с ядрами через DBus.

func NewDBusWrapper

func NewDBusWrapper(a *Actions, c *dbus.Conn, ctx context.Context) *DBusWrapper

NewDBusWrapper создаёт новую обёртку над actions.

func (*DBusWrapper) CheckCleanOldKernels

func (w *DBusWrapper) CheckCleanOldKernels(sender dbus.Sender, noBackup bool, transaction string, background bool) (string, *dbus.Error)

CheckCleanOldKernels проверяет возможность удаления старых ядер.

func (*DBusWrapper) CheckInstallKernel

func (w *DBusWrapper) CheckInstallKernel(sender dbus.Sender, flavour string, modules []string, includeHeaders bool, transaction string, background bool) (string, *dbus.Error)

CheckInstallKernel проверяет возможность установки ядра.

func (*DBusWrapper) CheckInstallKernelModules

func (w *DBusWrapper) CheckInstallKernelModules(sender dbus.Sender, flavour string, modules []string, transaction string, background bool) (string, *dbus.Error)

CheckInstallKernelModules проверяет возможность установки модулей ядра.

func (*DBusWrapper) CheckRemoveKernelModules

func (w *DBusWrapper) CheckRemoveKernelModules(sender dbus.Sender, flavour string, modules []string, transaction string, background bool) (string, *dbus.Error)

CheckRemoveKernelModules проверяет возможность удаления модулей ядра.

func (*DBusWrapper) CheckUpdateKernel

func (w *DBusWrapper) CheckUpdateKernel(sender dbus.Sender, flavour string, modules []string, includeHeaders bool, transaction string, background bool) (string, *dbus.Error)

CheckUpdateKernel проверяет возможность обновления ядра.

func (*DBusWrapper) CleanOldKernels

func (w *DBusWrapper) CleanOldKernels(sender dbus.Sender, noBackup bool, transaction string, background bool) (string, *dbus.Error)

CleanOldKernels удаляет старые ядра.

func (*DBusWrapper) GetCurrentKernel

func (w *DBusWrapper) GetCurrentKernel(transaction string) (string, *dbus.Error)

GetCurrentKernel возвращает информацию о текущем ядре.

func (*DBusWrapper) InstallKernel

func (w *DBusWrapper) InstallKernel(sender dbus.Sender, flavour string, modules []string, includeHeaders bool, transaction string, background bool) (string, *dbus.Error)

InstallKernel устанавливает ядро.

func (*DBusWrapper) InstallKernelModules

func (w *DBusWrapper) InstallKernelModules(sender dbus.Sender, flavour string, modules []string, transaction string, background bool) (string, *dbus.Error)

InstallKernelModules устанавливает модули ядра.

func (*DBusWrapper) ListKernelModules

func (w *DBusWrapper) ListKernelModules(flavour string, transaction string) (string, *dbus.Error)

ListKernelModules возвращает список модулей ядра.

func (*DBusWrapper) ListKernels

func (w *DBusWrapper) ListKernels(flavour string, installedOnly bool, transaction string) (string, *dbus.Error)

ListKernels возвращает список доступных ядер.

func (*DBusWrapper) RemoveKernelModules

func (w *DBusWrapper) RemoveKernelModules(sender dbus.Sender, flavour string, modules []string, transaction string, background bool) (string, *dbus.Error)

RemoveKernelModules удаляет модули ядра.

func (*DBusWrapper) UpdateKernel

func (w *DBusWrapper) UpdateKernel(sender dbus.Sender, flavour string, modules []string, includeHeaders bool, transaction string, background bool) (string, *dbus.Error)

UpdateKernel обновляет ядро.

type GetCurrentKernelResponse

type GetCurrentKernelResponse struct {
	Message string                 `json:"message"`
	Kernel  service.FullKernelInfo `json:"kernel"`
}

GetCurrentKernelResponse структура ответа для GetCurrentKernel метода

type InstallKernelModulesResponse

type InstallKernelModulesResponse struct {
	Message string                 `json:"message"`
	Kernel  service.FullKernelInfo `json:"kernel"`
	Preview *aptlib.PackageChanges `json:"preview,omitempty"`
}

InstallKernelModulesResponse структура ответа для InstallKernelModules метода

type InstallUpdateKernelResponse

type InstallUpdateKernelResponse struct {
	Message string                  `json:"message"`
	Kernel  service.FullKernelInfo  `json:"kernel"`
	Preview *service.UpgradePreview `json:"preview,omitempty"`
}

InstallUpdateKernelResponse структура ответа для UpdateKernel/InstallKernel методов

type ListKernelModulesResponse

type ListKernelModulesResponse struct {
	Message string                 `json:"message"`
	Kernel  service.FullKernelInfo `json:"kernel"`
	Modules []service.ModuleInfo   `json:"modules"`
}

ListKernelModulesResponse структура ответа для ListKernelModules метода

type ListKernelsResponse

type ListKernelsResponse struct {
	Message string                   `json:"message"`
	Kernels []service.FullKernelInfo `json:"kernels"`
}

ListKernelsResponse структура ответа для ListKernels метода

type RemoveKernelModulesResponse

type RemoveKernelModulesResponse struct {
	Message string                 `json:"message"`
	Kernel  service.FullKernelInfo `json:"kernel"`
	Preview *aptlib.PackageChanges `json:"preview,omitempty"`
}

RemoveKernelModulesResponse структура ответа для RemoveKernelModules метода

type WithReasons

type WithReasons struct {
	Kernel  service.Info `json:"kernel"`
	Reasons []string     `json:"reasons"`
}

WithReasons ядро с причинами сохранения

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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