GetInstancePort returns the port to use to register the instance in the ring.
(configPort, listenPort int)
| 31 | // GetInstancePort returns the port to use to register the instance |
| 32 | // in the ring. |
| 33 | func GetInstancePort(configPort, listenPort int) int { |
| 34 | if configPort > 0 { |
| 35 | return configPort |
| 36 | } |
| 37 | |
| 38 | return listenPort |
| 39 | } |
| 40 | |
| 41 | // WaitInstanceState waits until the input instanceID is registered within the |
| 42 | // ring matching the provided state. A timeout should be provided within the context. |