Skip to content

Commit

Permalink
psrpc 0.3.4 (#516)
Browse files Browse the repository at this point in the history
* psrpc 0.3.4

* remove UpdateOutputs

* remove from handler
  • Loading branch information
frostbyte73 authored Oct 24, 2023
1 parent 53ed9fd commit 20b641f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 30 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ require (
github.com/gorilla/websocket v1.5.0
github.com/livekit/livekit-server v1.4.6-0.20230918194757-8a0d417a8c99
github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1
github.com/livekit/protocol v1.8.1-0.20231018194636-fac7f187fc16
github.com/livekit/psrpc v0.3.3
github.com/livekit/protocol v1.8.1-0.20231023233555-b34cb4eb7fad
github.com/livekit/psrpc v0.3.4
github.com/livekit/server-sdk-go v1.1.1
github.com/pion/rtp v1.8.2
github.com/pion/webrtc/v3 v3.2.21
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1 h1:jm09419p0lqTkD
github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1/go.mod h1:Rs3MhFwutWhGwmY1VQsygw28z5bWcnEYmS1OG9OxjOQ=
github.com/livekit/mediatransportutil v0.0.0-20231017082622-43f077b4e60e h1:yNeIo7MSMUWgoLu7LkNKnBYnJBFPFH9Wq4S6h1kS44M=
github.com/livekit/mediatransportutil v0.0.0-20231017082622-43f077b4e60e/go.mod h1:+WIOYwiBMive5T81V8B2wdAc2zQNRjNQiJIcPxMTILY=
github.com/livekit/protocol v1.8.1-0.20231018194636-fac7f187fc16 h1:0Ca5hQP9+DaRjrr5d9msNhfCL+CBvcxqLdh4xOXAZeU=
github.com/livekit/protocol v1.8.1-0.20231018194636-fac7f187fc16/go.mod h1:K47UnOyc9C0L9LEBDznwd1NMBSsohgyhfurshU5f+4Y=
github.com/livekit/psrpc v0.3.3 h1:+lltbuN39IdaynXhLLxRShgYqYsRMWeeXKzv60oqyWo=
github.com/livekit/psrpc v0.3.3/go.mod h1:n6JntEg+zT6Ji8InoyTpV7wusPNwGqqtxmHlkNhDN0U=
github.com/livekit/protocol v1.8.1-0.20231023233555-b34cb4eb7fad h1:DhC9lGb7zW4hwiwkSNv5SAryKUKsEVIhvGfYWJ925SQ=
github.com/livekit/protocol v1.8.1-0.20231023233555-b34cb4eb7fad/go.mod h1:BjfAXfg3KIb58tk6S6Bd7b3t1vh1kejHhmhxt2egYas=
github.com/livekit/psrpc v0.3.4 h1:bdge+SceBG3UOlmJorNGeE/9oB7pEA2y5rq5nWZeLxo=
github.com/livekit/psrpc v0.3.4/go.mod h1:n6JntEg+zT6Ji8InoyTpV7wusPNwGqqtxmHlkNhDN0U=
github.com/livekit/server-sdk-go v1.1.1 h1:TkDD/Ecyh7XNuxgxhpsDQ1uzbTlDWwwJrbkyUjQmcbY=
github.com/livekit/server-sdk-go v1.1.1/go.mod h1:724BcsVjpsQu8zK9VX2TfdEWt+DtsBeT3EnMrDbyT3I=
github.com/mackerelio/go-osstat v0.2.4 h1:qxGbdPkFo65PXOb/F/nhDKpF2nGmGaCFDLXoZjJTtUs=
Expand Down
8 changes: 0 additions & 8 deletions pkg/pipeline/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import (
"github.com/livekit/protocol/rpc"
"github.com/livekit/protocol/tracer"
"github.com/livekit/protocol/utils"
"github.com/livekit/psrpc"
)

const (
Expand Down Expand Up @@ -314,13 +313,6 @@ func (c *Controller) UpdateStream(ctx context.Context, req *livekit.UpdateStream
return errs.ToError()
}

func (c *Controller) UpdateOutputs(ctx context.Context, req *livekit.UpdateOutputsRequest) error {
ctx, span := tracer.Start(ctx, "Pipeline.UpdateOutputs")
defer span.End()

return psrpc.NewErrorf(psrpc.Unimplemented, "Updating outputs unimplemented")
}

func (c *Controller) removeSink(ctx context.Context, url string, streamErr error) error {
now := time.Now().UnixNano()

Expand Down
15 changes: 0 additions & 15 deletions pkg/service/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,21 +142,6 @@ func (h *Handler) UpdateStream(ctx context.Context, req *livekit.UpdateStreamReq
return h.pipeline.Info, nil
}

func (h *Handler) UpdateOutputs(ctx context.Context, req *livekit.UpdateOutputsRequest) (*livekit.EgressInfo, error) {
ctx, span := tracer.Start(ctx, "Handler.UpdateOutputs")
defer span.End()

if h.pipeline == nil {
return nil, errors.ErrEgressNotFound
}

err := h.pipeline.UpdateOutputs(ctx, req)
if err != nil {
return nil, err
}
return h.pipeline.Info, nil
}

func (h *Handler) StopEgress(ctx context.Context, _ *livekit.StopEgressRequest) (*livekit.EgressInfo, error) {
ctx, span := tracer.Start(ctx, "Handler.StopEgress")
defer span.End()
Expand Down
2 changes: 1 addition & 1 deletion pkg/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func (s *Service) StartEgress(ctx context.Context, req *rpc.StartEgressRequest)
return p.Info, nil
}

func (s *Service) StartEgressAffinity(req *rpc.StartEgressRequest) float32 {
func (s *Service) StartEgressAffinity(ctx context.Context, req *rpc.StartEgressRequest) float32 {
if !s.CanAcceptRequest(req) {
// cannot accept
return -1
Expand Down

0 comments on commit 20b641f

Please sign in to comment.