Documentation
¶
Index ¶
- Variables
- func IsUnretriable(err error) bool
- func ReportProgress(ctx context.Context, lapi *livepeerAPI.Client, taskID string, size uint64, ...)
- func TaskExport(tctx *TaskContext) (*data.TaskOutput, error)
- func TaskImport(tctx *TaskContext) (*data.TaskOutput, error)
- func TaskTranscode(tctx *TaskContext) (*data.TaskOutput, error)
- type FileMetadata
- type ReadCounter
- type ReadHasher
- type ReaderClose
- type Runner
- type RunnerOptions
- type TaskContext
- type TaskHandler
- type UnretriableError
- type WriteSeekCloser
- type WriterSeeker
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultClient = clients.BaseClient{}
Functions ¶
func IsUnretriable ¶
func ReportProgress ¶ added in v0.2.0
func TaskExport ¶ added in v0.2.0
func TaskExport(tctx *TaskContext) (*data.TaskOutput, error)
func TaskImport ¶
func TaskImport(tctx *TaskContext) (*data.TaskOutput, error)
func TaskTranscode ¶ added in v0.3.0
func TaskTranscode(tctx *TaskContext) (*data.TaskOutput, error)
Types ¶
type FileMetadata ¶
type FileMetadata struct {
MD5 string `json:"md5"`
SHA256 string `json:"sha256"`
Ffprobe *ffprobe.ProbeData `json:"ffprobe"`
AssetSpec *livepeerAPI.AssetSpec `json:"assetSpec"`
}
func Probe ¶
func Probe(ctx context.Context, filename string, data *ReadCounter) (*FileMetadata, error)
type ReadCounter ¶ added in v0.2.0
type ReadCounter struct {
// contains filtered or unexported fields
}
func NewReadCounter ¶ added in v0.2.0
func NewReadCounter(r io.Reader) *ReadCounter
func (*ReadCounter) Count ¶ added in v0.2.0
func (h *ReadCounter) Count() uint64
type ReadHasher ¶
type ReadHasher struct {
// contains filtered or unexported fields
}
func NewReadHasher ¶
func NewReadHasher(r io.Reader) *ReadHasher
func (*ReadHasher) FinishReader ¶
func (h *ReadHasher) FinishReader() (int64, error)
func (*ReadHasher) MD5 ¶
func (h *ReadHasher) MD5() string
func (*ReadHasher) SHA256 ¶
func (h *ReadHasher) SHA256() string
type ReaderClose ¶ added in v0.3.0
func (ReaderClose) Close ¶ added in v0.3.0
func (ReaderClose) Close() error
type RunnerOptions ¶
type RunnerOptions struct {
AMQPUri string
ExchangeName string
QueueName string
LivepeerAPIOptions livepeerAPI.ClientOptions
PinataAccessToken string
TaskHandlers map[string]TaskHandler
}
type TaskContext ¶
type TaskContext struct {
context.Context
data.TaskInfo
*livepeerAPI.Task
InputAsset, OutputAsset *livepeerAPI.Asset
// contains filtered or unexported fields
}
type TaskHandler ¶
type TaskHandler func(tctx *TaskContext) (*data.TaskOutput, error)
type UnretriableError ¶
type UnretriableError struct {
// contains filtered or unexported fields
}
func (UnretriableError) Error ¶
func (e UnretriableError) Error() string
func (UnretriableError) Unwrap ¶
func (e UnretriableError) Unwrap() error
type WriteSeekCloser ¶ added in v0.3.0
type WriterSeeker ¶ added in v0.3.0
type WriterSeeker struct {
// contains filtered or unexported fields
}
WriterSeeker is an in-memory io.WriteSeeker implementation
func (*WriterSeeker) Reader ¶ added in v0.3.0
func (ws *WriterSeeker) Reader() io.Reader
Reader returns an io.Reader. Use it, for example, with io.Copy, to copy the content of the WriterSeeker buffer to an io.Writer
Click to show internal directories.
Click to hide internal directories.