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.

                Source Files