updates

package
v0.0.0-...-8fd811e Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AptPackageManager

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

func NewAptPackageManager

func NewAptPackageManager() *AptPackageManager

func (*AptPackageManager) GetUpdatesStatus

func (p *AptPackageManager) GetUpdatesStatus(ctx context.Context, logger *logger.Logger) (*models.UpdatesStatus, error)

func (*AptPackageManager) IsAvailable

func (p *AptPackageManager) IsAvailable(ctx context.Context) bool

type PackageManager

type PackageManager interface {
	IsAvailable(context.Context) bool
	GetUpdatesStatus(context.Context, *logger.Logger) (*models.UpdatesStatus, error)
}

type Runner

type Runner interface {
	Run(context.Context, ...string) (string, error)
}

type RunnerImpl

type RunnerImpl struct{}

func (*RunnerImpl) Run

func (r *RunnerImpl) Run(ctx context.Context, args ...string) (string, error)

type Updates

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

func New

func New(logger *logger.Logger, interval time.Duration) *Updates

func (*Updates) Refresh

func (u *Updates) Refresh()

func (*Updates) SetConn

func (u *Updates) SetConn(c ssh.Conn)

func (*Updates) Start

func (u *Updates) Start(ctx context.Context)

func (*Updates) Stop

func (u *Updates) Stop()

type YumPackageManager

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

func NewYumPackageManager

func NewYumPackageManager() *YumPackageManager

func (*YumPackageManager) GetUpdatesStatus

func (p *YumPackageManager) GetUpdatesStatus(ctx context.Context, logger *logger.Logger) (*models.UpdatesStatus, error)

func (*YumPackageManager) IsAvailable

func (p *YumPackageManager) IsAvailable(ctx context.Context) bool

type ZypperPackageManager

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

func NewZypperPackageManager

func NewZypperPackageManager() *ZypperPackageManager

func (*ZypperPackageManager) GetUpdatesStatus

func (p *ZypperPackageManager) GetUpdatesStatus(ctx context.Context, logger *logger.Logger) (*models.UpdatesStatus, error)

func (*ZypperPackageManager) IsAvailable

func (p *ZypperPackageManager) IsAvailable(ctx context.Context) bool

Jump to

Keyboard shortcuts

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