github.com/niedbalski/juju@v0.0.0-20190215020005-8ff100488e47/core/application/goal-state.go (about) 1 // Copyright 2018 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package application 5 6 import ( 7 "time" 8 ) 9 10 // GoalStateStatus keeps the status and timestamp of a unit. 11 type GoalStateStatus struct { 12 Status string 13 Since *time.Time 14 } 15 16 // UnitsGoalState keeps the collection of units and their GoalStateStatus 17 type UnitsGoalState map[string]GoalStateStatus 18 19 // GoalState is responsible to organize the Units and Relations with a 20 // specific unit, and transmit this information from the api to the worker. 21 type GoalState struct { 22 Units UnitsGoalState 23 Relations map[string]UnitsGoalState 24 }