github.com/juju/juju@v0.0.0-20240430160146-1752b71fcf00/rpc/params/summarywatcher.go (about) 1 // Copyright 2020 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package params 5 6 // SummaryWatcherID holds the id of a model summary watcher. 7 type SummaryWatcherID struct { 8 WatcherID string `json:"watcher-id"` 9 } 10 11 // SummaryWatcherNextResults holds deltas returned from calling AllWatcher.Next(). 12 type SummaryWatcherNextResults struct { 13 Models []ModelAbstract `json:"models"` 14 } 15 16 // ModelAbstract represents a summary of a model. 17 // Unfortunately we already have a ModelSummary in the params package. 18 type ModelAbstract struct { 19 UUID string `json:"uuid"` 20 Removed bool `json:"removed,omitempty"` 21 22 Controller string `json:"controller,omitempty"` 23 Name string `json:"name,omitempty"` 24 Admins []string `json:"admins,omitempty"` 25 26 Cloud string `json:"cloud,omitempty"` 27 Region string `json:"region,omitempty"` 28 Credential string `json:"credential,omitempty"` 29 30 Size ModelSummarySize `json:"size,omitempty"` 31 32 Status string `json:"status,omitempty"` 33 Messages []ModelSummaryMessage `json:"messages,omitempty"` 34 35 Annotations map[string]string `json:"annotations,omitempty"` 36 } 37 38 // ModelSummarySize represents the number of various entities in the model. 39 type ModelSummarySize struct { 40 Machines int `json:"machines,omitempty"` 41 Containers int `json:"containers,omitempty"` 42 Applications int `json:"applications,omitempty"` 43 Units int `json:"units,omitempty"` 44 Relations int `json:"relations,omitempty"` 45 } 46 47 // ModelSummaryMessage represents a non-green status from an agent. 48 type ModelSummaryMessage struct { 49 Agent string `json:"agent"` 50 Message string `json:"message"` 51 }