no idea the right way to do this
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
2eff11bb21
commit
7cff6fef31
|
@ -3,6 +3,10 @@ package virtbuf;
|
||||||
|
|
||||||
import "google/protobuf/any.proto";
|
import "google/protobuf/any.proto";
|
||||||
|
|
||||||
|
message Droplets {
|
||||||
|
repeated Droplet droplets = 1;
|
||||||
|
}
|
||||||
|
|
||||||
message Droplet {
|
message Droplet {
|
||||||
string uuid = 1;
|
string uuid = 1;
|
||||||
string name = 2;
|
string name = 2;
|
||||||
|
|
|
@ -46,6 +46,10 @@ func (c *Cluster) FormatTEXT() string {
|
||||||
return prototext.Format(c)
|
return prototext.Format(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (d *Droplets) FormatTEXT() string {
|
||||||
|
return prototext.Format(d)
|
||||||
|
}
|
||||||
|
|
||||||
func (c *Cluster) FindDroplet(name string) *Droplet {
|
func (c *Cluster) FindDroplet(name string) *Droplet {
|
||||||
for _, d := range c.Droplets {
|
for _, d := range c.Droplets {
|
||||||
if d.Hostname == name {
|
if d.Hostname == name {
|
||||||
|
|
Loading…
Reference in New Issue