{"modulePath":"github.com/onflow/flow-archive","version":"v0.31.9-decrease-wait-interval","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package cloud\n\n## Variables\n\n```go\nvar DefaultConfig = Config{\n\tBufferSize:    32,\n\tCatchupBlocks: []flow.Identifier{},\n}\n```\nDefaultConfig is the default configuration for the Google Cloud Streamer.\n\n## Types\n\n```go\ntype Config struct {\n\tBufferSize    uint\n\tCatchupBlocks []flow.Identifier\n}\n```\nConfig is the configuration for a Google Cloud Streamer.\n\n```go\ntype GCPStreamer struct {\n\t// contains filtered or unexported fields\n}\n```\nGCPStreamer is a component that downloads block data from a Google Cloud bucket. It exposes a callback to be used by the consensus follower to notify the Streamer when a new block has been finalized. The streamer will then add that block to the queue, which is consumed by downloading the block data for the identifiers it contains.\n\n```go\nfunc NewGCPStreamer(log zerolog.Logger, bucket *storage.BucketHandle, options ...Option) *GCPStreamer\n```\nNewGCPStreamer returns a new GCP Streamer using the given bucket and options.\n\n```go\nfunc (g *GCPStreamer) Next() (*uploader.BlockData, error)\n```\nNext returns the next available block data. It returns an ErrUnavailable if no block data is available at the moment.\n\n```go\nfunc (g *GCPStreamer) OnBlockFinalized(block *model.Block)\n```\nOnBlockFinalized is a callback for the Flow consensus follower. It is called each time a block is finalized by the Flow consensus algorithm.\n\n```go\ntype Option func(*Config)\n```\nOption is a function that can be applied to a Config.\n\n```go\nfunc WithBufferSize(size uint) Option\n```\nWithBufferSize can be used to specify the buffer size for a Google Cloud Streamer to use.\n\n```go\nfunc WithCatchupBlocks(blockIDs []flow.Identifier) Option\n```\nWithCatchupBlocks injects a number of block IDs that are already finalized, but for which we still need to download the execution data records.\n\n","path":"github.com/onflow/flow-archive/service/cloud","name":"cloud","synopsis":"","isRedistributable":true}
