github.com/grailbio/bigslice@v0.0.0-20230519005545-30c4c12152ad/sliceio/writer.go (about)

     1  // Copyright 2020 GRAIL, Inc. All rights reserved.
     2  // Use of this source code is governed by the Apache 2.0
     3  // license that can be found in the LICENSE file.
     4  
     5  package sliceio
     6  
     7  import (
     8  	"context"
     9  
    10  	"github.com/grailbio/bigslice/frame"
    11  )
    12  
    13  // Writer can write a frame to an underlying data stream.
    14  type Writer interface {
    15  	// Write writes f to an underlying data stream. It returns a non-nil error
    16  	// if there is a problem writing, and f may have been partially written.
    17  	Write(ctx context.Context, f frame.Frame) error
    18  }