working on droplet start event
This commit is contained in:
parent
a07033d181
commit
814d36b9c9
4
add.go
4
add.go
|
@ -61,6 +61,10 @@ func (c *OldCluster) FindDropletByName(name string) *Droplet {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (c *OldCluster) FindDropletByUuid(id string) *Droplet {
|
||||
return c.d.FindByUuid(id)
|
||||
}
|
||||
|
||||
func (c *OldCluster) FindHypervisorByName(name string) *Hypervisor {
|
||||
for _, h := range c.H.Hypervisors {
|
||||
if h.Hostname == name {
|
||||
|
|
10
event.proto
10
event.proto
|
@ -18,7 +18,12 @@ message Events { // `autogenpb:marsh
|
|||
// at least for now in the early days. but maybe forever.
|
||||
// homelab clouds normally don't have many events.
|
||||
// we are talking less than 1 a minute. even 1 an hour is often a lot
|
||||
message Event {
|
||||
message Event { // `autogenpb:marshal`
|
||||
enum status {
|
||||
DONE = 0;
|
||||
FAIL = 1;
|
||||
RUNNING = 2;
|
||||
}
|
||||
int32 id = 1; // `autogenpb:unique` // should be unique across the cluster
|
||||
EventType etype = 2;
|
||||
string droplet = 3; // name of the droplet
|
||||
|
@ -32,8 +37,9 @@ message Event {
|
|||
string newVal = 11; // new value
|
||||
google.protobuf.Any origAny = 12; // anypb format. probably overkill
|
||||
google.protobuf.Any newAny = 13; // anypb format
|
||||
string error = 14; // what went wrong
|
||||
status state = 15; // state of the event
|
||||
}
|
||||
|
||||
enum EventType {
|
||||
ADD = 0;
|
||||
DELETE = 1;
|
||||
|
|
Loading…
Reference in New Issue