Files
threshold/internal/bsr/convert/convert.go
T
Timothy Messier b4ce802572 refact(bsr/convert): Use new storage.TempFile interface
This changes the ToAscinema function to take a storage.TempFile instead
of a storage.FS. It was noticed that when this was being used a
storage.FS was being created just prior to calling this just so that it
could then create a temporary file. It seemed to make more sense to just
pass the temporary file in, instead of needing to expand the storage.FS
interface.

This also renames this method to align with the file format that the
returned io.Reader will contain.
2023-05-31 12:18:21 +00:00

21 lines
737 B
Go

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package convert
import (
"context"
"io"
"github.com/hashicorp/boundary/internal/bsr"
"github.com/hashicorp/boundary/internal/storage"
)
// ToAsciicast accepts a bsr.Session and will convert the underlying BSR connection or channel file to an asciinema file.
// The tempFs will be used to write the asciinema file to disk
// It returns an io.Reader to the converted asciinema file
// Supports WithChannelId() to indicate this conversion should occur on a chanel on a multiplexed session
func ToAsciicast(ctx context.Context, session bsr.Session, tmp storage.TempFile, connectionId string, options ...Option) (io.ReadCloser, error) {
panic("not implemented")
}