func (a *LeadershipPinningAPI) PinnedLeadership() (map[string][]names.Tag, error) {
	var callResult params.PinnedLeadershipResult
	err := a.facade.FacadeCall("PinnedLeadership", nil, &callResult)
	if err != nil {
		return nil, errors.Trace(err)
	}

	pinned := make(map[string][]names.Tag, len(callResult.Result))
	for app, entities := range callResult.Result {
		entityTags := make([]names.Tag, len(entities))
		for i, e := range entities {
			tag, err := names.ParseTag(e)
			if err != nil {
				return nil, errors.Trace(err)
			}
			entityTags[i] = tag
		}

		pinned[app] = entityTags
	}
	return pinned, nil
}
// PinnedLeadership returns a collection of application names for which
// leadership is currently pinned, with the entities requiring each
// application's pinned behaviour.
PinnedLeadership returns a collection of application names for which
leadership is currently pinned, with the entities requiring each
application's pinned behaviour.
// PinnedLeadership returns a collection of application names for which // leadership is currently pinned with the entities requiring each // application ' s pinned behaviour .
func (a *LeadershipPinningAPI) PinnedLeadership() (map[string][]names.Tag, error) {
	var callResult params.PinnedLeadershipResult
	err := a.facade.FacadeCall("PinnedLeadership", nil, &callResult)
	if err != nil {
		return nil, errors.Trace(err)
	}
	pinned := make(map[string][]names.Tag, len(callResult.Result))
	for app, entities := range callResult.Result {
		entityTags := make([]names.Tag, len(entities))
		for i, e := range entities {
			tag, err := names.ParseTag(e)
			if err != nil {
				return nil, errors.Trace(err)
			}
			entityTags[i] = tag
		}
		pinned[app] = entityTags
	}
	return pinned, nil
}
func ( a * LeadershipPinningAPI ) PinnedLeadership ( ) ( map [ string ] [ ] names . Tag , error ) { var callResult params . PinnedLeadershipResult err := a . facade . FacadeCall ( " " , nil , & callResult ) if err != nil { return nil , errors . Trace ( err ) } pinned := make ( map [ string ] [ ] names . Tag , len ( callResult . Result ) ) for app , entities := range callResult . Result { entityTags := make ( [ ] names . Tag , len ( entities ) ) for i , e := range entities { tag , err := names . ParseTag ( e ) if err != nil { return nil , errors . Trace ( err ) } entityTags [ i ] = tag } pinned [ app ] = entityTags } return pinned , nil }
PinnedLeadership returns a collection of application names for which
leadership is currently pinned, with the entities requiring each
application's pinned behaviour.
PinnedLeadership returns a collection of application names for which leadership is currently pinned with the entities requiring each application ' s pinned behaviour .