Version: v0.3.1 Latest Latest

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

Go to latest
Published: Oct 6, 2022 License: Apache-2.0 Imports: 4 Imported by: 40



Package mdb implements a simple in-memory Machine DataBase.



This section is empty.


This section is empty.


This section is empty.


type AwsMetadata

type AwsMetadata struct {
	AccountId   string
	AccountName string
	InstanceId  string
	Region      string
	Tags        tags.Tags

type Machine

type Machine struct {
	Hostname       string
	IpAddress      string       `json:",omitempty"`
	RequiredImage  string       `json:",omitempty"`
	PlannedImage   string       `json:",omitempty"`
	DisableUpdates bool         `json:",omitempty"`
	OwnerGroup     string       `json:",omitempty"`
	Tags           tags.Tags    `json:",omitempty"`
	AwsMetadata    *AwsMetadata `json:",omitempty"`

Machine describes a single machine with a unique Hostname and optional metadata about the machine.

func (Machine) Compare

func (left Machine) Compare(right Machine) bool

func (*Machine) UpdateFrom

func (dest *Machine) UpdateFrom(source Machine)

UpdateFrom updates dest with data from source.

type Mdb

type Mdb struct {
	Machines []Machine

Mdb describes a list of Machines. It implements sort.Interface.

func (*Mdb) DebugWrite

func (mdb *Mdb) DebugWrite(w io.Writer) error

DebugWrite writes the JSON representation to w.

func (*Mdb) Len

func (mdb *Mdb) Len() int

Len returns the number of machines.

func (*Mdb) Less

func (mdb *Mdb) Less(left, right int) bool

Less compares the hostnames of left and right.

func (*Mdb) Swap

func (mdb *Mdb) Swap(left, right int)

Swap swaps two entries in mdb.


Path Synopsis
Package mdbd implements a simple MDB watcher.
Package mdbd implements a simple MDB watcher.

Jump to

Keyboard shortcuts

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