github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/storage/computation_result.go (about)

     1  package storage
     2  
     3  import (
     4  	"github.com/onflow/flow-go/model/flow"
     5  )
     6  
     7  // ComputationResultUploadStatus interface defines storage operations for upload status
     8  // of given ComputationResult instance:
     9  // - false as upload not completed
    10  // - true as upload completed
    11  type ComputationResultUploadStatus interface {
    12  	// Upsert upserts omputationResult into persistent storage with given BlockID.
    13  	Upsert(blockID flow.Identifier, wasUploadCompleted bool) error
    14  
    15  	// GetIDsByUploadStatus returns BlockIDs whose upload status matches with targetUploadStatus
    16  	GetIDsByUploadStatus(targetUploadStatus bool) ([]flow.Identifier, error)
    17  
    18  	// ByID returns the upload status of ComputationResult with given BlockID.
    19  	ByID(blockID flow.Identifier) (bool, error)
    20  
    21  	// Remove removes an instance of ComputationResult with given BlockID.
    22  	Remove(blockID flow.Identifier) error
    23  }