github.com/Cloud-Foundations/Dominator@v0.3.4/proto/dominator/messages.go (about) 1 package dominator 2 3 import ( 4 "time" 5 6 "github.com/Cloud-Foundations/Dominator/lib/mdb" 7 "github.com/Cloud-Foundations/Dominator/lib/tags" 8 "github.com/Cloud-Foundations/Dominator/proto/sub" 9 ) 10 11 type ClearSafetyShutoffRequest struct { 12 Hostname string 13 } 14 15 type ClearSafetyShutoffResponse struct{} 16 17 type ConfigureSubsRequest sub.Configuration 18 19 type ConfigureSubsResponse struct{} 20 21 type DisableUpdatesRequest struct { 22 Reason string 23 } 24 25 type DisableUpdatesResponse struct{} 26 27 type EnableUpdatesRequest struct { 28 Reason string 29 } 30 31 type EnableUpdatesResponse struct{} 32 33 type ForceDisruptiveUpdateRequest struct { 34 Hostname string 35 } 36 37 type ForceDisruptiveUpdateResponse struct{} 38 39 type GetDefaultImageRequest struct{} 40 41 type GetDefaultImageResponse struct { 42 ImageName string 43 } 44 45 type GetSubsConfigurationRequest struct{} 46 47 type GetSubsConfigurationResponse sub.Configuration 48 49 type GetInfoForSubsRequest struct { 50 Hostnames []string // Empty: match all hostnames. 51 LocationsToMatch []string // Empty: match all locations. 52 StatusesToMatch []string // Empty: match all statuses. 53 TagsToMatch tags.MatchTags // Empty: match all tags. 54 } 55 56 type GetInfoForSubsResponse struct { 57 Error string 58 Subs []SubInfo 59 } 60 61 type ListSubsRequest struct { 62 Hostnames []string // Empty: match all hostnames. 63 LocationsToMatch []string // Empty: match all locations. 64 StatusesToMatch []string // Empty: match all statuses. 65 TagsToMatch map[string][]string // Empty: match all tags. 66 } 67 68 type ListSubsResponse struct { 69 Error string 70 Hostnames []string 71 } 72 73 type SetDefaultImageRequest struct { 74 ImageName string 75 } 76 77 type SetDefaultImageResponse struct{} 78 79 type SubInfo struct { 80 mdb.Machine 81 LastNote string `json:",omitempty"` 82 LastDisruptionState sub.DisruptionState `json:",omitempty"` 83 LastScanDuration time.Duration `json:",omitempty"` 84 LastSuccessfulImage string `json:",omitempty"` 85 LastSyncTime time.Time `json:",omitempty"` 86 LastUpdateTime time.Time `json:",omitempty"` 87 StartTime time.Time `json:",omitempty"` 88 Status string 89 SystemUptime *time.Duration `json:",omitempty"` 90 }