crosfleet

package
v0.0.0-...-9febfc8 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2025 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package crosfleet contains utilities for interfacing with crosfleet command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CrosfleetLeasedDUTs

func CrosfleetLeasedDUTs(ctx context.Context) ([]string, error)

CrosfleetLeasedDUTs will run the crosfleet cli and return a slice of strings for all DUTs that are actively leased by crosfleet. Will return an error if crosfleet cli is not installed or there is a problem parsing JSON output from crosfleet.

func DUTLeaseTimeRemainingSeconds

func DUTLeaseTimeRemainingSeconds(ctx context.Context, hostname string) (int, error)

DUTLeaseTimeRemainingSeconds uses the given context calls crosfleet and then calculates the remaining time on the lease for the DUT identified by hostname. Returns and int with time remaining (or 0 if lease has ended), and nil error if successful, otherwise returns 0 and an error if remaining lease time could not be determined.

Types

This section is empty.

Jump to

Keyboard shortcuts

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