GetInstanceState returns the current state of an instance or an error if the instance does not exist in the ring.
(instanceID string)
| 1275 | // GetInstanceState returns the current state of an instance or an error if the |
| 1276 | // instance does not exist in the ring. |
| 1277 | func (r *Ring) GetInstanceState(instanceID string) (InstanceState, error) { |
| 1278 | instance, err := r.GetInstance(instanceID) |
| 1279 | if err != nil { |
| 1280 | return PENDING, err |
| 1281 | } |
| 1282 | |
| 1283 | return instance.GetState(), nil |
| 1284 | } |
| 1285 | |
| 1286 | // HasInstance returns whether the ring contains an instance matching the provided instanceID. |
| 1287 | func (r *Ring) HasInstance(instanceID string) bool { |
nothing calls this directly
no test coverage detected