(nextKeys map[string]struct{})
| 1141 | } |
| 1142 | |
| 1143 | func (h *Host) pruneStaleAccessProviders(nextKeys map[string]struct{}) { |
| 1144 | if h == nil { |
| 1145 | return |
| 1146 | } |
| 1147 | |
| 1148 | staleKeys := make([]string, 0) |
| 1149 | h.mu.Lock() |
| 1150 | for key := range h.accessProviderKeys { |
| 1151 | if _, okKey := nextKeys[key]; !okKey { |
| 1152 | staleKeys = append(staleKeys, key) |
| 1153 | } |
| 1154 | } |
| 1155 | h.accessProviderKeys = nextKeys |
| 1156 | h.mu.Unlock() |
| 1157 | |
| 1158 | for _, key := range staleKeys { |
| 1159 | sdkaccess.UnregisterProvider(key) |
| 1160 | } |
| 1161 | } |
| 1162 | |
| 1163 | func (h *Host) RegisterUsagePlugins() { |
| 1164 | if h == nil { |
no outgoing calls
no test coverage detected