system

package
v0.0.0-...-5efa5bd Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2017 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Info

func Info(host string, interval int) (i core.Info)

Info gathers information about the client and sends it to the server

func Init

func Init()

Init initializes the package manager for the operating system

func JobFinished

func JobFinished(send chan SendData, log string, err error)

JobFinished informs the server the current job has finished

func Pong

func Pong(send chan SendData)

Pong sends a 'pong' to the server

Types

type Commands

type Commands interface {
	SendUpdates(send chan SendData) (string, error)
	GetUpdates() ([]core.Package, string, error)
	Reboot() error
	Update() (string, error)
	Upgrade() (string, error)
	DistUpgrade() (string, error)
	AutoRemove() (string, error)
	Install(sw []string) (string, error)
}

Commands interface defines the default package manager and system commands

func GetCommands

func GetCommands() Commands

GetCommands returns the system specific commands

type SendData

type SendData struct {
	Type     string         `json:"type"`
	Packages []core.Package `json:"packages,omitempty"`
	OK       bool           `json:"ok,omitempty"`
	Log      string         `json:"log,omitempty"`
}

SendData is used for sending updates to the server

Jump to

Keyboard shortcuts

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