attachedIDs returns the set of context IDs attached to the session.
()
| 433 | |
| 434 | // attachedIDs returns the set of context IDs attached to the session. |
| 435 | func (a *contextPluginAdapter) attachedIDs() map[string]bool { |
| 436 | out := map[string]bool{} |
| 437 | mgr := a.manager() |
| 438 | if mgr == nil { |
| 439 | return out |
| 440 | } |
| 441 | attached, err := mgr.GetAttachedContexts(a.sessionID()) |
| 442 | if err != nil { |
| 443 | return out |
| 444 | } |
| 445 | for _, fc := range attached { |
| 446 | out[fc.ID] = true |
| 447 | } |
| 448 | return out |
| 449 | } |
| 450 | |
| 451 | // humanMB renders a byte count as MB with two decimals. |
| 452 | func humanMB(bytes int64) string { |