github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/storage/consumer_progress.go (about) 1 package storage 2 3 // ConsumerProgress reads and writes the last processed index of the job in the job queue 4 type ConsumerProgress interface { 5 // read the current processed index 6 ProcessedIndex() (uint64, error) 7 // insert the default processed index to the storage layer, can only be done once. 8 // initialize for the second time will return storage.ErrAlreadyExists 9 InitProcessedIndex(defaultIndex uint64) error 10 // update the processed index in the storage layer. 11 // it will fail if InitProcessedIndex was never called. 12 SetProcessedIndex(processed uint64) error 13 }