Documentation ¶
Index ¶
- Constants
- func AmendMCAP(wsc io.ReadWriteSeeker, attachments []*mcap.Attachment, ...) error
- func DefaultString(strings ...string) string
- func FormatTable(w io.Writer, rows [][]string)
- func GetReader(ctx context.Context, filename string) (func() error, io.ReadSeekCloser, error)
- func GetScheme(filename string) (match1 string, match2 string, match3 string)
- func Keys[T any](m map[string]T) []string
- func NewProgressBar(max int64) *progressbar.ProgressBar
- func PrettyJSON(data []byte) (string, error)
- func ReadingStdin() (bool, error)
- func StdoutRedirected() bool
- func WithReader(ctx context.Context, filename string, ...) error
- type GCSReadSeekCloser
- type PriorityQueue
- type TaggedMessage
Constants ¶
View Source
const ( SizeRecordLength = 8 SizeOpcode = 1 SizeDataEnd = 4 SizeMagic = 8 )
Variables ¶
This section is empty.
Functions ¶
func AmendMCAP ¶
func AmendMCAP( wsc io.ReadWriteSeeker, attachments []*mcap.Attachment, metadata []*mcap.Metadata, ) error
AmendMCAP adds attachment and metadata records to the end of the data section of an existing MCAP, in place. It then writes a new summary section consisting of the existing summary section, plus new attachment and metadata index records as applicable, with all offsets and CRCs updated to account for the new data.
func DefaultString ¶
DefaultString returns the first of the provided strings that is nonempty, or an empty string if they are all empty.
func FormatTable ¶
func NewProgressBar ¶
func NewProgressBar(max int64) *progressbar.ProgressBar
NewProgressBar returns an instance of progressbar.ProgresBar. `max` is the denominator of the progress.
func PrettyJSON ¶
func ReadingStdin ¶
func StdoutRedirected ¶
func StdoutRedirected() bool
func WithReader ¶
Types ¶
type GCSReadSeekCloser ¶
type GCSReadSeekCloser struct {
// contains filtered or unexported fields
}
func NewGCSReadSeekCloser ¶
func NewGCSReadSeekCloser(ctx context.Context, object *storage.ObjectHandle) (*GCSReadSeekCloser, error)
func (*GCSReadSeekCloser) Close ¶
func (r *GCSReadSeekCloser) Close() error
type PriorityQueue ¶
type PriorityQueue []TaggedMessage
func NewPriorityQueue ¶
func NewPriorityQueue(msgs []TaggedMessage) *PriorityQueue
func (PriorityQueue) Len ¶
func (pq PriorityQueue) Len() int
func (PriorityQueue) Less ¶
func (pq PriorityQueue) Less(i, j int) bool
func (*PriorityQueue) Pop ¶
func (pq *PriorityQueue) Pop() any
func (*PriorityQueue) Push ¶
func (pq *PriorityQueue) Push(x any)
func (PriorityQueue) Swap ¶
func (pq PriorityQueue) Swap(i, j int)
type TaggedMessage ¶
TaggedMessage is an mcap message, tagged with an identifier for the input it came from.
func NewTaggedMessage ¶
func NewTaggedMessage(inputID int, msg *mcap.Message) TaggedMessage
Click to show internal directories.
Click to hide internal directories.