Skip to content

Commit

Permalink
upload: Allow overriding strategy on upload request (#97)
Browse files Browse the repository at this point in the history
* out: Update catalyst-api dep and add strategy field

* in: Update go-api-client and forward strategy to catalyst
  • Loading branch information
victorges authored Dec 7, 2022
1 parent f782ca2 commit c266111
Show file tree
Hide file tree
Showing 4 changed files with 115 additions and 78 deletions.
10 changes: 6 additions & 4 deletions clients/catalyst.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (

"github.com/golang/glog"
"github.com/livepeer/catalyst-api/clients"
"github.com/livepeer/catalyst-api/pipeline"
)

var (
Expand All @@ -29,9 +30,10 @@ const (
)

type UploadVODRequest struct {
Url string `json:"url"`
CallbackUrl string `json:"callback_url"`
OutputLocations []OutputLocation `json:"output_locations,omitempty"`
Url string `json:"url"`
CallbackUrl string `json:"callback_url"`
OutputLocations []OutputLocation `json:"output_locations,omitempty"`
PipelineStrategy pipeline.Strategy `json:"pipeline_strategy,omitempty"`
}

type OutputLocation struct {
Expand All @@ -54,7 +56,7 @@ type CatalystOptions struct {
RateLimitInitialBackoff time.Duration
}

type CatalystCallback = clients.TranscodeStatusCompletedMessage
type CatalystCallback = clients.TranscodeStatusMessage

type Catalyst interface {
UploadVOD(ctx context.Context, upload UploadVODRequest) error
Expand Down
59 changes: 32 additions & 27 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,77 +5,82 @@ go 1.19
require (
github.com/golang/glog v1.0.0
github.com/julienschmidt/httprouter v1.3.0
github.com/livepeer/catalyst-api v0.0.12
github.com/livepeer/go-api-client v0.3.2-0.20221121220903-caabac493c45
github.com/livepeer/catalyst-api v0.0.13-0.20221206215045-7c65cbfbda4b
github.com/livepeer/go-api-client v0.4.1-0.20221207101406-c3675c55eed5
github.com/livepeer/go-tools v0.1.0
github.com/livepeer/joy4 v0.1.2-0.20220210094601-95e4d28f5f07
github.com/livepeer/livepeer-data v0.5.2
github.com/livepeer/stream-tester v0.12.22-0.20220912212136-f2dff6bd9343
github.com/peterbourgon/ff v1.7.1
github.com/prometheus/client_golang v1.13.0
github.com/prometheus/client_golang v1.14.0
github.com/rabbitmq/amqp091-go v1.5.0
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f
github.com/stretchr/testify v1.8.0
golang.org/x/sync v0.1.0
gopkg.in/vansante/go-ffprobe.v2 v2.1.1
)

require (
cloud.google.com/go v0.102.1 // indirect
cloud.google.com/go/compute v1.7.0 // indirect
cloud.google.com/go/iam v0.3.0 // indirect
cloud.google.com/go/storage v1.24.0 // indirect
cloud.google.com/go v0.104.0 // indirect
cloud.google.com/go/compute v1.10.0 // indirect
cloud.google.com/go/iam v0.4.0 // indirect
cloud.google.com/go/storage v1.26.0 // indirect
contrib.go.opencensus.io/exporter/prometheus v0.1.0 // indirect
github.com/Azure/azure-pipeline-go v0.2.2 // indirect
github.com/Azure/azure-storage-blob-go v0.8.0 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.5 // indirect
github.com/Necroforger/dgrouter v0.0.0-20190528143456-040421b5a83e // indirect
github.com/aws/aws-sdk-go v1.44.64 // indirect
github.com/aws/aws-sdk-go v1.44.91 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bwmarrin/discordgo v0.20.2 // indirect
github.com/cenkalti/backoff/v4 v4.2.0 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/eventials/go-tus v0.0.0-20220610120217-05d0564bb571 // indirect
github.com/go-kit/log v0.2.0 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect
github.com/googleapis/gax-go/v2 v2.4.0 // indirect
github.com/googleapis/gax-go/v2 v2.5.1 // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/gosuri/uilive v0.0.3 // indirect
github.com/gosuri/uiprogress v0.0.1 // indirect
github.com/grafov/m3u8 v0.11.1 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-retryablehttp v0.7.1 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/klauspost/compress v1.15.9 // indirect
github.com/livepeer/m3u8 v0.11.1 // indirect
github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2 // indirect
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
github.com/pierrec/lz4 v2.6.1+incompatible // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/rabbitmq/rabbitmq-stream-go-client v1.0.1-rc.2 // indirect
github.com/stretchr/objx v0.4.0 // indirect
github.com/stretchr/testify v1.8.0 // indirect
github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
go.opencensus.io v0.23.0 // indirect
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 // indirect
golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect
golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2 // indirect
golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect
google.golang.org/api v0.89.0 // indirect
golang.org/x/crypto v0.2.0 // indirect
golang.org/x/net v0.2.0 // indirect
golang.org/x/oauth2 v0.1.0 // indirect
golang.org/x/sys v0.2.0 // indirect
golang.org/x/text v0.4.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/api v0.98.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f // indirect
google.golang.org/grpc v1.47.0 // indirect
google.golang.org/genproto v0.0.0-20221018160656-63c7b68cfc55 // indirect
google.golang.org/grpc v1.50.1 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Expand Down
Loading

0 comments on commit c266111

Please sign in to comment.