Services returns a map containing all services present in the State. The key is the hash of the service String() value and the value is the service itself.
()
| 278 | // Services returns a map containing all services present in the State. |
| 279 | // The key is the hash of the service String() value and the value is the service itself. |
| 280 | func (s *State) Services() map[string]Service { |
| 281 | keys := s.serviceKeys() |
| 282 | services := make(map[string]Service, len(keys)) |
| 283 | |
| 284 | for _, key := range keys { |
| 285 | services[key] = MustGetState[Service](s, key) |
| 286 | } |
| 287 | |
| 288 | return services |
| 289 | } |
| 290 | |
| 291 | // ServicesLen returns the number of keys for services in the State. |
| 292 | func (s *State) ServicesLen() int { |