func (rc *RegistryClient) UnitState(name string) (*schema.UnitState, error) { rUnitState, err := rc.Registry.UnitState(name) if err != nil { return nil, err } return schema.MapUnitStateToSchemaUnitState(rUnitState), nil }
func (rc *RegistryClient) UnitStates() ([]*schema.UnitState, error) { rUnitStates, err := rc.Registry.UnitStates() if err != nil { return nil, err } states := make([]*schema.UnitState, len(rUnitStates)) for i, rus := range rUnitStates { states[i] = schema.MapUnitStateToSchemaUnitState(rus) } return states, nil }