Skip to content

Commit

Permalink
Disable ingress session flag update (#935)
Browse files Browse the repository at this point in the history
New Enabled flags on createIngress and updateIngress to have the ability to disable ingress sessions without having to remove the entire session and lose the streamkey
  • Loading branch information
Rajiv91 authored Jan 7, 2025
1 parent 83e359f commit e58b0bf
Show file tree
Hide file tree
Showing 5 changed files with 314 additions and 274 deletions.
1 change: 1 addition & 0 deletions ingress/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ var (
ErrNoResponse = psrpc.NewErrorf(psrpc.Unavailable, "no response from ingress service")
ErrInvalidOutputDimensions = NewInvalidVideoParamsError("invalid output media dimensions")
ErrInvalidIngressType = psrpc.NewErrorf(psrpc.InvalidArgument, "invalid ingress type")
ErrIngressDisabled = psrpc.NewErrorf(psrpc.PermissionDenied, "session is disabled")
)

func ErrInvalidIngress(s string) psrpc.Error {
Expand Down
3 changes: 3 additions & 0 deletions ingress/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ func ValidateForSerialization(info *livekit.IngressInfo) error {
if info.Url == "" {
return ErrInvalidIngress("no source URL")
}
if !info.Enabled {
return ErrInvalidIngress("disabled non reusable ingress")
}
}

if info.ParticipantIdentity == "" {
Expand Down
Loading

0 comments on commit e58b0bf

Please sign in to comment.