Documentation ¶
Index ¶
- type StreamingStore
- func (ss *StreamingStore) Close() error
- func (ss *StreamingStore) Get(ctx context.Context, key string) ([]byte, error)
- func (ss *StreamingStore) GetStream(ctx context.Context, key string) (io.ReadCloser, error)
- func (ss *StreamingStore) Has(ctx context.Context, key string) (bool, error)
- func (ss *StreamingStore) Put(ctx context.Context, key string, data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StreamingStore ¶
type StreamingStore struct {
// contains filtered or unexported fields
}
StreamingStore is a storage that opens the underlying CAR storage only when required. So it should avoid creating CAR files that aren't ultimately touched and therefore need cleanup. Two storage systems are used by StreamingStore. One that can perform both read and write operations to serve as the block service for graphsync; and the other that only performs write operations, that can be used to stream CAR contents to the client. A getWriter callback is used to get a writer to the streaming storage only when it's needed. This can be used to trigger additional work when the storage is actually being setup. Put() operations will write to both storage systems, and will block until both are written.
func NewStreamingStore ¶
func (*StreamingStore) Close ¶
func (ss *StreamingStore) Close() error
func (*StreamingStore) GetStream ¶
func (ss *StreamingStore) GetStream(ctx context.Context, key string) (io.ReadCloser, error)