Additional closure reasons (#958)
This commit is contained in:
@@ -81,6 +81,8 @@ const (
|
|||||||
ParticipantCloseReasonSimulateNodeFailure
|
ParticipantCloseReasonSimulateNodeFailure
|
||||||
ParticipantCloseReasonSimulateServerLeave
|
ParticipantCloseReasonSimulateServerLeave
|
||||||
ParticipantCloseReasonNegotiateFailed
|
ParticipantCloseReasonNegotiateFailed
|
||||||
|
ParticipantCloseReasonMigrationRequested
|
||||||
|
ParticipantCloseReasonOvercommitted
|
||||||
)
|
)
|
||||||
|
|
||||||
func (p ParticipantCloseReason) String() string {
|
func (p ParticipantCloseReason) String() string {
|
||||||
@@ -121,6 +123,10 @@ func (p ParticipantCloseReason) String() string {
|
|||||||
return "SIMULATE_SERVER_LEAVE"
|
return "SIMULATE_SERVER_LEAVE"
|
||||||
case ParticipantCloseReasonNegotiateFailed:
|
case ParticipantCloseReasonNegotiateFailed:
|
||||||
return "NEGOTIATE_FAILED"
|
return "NEGOTIATE_FAILED"
|
||||||
|
case ParticipantCloseReasonOvercommitted:
|
||||||
|
return "OVERCOMMITTED"
|
||||||
|
case ParticipantCloseReasonMigrationRequested:
|
||||||
|
return "MIGRATION_REQUESTED"
|
||||||
default:
|
default:
|
||||||
return fmt.Sprintf("%d", int(p))
|
return fmt.Sprintf("%d", int(p))
|
||||||
}
|
}
|
||||||
@@ -149,6 +155,8 @@ func (p ParticipantCloseReason) ToDisconnectReason() livekit.DisconnectReason {
|
|||||||
return livekit.DisconnectReason_SERVER_SHUTDOWN
|
return livekit.DisconnectReason_SERVER_SHUTDOWN
|
||||||
case ParticipantCloseReasonSimulateServerLeave:
|
case ParticipantCloseReasonSimulateServerLeave:
|
||||||
return livekit.DisconnectReason_SERVER_SHUTDOWN
|
return livekit.DisconnectReason_SERVER_SHUTDOWN
|
||||||
|
case ParticipantCloseReasonOvercommitted:
|
||||||
|
return livekit.DisconnectReason_SERVER_SHUTDOWN
|
||||||
case ParticipantCloseReasonNegotiateFailed:
|
case ParticipantCloseReasonNegotiateFailed:
|
||||||
return livekit.DisconnectReason_STATE_MISMATCH
|
return livekit.DisconnectReason_STATE_MISMATCH
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user