advance the status to next, and return
(id string)
| 47 | |
| 48 | // advance the status to next, and return |
| 49 | func (f *ExampleService) getStatus(id string) *ExampleCacheItem { |
| 50 | f.lock.Lock() |
| 51 | defer f.lock.Unlock() |
| 52 | if _, ok := f.jobStatus[id]; !ok { |
| 53 | f.jobStatus[id] = ExampleStatusStarted |
| 54 | } |
| 55 | |
| 56 | f.jobStatus[id] = ExampleStatusSucceeded |
| 57 | return &ExampleCacheItem{f.jobStatus[id], id} |
| 58 | } |
| 59 | |
| 60 | func ExampleNewAutoRefreshCache() { |
| 61 | // This auto-refresh cache can be used for cases where keys are created by caller but processed by |
no outgoing calls
no test coverage detected