models

package
v0.0.0-...-96838bd Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface struct {
	Id      string   `json:"id" bson:"_id"`
	Name    string   `json:"name" bson:"name"`
	Mac     string   `json:"mac" bson:"mac"`
	IpAddrs []IpAddr `json:"addrs" bson:"ip_addrs"`
}

type IpAddr

type IpAddr struct {
	Type   int32  `json:"type" bson:"type"`
	Addr   string `json:"addr" bson:"addr"`
	Prefix uint32 `json:"prefix" bson:"prefix"`
}

type Machine

type Machine struct {
	Id         string      `json:"id" bson:"_id"`
	Name       string      `json:"name" bson:"name"`
	Groups     []string    `json:"groups" bson:"groups"`
	NodeId     string      `json:"node_id", bson:"node_id"`
	Hostname   string      `json:"hostname" bson:"hostname"`
	Interfaces []Interface `json:"interfaces" bson:"interfaces"`
}

type Node

type Node struct {
	Id       string `json:"id" bson:"_id"`
	Hostname string `json:"hostname" bson"hostname"`
}

type Task

type Task struct {
	Id string `json:"id" bson:"_id"`

	// The id of the node supposed to perform this task.
	NodeId string `json:"node_id" bson:"node_id"`

	Name   string     `json:"name" bson:"name"`
	Status TaskStatus `json:"status" bson:"status"`
}

type TaskStatus

type TaskStatus int64
const (
	Pending TaskStatus = iota
	Finished
	Failed
)

Jump to

Keyboard shortcuts

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