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: 4 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 Update

func Update(ctx context.Context, entities []Entity) error

Update updates drone configs in datastore. This update happens atomically, as the entire set of drone configs should be consistent so a DUT doesn't get assigned to two drones. The ConfigSet field on the entities passed in may be modified.

Types

type DUT

type DUT struct {
	ID       string
	Hostname string
}

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

type Entity

type Entity struct {
	Hostname  string         `gae:"$id"`
	ConfigSet *datastore.Key `gae:"$parent"`
	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