GetReadOnlyState returns the read-only state of this instance -- whether instance is read-only, and when what the last update of read-only state (possibly zero).
()
| 414 | // GetReadOnlyState returns the read-only state of this instance -- whether instance is read-only, and when what the last |
| 415 | // update of read-only state (possibly zero). |
| 416 | func (i *Lifecycler) GetReadOnlyState() (bool, time.Time) { |
| 417 | i.stateMtx.RLock() |
| 418 | defer i.stateMtx.RUnlock() |
| 419 | return i.readOnly, i.readOnlyLastUpdated |
| 420 | } |
| 421 | |
| 422 | func (i *Lifecycler) setReadOnlyState(readOnly bool, readOnlyLastUpdated time.Time) { |
| 423 | i.stateMtx.Lock() |
no outgoing calls
no test coverage detected