saltrequester

package module
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: GPL-3.0 Imports: 7 Imported by: 1

README

salt-updater

salt-updater runs a dbus service to make salt calls. By default salt automatic updates will be turned on and will run RPI boot

salt-updater has the go library saltrequester to help making salt calls through go.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAutoUpdateOn added in v0.4.0

func IsAutoUpdateOn() (bool, error)

func IsRunning

func IsRunning() (bool, error)

IsRunning will return true if a salt update is running

func RunPing

func RunPing() error

RunPing will ping the salt server if a salt call is not already running

func RunUpdate

func RunUpdate() error

RunUpdate will run a salt update if one is not already running

func SetAutoUpdate added in v0.4.0

func SetAutoUpdate(autoUpdate bool) error

func WriteStateFile added in v0.7.0

func WriteStateFile(saltState *SaltState) error

possibly need file locks??

Types

type SaltState

type SaltState struct {
	RunningUpdate     bool
	RunningArgs       []string
	LastCallOut       string
	LastCallSuccess   bool
	LastCallNodegroup string
	LastCallArgs      []string
	LastUpdate        time.Time
}

SaltState holds info of the current state of salt

func ReadStateFile added in v0.7.0

func ReadStateFile() (*SaltState, error)

func RunPingSync added in v0.2.0

func RunPingSync() (*SaltState, error)

RunPingSync will make a synchronous ping call to the server

func State

func State() (*SaltState, error)

State will return the state of the salt update

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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