dronecfg

package
v0.0.0-...-e560ebb Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package dronecfg implements datastore access for storing drone configs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeDutsToDrones

func MergeDutsToDrones(ctx context.Context, dronesToAddDut []Entity, dronesToRemoveDut []Entity) error

MergeDutsToDrones merge the drone config with the newly added DUTs and/or DUTs to be removed.

func QueenDroneName

func QueenDroneName(env string) string

QueenDroneName returns the name of the fake drone whose DUTs should be pushed to the drone queen service.

func SyncDeviceList

func SyncDeviceList(ctx context.Context, droneQueenName string) error

SyncDeviceList sync the device list of the drone config with the device data from the inventory.

Types

type DUT

type DUT struct {
	ID       string
	Hostname string
}

DUT describes a DUT for the purpose of a drone config.

type Entity

type Entity struct {
	Hostname string `gae:"$id"`
	DUTs     []DUT  `gae:",noindex"`
	// contains filtered or unexported fields
}

Entity is a drone config datastore entity.

func Get

func Get(ctx context.Context, hostname string) (Entity, error)

Get gets a drone config from datastore by hostname.

Jump to

Keyboard shortcuts

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