dataaccess

package
v0.0.0-...-55a407e Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Backend               string
	Users                 map[string]objects.User
	Scripts               map[string]objects.Script
	SyncGetInventoryMutex sync.Mutex
)
View Source
var (
	Overwrites map[string]objects.Overwrite
)

Functions

func AddJob

func AddJob(server objects.Server) error

func CheckScriptPath

func CheckScriptPath(path string) error

func CompleteJob

func CompleteJob(workerID string, jobID string) error

func EnrollServer

func EnrollServer(server objects.Server) error

func GetFilteredServersList

func GetFilteredServersList(groups []string, properties map[string]string) ([]objects.Server, error)

func GetJob

func GetJob(workerID string) (job objects.Job, err error)

func GetJobQueueLength

func GetJobQueueLength() float64

func GetRunningJobInfo

func GetRunningJobInfo(jobID string) objects.Job

func GetServer

func GetServer(serverID string) (server objects.Server, err error)

func GetServerCount

func GetServerCount() float64

func GetServers

func GetServers() ([]objects.Server, error)

func GetStatus

func GetStatus(serverID string) (inQueue bool, active bool, workerID string)

func GetWorkingQueueLength

func GetWorkingQueueLength() float64

func Initialize

func Initialize(backend string)

func InitializeAuthentication

func InitializeAuthentication()

func InitializeQueue

func InitializeQueue()

func IsServerActive

func IsServerActive(server objects.Server) bool

func IsServerIDActive

func IsServerIDActive(serverID string) bool

func LoadAuthentication

func LoadAuthentication() error

func LoadOverwrites

func LoadOverwrites() error

func LoadScripts

func LoadScripts() error

func RemoveServer

func RemoveServer(serverID string) error

func RunScript

func RunScript(scriptPath string, server objects.Server, scriptID string, timeout int) error

func SaveOverwrites

func SaveOverwrites() error

func ServerExist

func ServerExist(server objects.Server) bool

func StopJob

func StopJob(job objects.Job) error

func StopJobID

func StopJobID(jobID string) error

func UpdateServer

func UpdateServer(server objects.Server) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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