diff --git a/pkg/rtc/participant.go b/pkg/rtc/participant.go index 56ab3ea7e..090930875 100644 --- a/pkg/rtc/participant.go +++ b/pkg/rtc/participant.go @@ -325,6 +325,25 @@ func (p *ParticipantImpl) State() livekit.ParticipantInfo_State { return p.state.Load().(livekit.ParticipantInfo_State) } +func (p *ParticipantImpl) Kind() livekit.ParticipantInfo_Kind { + p.lock.RLock() + defer p.lock.RUnlock() + + return p.grants.GetParticipantKind() +} + +func (p *ParticipantImpl) IsDependent() bool { + p.lock.RLock() + defer p.lock.RUnlock() + + switch p.grants.GetParticipantKind() { + case livekit.ParticipantInfo_AGENT, livekit.ParticipantInfo_EGRESS: + return true + default: + return false + } +} + func (p *ParticipantImpl) ProtocolVersion() types.ProtocolVersion { return p.params.ProtocolVersion } @@ -1090,20 +1109,6 @@ func (p *ParticipantImpl) Hidden() bool { return p.hidden.Load() } -func (p *ParticipantImpl) IsRecorder() bool { - p.lock.RLock() - defer p.lock.RUnlock() - - return p.grants.Video.Recorder -} - -func (p *ParticipantImpl) IsAgent() bool { - p.lock.RLock() - defer p.lock.RUnlock() - - return p.grants.Video.Agent -} - func (p *ParticipantImpl) VerifySubscribeParticipantInfo(pID livekit.ParticipantID, version uint32) { if !p.IsReady() { // we have not sent a JoinResponse yet. metadata would be covered in JoinResponse diff --git a/pkg/rtc/room.go b/pkg/rtc/room.go index 900c415f8..ad3fc5d18 100644 --- a/pkg/rtc/room.go +++ b/pkg/rtc/room.go @@ -318,10 +318,10 @@ func (r *Room) Join(participant types.LocalParticipant, requestSource routing.Me if r.participants[participant.Identity()] != nil { return ErrAlreadyJoined } - if r.protoRoom.MaxParticipants > 0 && !participant.IsRecorder() { + if r.protoRoom.MaxParticipants > 0 && !participant.IsDependent() { numParticipants := uint32(0) for _, p := range r.participants { - if !p.IsRecorder() { + if !p.IsDependent() { numParticipants++ } } @@ -417,7 +417,7 @@ func (r *Room) Join(participant types.LocalParticipant, requestSource routing.Me "numParticipants", len(r.participants), ) - if participant.IsRecorder() && !r.protoRoom.ActiveRecording { + if participant.Kind() == livekit.ParticipantInfo_EGRESS && !r.protoRoom.ActiveRecording { r.protoRoom.ActiveRecording = true r.protoProxy.MarkDirty(true) } else { @@ -559,10 +559,10 @@ func (r *Room) RemoveParticipant(identity livekit.ParticipantIdentity, pID livek } immediateChange := false - if p.IsRecorder() { + if p.Kind() == livekit.ParticipantInfo_EGRESS { activeRecording := false for _, op := range r.participants { - if op.IsRecorder() { + if op.Kind() == livekit.ParticipantInfo_EGRESS { activeRecording = true break } @@ -750,7 +750,7 @@ func (r *Room) CloseIfEmpty() { } for _, p := range r.participants { - if !p.IsRecorder() { + if !p.IsDependent() { r.lock.Unlock() return } @@ -1226,7 +1226,7 @@ func (r *Room) updateProto() *livekit.Room { room.NumPublishers = 0 room.NumParticipants = 0 for _, p := range r.GetParticipants() { - if !p.IsRecorder() { + if !p.IsDependent() { room.NumParticipants++ } if p.IsPublisher() { @@ -1410,7 +1410,7 @@ func (r *Room) simulationCleanupWorker() { } func (r *Room) launchPublisherAgent(p types.Participant) { - if p == nil || p.IsRecorder() || p.IsAgent() || r.agentClient == nil { + if p == nil || p.IsDependent() || r.agentClient == nil { return } diff --git a/pkg/rtc/types/interfaces.go b/pkg/rtc/types/interfaces.go index 967e63960..ebbfe9620 100644 --- a/pkg/rtc/types/interfaces.go +++ b/pkg/rtc/types/interfaces.go @@ -245,6 +245,8 @@ type Participant interface { Identity() livekit.ParticipantIdentity State() livekit.ParticipantInfo_State CloseReason() ParticipantCloseReason + Kind() livekit.ParticipantInfo_Kind + IsDependent() bool CanSkipBroadcast() bool ToProto() *livekit.ParticipantInfo @@ -265,8 +267,6 @@ type Participant interface { // permissions Hidden() bool - IsRecorder() bool - IsAgent() bool Close(sendLeave bool, reason ParticipantCloseReason, isExpectedToResume bool) error @@ -586,4 +586,3 @@ type OperationMonitor interface { Check() error IsIdle() bool } - diff --git a/pkg/rtc/types/typesfakes/fake_local_participant.go b/pkg/rtc/types/typesfakes/fake_local_participant.go index 37c03ef10..21f433338 100644 --- a/pkg/rtc/types/typesfakes/fake_local_participant.go +++ b/pkg/rtc/types/typesfakes/fake_local_participant.go @@ -444,16 +444,6 @@ type FakeLocalParticipant struct { identityReturnsOnCall map[int]struct { result1 livekit.ParticipantIdentity } - IsAgentStub func() bool - isAgentMutex sync.RWMutex - isAgentArgsForCall []struct { - } - isAgentReturns struct { - result1 bool - } - isAgentReturnsOnCall map[int]struct { - result1 bool - } IsClosedStub func() bool isClosedMutex sync.RWMutex isClosedArgsForCall []struct { @@ -464,6 +454,16 @@ type FakeLocalParticipant struct { isClosedReturnsOnCall map[int]struct { result1 bool } + IsDependentStub func() bool + isDependentMutex sync.RWMutex + isDependentArgsForCall []struct { + } + isDependentReturns struct { + result1 bool + } + isDependentReturnsOnCall map[int]struct { + result1 bool + } IsDisconnectedStub func() bool isDisconnectedMutex sync.RWMutex isDisconnectedArgsForCall []struct { @@ -504,16 +504,6 @@ type FakeLocalParticipant struct { isReadyReturnsOnCall map[int]struct { result1 bool } - IsRecorderStub func() bool - isRecorderMutex sync.RWMutex - isRecorderArgsForCall []struct { - } - isRecorderReturns struct { - result1 bool - } - isRecorderReturnsOnCall map[int]struct { - result1 bool - } IsSubscribedToStub func(livekit.ParticipantID) bool isSubscribedToMutex sync.RWMutex isSubscribedToArgsForCall []struct { @@ -530,6 +520,16 @@ type FakeLocalParticipant struct { issueFullReconnectArgsForCall []struct { arg1 types.ParticipantCloseReason } + KindStub func() livekit.ParticipantInfo_Kind + kindMutex sync.RWMutex + kindArgsForCall []struct { + } + kindReturns struct { + result1 livekit.ParticipantInfo_Kind + } + kindReturnsOnCall map[int]struct { + result1 livekit.ParticipantInfo_Kind + } MaybeStartMigrationStub func(bool, func()) bool maybeStartMigrationMutex sync.RWMutex maybeStartMigrationArgsForCall []struct { @@ -3233,59 +3233,6 @@ func (fake *FakeLocalParticipant) IdentityReturnsOnCall(i int, result1 livekit.P }{result1} } -func (fake *FakeLocalParticipant) IsAgent() bool { - fake.isAgentMutex.Lock() - ret, specificReturn := fake.isAgentReturnsOnCall[len(fake.isAgentArgsForCall)] - fake.isAgentArgsForCall = append(fake.isAgentArgsForCall, struct { - }{}) - stub := fake.IsAgentStub - fakeReturns := fake.isAgentReturns - fake.recordInvocation("IsAgent", []interface{}{}) - fake.isAgentMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeLocalParticipant) IsAgentCallCount() int { - fake.isAgentMutex.RLock() - defer fake.isAgentMutex.RUnlock() - return len(fake.isAgentArgsForCall) -} - -func (fake *FakeLocalParticipant) IsAgentCalls(stub func() bool) { - fake.isAgentMutex.Lock() - defer fake.isAgentMutex.Unlock() - fake.IsAgentStub = stub -} - -func (fake *FakeLocalParticipant) IsAgentReturns(result1 bool) { - fake.isAgentMutex.Lock() - defer fake.isAgentMutex.Unlock() - fake.IsAgentStub = nil - fake.isAgentReturns = struct { - result1 bool - }{result1} -} - -func (fake *FakeLocalParticipant) IsAgentReturnsOnCall(i int, result1 bool) { - fake.isAgentMutex.Lock() - defer fake.isAgentMutex.Unlock() - fake.IsAgentStub = nil - if fake.isAgentReturnsOnCall == nil { - fake.isAgentReturnsOnCall = make(map[int]struct { - result1 bool - }) - } - fake.isAgentReturnsOnCall[i] = struct { - result1 bool - }{result1} -} - func (fake *FakeLocalParticipant) IsClosed() bool { fake.isClosedMutex.Lock() ret, specificReturn := fake.isClosedReturnsOnCall[len(fake.isClosedArgsForCall)] @@ -3339,6 +3286,59 @@ func (fake *FakeLocalParticipant) IsClosedReturnsOnCall(i int, result1 bool) { }{result1} } +func (fake *FakeLocalParticipant) IsDependent() bool { + fake.isDependentMutex.Lock() + ret, specificReturn := fake.isDependentReturnsOnCall[len(fake.isDependentArgsForCall)] + fake.isDependentArgsForCall = append(fake.isDependentArgsForCall, struct { + }{}) + stub := fake.IsDependentStub + fakeReturns := fake.isDependentReturns + fake.recordInvocation("IsDependent", []interface{}{}) + fake.isDependentMutex.Unlock() + if stub != nil { + return stub() + } + if specificReturn { + return ret.result1 + } + return fakeReturns.result1 +} + +func (fake *FakeLocalParticipant) IsDependentCallCount() int { + fake.isDependentMutex.RLock() + defer fake.isDependentMutex.RUnlock() + return len(fake.isDependentArgsForCall) +} + +func (fake *FakeLocalParticipant) IsDependentCalls(stub func() bool) { + fake.isDependentMutex.Lock() + defer fake.isDependentMutex.Unlock() + fake.IsDependentStub = stub +} + +func (fake *FakeLocalParticipant) IsDependentReturns(result1 bool) { + fake.isDependentMutex.Lock() + defer fake.isDependentMutex.Unlock() + fake.IsDependentStub = nil + fake.isDependentReturns = struct { + result1 bool + }{result1} +} + +func (fake *FakeLocalParticipant) IsDependentReturnsOnCall(i int, result1 bool) { + fake.isDependentMutex.Lock() + defer fake.isDependentMutex.Unlock() + fake.IsDependentStub = nil + if fake.isDependentReturnsOnCall == nil { + fake.isDependentReturnsOnCall = make(map[int]struct { + result1 bool + }) + } + fake.isDependentReturnsOnCall[i] = struct { + result1 bool + }{result1} +} + func (fake *FakeLocalParticipant) IsDisconnected() bool { fake.isDisconnectedMutex.Lock() ret, specificReturn := fake.isDisconnectedReturnsOnCall[len(fake.isDisconnectedArgsForCall)] @@ -3551,59 +3551,6 @@ func (fake *FakeLocalParticipant) IsReadyReturnsOnCall(i int, result1 bool) { }{result1} } -func (fake *FakeLocalParticipant) IsRecorder() bool { - fake.isRecorderMutex.Lock() - ret, specificReturn := fake.isRecorderReturnsOnCall[len(fake.isRecorderArgsForCall)] - fake.isRecorderArgsForCall = append(fake.isRecorderArgsForCall, struct { - }{}) - stub := fake.IsRecorderStub - fakeReturns := fake.isRecorderReturns - fake.recordInvocation("IsRecorder", []interface{}{}) - fake.isRecorderMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeLocalParticipant) IsRecorderCallCount() int { - fake.isRecorderMutex.RLock() - defer fake.isRecorderMutex.RUnlock() - return len(fake.isRecorderArgsForCall) -} - -func (fake *FakeLocalParticipant) IsRecorderCalls(stub func() bool) { - fake.isRecorderMutex.Lock() - defer fake.isRecorderMutex.Unlock() - fake.IsRecorderStub = stub -} - -func (fake *FakeLocalParticipant) IsRecorderReturns(result1 bool) { - fake.isRecorderMutex.Lock() - defer fake.isRecorderMutex.Unlock() - fake.IsRecorderStub = nil - fake.isRecorderReturns = struct { - result1 bool - }{result1} -} - -func (fake *FakeLocalParticipant) IsRecorderReturnsOnCall(i int, result1 bool) { - fake.isRecorderMutex.Lock() - defer fake.isRecorderMutex.Unlock() - fake.IsRecorderStub = nil - if fake.isRecorderReturnsOnCall == nil { - fake.isRecorderReturnsOnCall = make(map[int]struct { - result1 bool - }) - } - fake.isRecorderReturnsOnCall[i] = struct { - result1 bool - }{result1} -} - func (fake *FakeLocalParticipant) IsSubscribedTo(arg1 livekit.ParticipantID) bool { fake.isSubscribedToMutex.Lock() ret, specificReturn := fake.isSubscribedToReturnsOnCall[len(fake.isSubscribedToArgsForCall)] @@ -3697,6 +3644,59 @@ func (fake *FakeLocalParticipant) IssueFullReconnectArgsForCall(i int) types.Par return argsForCall.arg1 } +func (fake *FakeLocalParticipant) Kind() livekit.ParticipantInfo_Kind { + fake.kindMutex.Lock() + ret, specificReturn := fake.kindReturnsOnCall[len(fake.kindArgsForCall)] + fake.kindArgsForCall = append(fake.kindArgsForCall, struct { + }{}) + stub := fake.KindStub + fakeReturns := fake.kindReturns + fake.recordInvocation("Kind", []interface{}{}) + fake.kindMutex.Unlock() + if stub != nil { + return stub() + } + if specificReturn { + return ret.result1 + } + return fakeReturns.result1 +} + +func (fake *FakeLocalParticipant) KindCallCount() int { + fake.kindMutex.RLock() + defer fake.kindMutex.RUnlock() + return len(fake.kindArgsForCall) +} + +func (fake *FakeLocalParticipant) KindCalls(stub func() livekit.ParticipantInfo_Kind) { + fake.kindMutex.Lock() + defer fake.kindMutex.Unlock() + fake.KindStub = stub +} + +func (fake *FakeLocalParticipant) KindReturns(result1 livekit.ParticipantInfo_Kind) { + fake.kindMutex.Lock() + defer fake.kindMutex.Unlock() + fake.KindStub = nil + fake.kindReturns = struct { + result1 livekit.ParticipantInfo_Kind + }{result1} +} + +func (fake *FakeLocalParticipant) KindReturnsOnCall(i int, result1 livekit.ParticipantInfo_Kind) { + fake.kindMutex.Lock() + defer fake.kindMutex.Unlock() + fake.KindStub = nil + if fake.kindReturnsOnCall == nil { + fake.kindReturnsOnCall = make(map[int]struct { + result1 livekit.ParticipantInfo_Kind + }) + } + fake.kindReturnsOnCall[i] = struct { + result1 livekit.ParticipantInfo_Kind + }{result1} +} + func (fake *FakeLocalParticipant) MaybeStartMigration(arg1 bool, arg2 func()) bool { fake.maybeStartMigrationMutex.Lock() ret, specificReturn := fake.maybeStartMigrationReturnsOnCall[len(fake.maybeStartMigrationArgsForCall)] @@ -6403,10 +6403,10 @@ func (fake *FakeLocalParticipant) Invocations() map[string][][]interface{} { defer fake.iDMutex.RUnlock() fake.identityMutex.RLock() defer fake.identityMutex.RUnlock() - fake.isAgentMutex.RLock() - defer fake.isAgentMutex.RUnlock() fake.isClosedMutex.RLock() defer fake.isClosedMutex.RUnlock() + fake.isDependentMutex.RLock() + defer fake.isDependentMutex.RUnlock() fake.isDisconnectedMutex.RLock() defer fake.isDisconnectedMutex.RUnlock() fake.isIdleMutex.RLock() @@ -6415,12 +6415,12 @@ func (fake *FakeLocalParticipant) Invocations() map[string][][]interface{} { defer fake.isPublisherMutex.RUnlock() fake.isReadyMutex.RLock() defer fake.isReadyMutex.RUnlock() - fake.isRecorderMutex.RLock() - defer fake.isRecorderMutex.RUnlock() fake.isSubscribedToMutex.RLock() defer fake.isSubscribedToMutex.RUnlock() fake.issueFullReconnectMutex.RLock() defer fake.issueFullReconnectMutex.RUnlock() + fake.kindMutex.RLock() + defer fake.kindMutex.RUnlock() fake.maybeStartMigrationMutex.RLock() defer fake.maybeStartMigrationMutex.RUnlock() fake.migrateStateMutex.RLock() diff --git a/pkg/rtc/types/typesfakes/fake_participant.go b/pkg/rtc/types/typesfakes/fake_participant.go index 9f6f97e14..f20a4cefe 100644 --- a/pkg/rtc/types/typesfakes/fake_participant.go +++ b/pkg/rtc/types/typesfakes/fake_participant.go @@ -128,14 +128,14 @@ type FakeParticipant struct { identityReturnsOnCall map[int]struct { result1 livekit.ParticipantIdentity } - IsAgentStub func() bool - isAgentMutex sync.RWMutex - isAgentArgsForCall []struct { + IsDependentStub func() bool + isDependentMutex sync.RWMutex + isDependentArgsForCall []struct { } - isAgentReturns struct { + isDependentReturns struct { result1 bool } - isAgentReturnsOnCall map[int]struct { + isDependentReturnsOnCall map[int]struct { result1 bool } IsPublisherStub func() bool @@ -148,15 +148,15 @@ type FakeParticipant struct { isPublisherReturnsOnCall map[int]struct { result1 bool } - IsRecorderStub func() bool - isRecorderMutex sync.RWMutex - isRecorderArgsForCall []struct { + KindStub func() livekit.ParticipantInfo_Kind + kindMutex sync.RWMutex + kindArgsForCall []struct { } - isRecorderReturns struct { - result1 bool + kindReturns struct { + result1 livekit.ParticipantInfo_Kind } - isRecorderReturnsOnCall map[int]struct { - result1 bool + kindReturnsOnCall map[int]struct { + result1 livekit.ParticipantInfo_Kind } RemovePublishedTrackStub func(types.MediaTrack, bool, bool) removePublishedTrackMutex sync.RWMutex @@ -848,15 +848,15 @@ func (fake *FakeParticipant) IdentityReturnsOnCall(i int, result1 livekit.Partic }{result1} } -func (fake *FakeParticipant) IsAgent() bool { - fake.isAgentMutex.Lock() - ret, specificReturn := fake.isAgentReturnsOnCall[len(fake.isAgentArgsForCall)] - fake.isAgentArgsForCall = append(fake.isAgentArgsForCall, struct { +func (fake *FakeParticipant) IsDependent() bool { + fake.isDependentMutex.Lock() + ret, specificReturn := fake.isDependentReturnsOnCall[len(fake.isDependentArgsForCall)] + fake.isDependentArgsForCall = append(fake.isDependentArgsForCall, struct { }{}) - stub := fake.IsAgentStub - fakeReturns := fake.isAgentReturns - fake.recordInvocation("IsAgent", []interface{}{}) - fake.isAgentMutex.Unlock() + stub := fake.IsDependentStub + fakeReturns := fake.isDependentReturns + fake.recordInvocation("IsDependent", []interface{}{}) + fake.isDependentMutex.Unlock() if stub != nil { return stub() } @@ -866,37 +866,37 @@ func (fake *FakeParticipant) IsAgent() bool { return fakeReturns.result1 } -func (fake *FakeParticipant) IsAgentCallCount() int { - fake.isAgentMutex.RLock() - defer fake.isAgentMutex.RUnlock() - return len(fake.isAgentArgsForCall) +func (fake *FakeParticipant) IsDependentCallCount() int { + fake.isDependentMutex.RLock() + defer fake.isDependentMutex.RUnlock() + return len(fake.isDependentArgsForCall) } -func (fake *FakeParticipant) IsAgentCalls(stub func() bool) { - fake.isAgentMutex.Lock() - defer fake.isAgentMutex.Unlock() - fake.IsAgentStub = stub +func (fake *FakeParticipant) IsDependentCalls(stub func() bool) { + fake.isDependentMutex.Lock() + defer fake.isDependentMutex.Unlock() + fake.IsDependentStub = stub } -func (fake *FakeParticipant) IsAgentReturns(result1 bool) { - fake.isAgentMutex.Lock() - defer fake.isAgentMutex.Unlock() - fake.IsAgentStub = nil - fake.isAgentReturns = struct { +func (fake *FakeParticipant) IsDependentReturns(result1 bool) { + fake.isDependentMutex.Lock() + defer fake.isDependentMutex.Unlock() + fake.IsDependentStub = nil + fake.isDependentReturns = struct { result1 bool }{result1} } -func (fake *FakeParticipant) IsAgentReturnsOnCall(i int, result1 bool) { - fake.isAgentMutex.Lock() - defer fake.isAgentMutex.Unlock() - fake.IsAgentStub = nil - if fake.isAgentReturnsOnCall == nil { - fake.isAgentReturnsOnCall = make(map[int]struct { +func (fake *FakeParticipant) IsDependentReturnsOnCall(i int, result1 bool) { + fake.isDependentMutex.Lock() + defer fake.isDependentMutex.Unlock() + fake.IsDependentStub = nil + if fake.isDependentReturnsOnCall == nil { + fake.isDependentReturnsOnCall = make(map[int]struct { result1 bool }) } - fake.isAgentReturnsOnCall[i] = struct { + fake.isDependentReturnsOnCall[i] = struct { result1 bool }{result1} } @@ -954,15 +954,15 @@ func (fake *FakeParticipant) IsPublisherReturnsOnCall(i int, result1 bool) { }{result1} } -func (fake *FakeParticipant) IsRecorder() bool { - fake.isRecorderMutex.Lock() - ret, specificReturn := fake.isRecorderReturnsOnCall[len(fake.isRecorderArgsForCall)] - fake.isRecorderArgsForCall = append(fake.isRecorderArgsForCall, struct { +func (fake *FakeParticipant) Kind() livekit.ParticipantInfo_Kind { + fake.kindMutex.Lock() + ret, specificReturn := fake.kindReturnsOnCall[len(fake.kindArgsForCall)] + fake.kindArgsForCall = append(fake.kindArgsForCall, struct { }{}) - stub := fake.IsRecorderStub - fakeReturns := fake.isRecorderReturns - fake.recordInvocation("IsRecorder", []interface{}{}) - fake.isRecorderMutex.Unlock() + stub := fake.KindStub + fakeReturns := fake.kindReturns + fake.recordInvocation("Kind", []interface{}{}) + fake.kindMutex.Unlock() if stub != nil { return stub() } @@ -972,38 +972,38 @@ func (fake *FakeParticipant) IsRecorder() bool { return fakeReturns.result1 } -func (fake *FakeParticipant) IsRecorderCallCount() int { - fake.isRecorderMutex.RLock() - defer fake.isRecorderMutex.RUnlock() - return len(fake.isRecorderArgsForCall) +func (fake *FakeParticipant) KindCallCount() int { + fake.kindMutex.RLock() + defer fake.kindMutex.RUnlock() + return len(fake.kindArgsForCall) } -func (fake *FakeParticipant) IsRecorderCalls(stub func() bool) { - fake.isRecorderMutex.Lock() - defer fake.isRecorderMutex.Unlock() - fake.IsRecorderStub = stub +func (fake *FakeParticipant) KindCalls(stub func() livekit.ParticipantInfo_Kind) { + fake.kindMutex.Lock() + defer fake.kindMutex.Unlock() + fake.KindStub = stub } -func (fake *FakeParticipant) IsRecorderReturns(result1 bool) { - fake.isRecorderMutex.Lock() - defer fake.isRecorderMutex.Unlock() - fake.IsRecorderStub = nil - fake.isRecorderReturns = struct { - result1 bool +func (fake *FakeParticipant) KindReturns(result1 livekit.ParticipantInfo_Kind) { + fake.kindMutex.Lock() + defer fake.kindMutex.Unlock() + fake.KindStub = nil + fake.kindReturns = struct { + result1 livekit.ParticipantInfo_Kind }{result1} } -func (fake *FakeParticipant) IsRecorderReturnsOnCall(i int, result1 bool) { - fake.isRecorderMutex.Lock() - defer fake.isRecorderMutex.Unlock() - fake.IsRecorderStub = nil - if fake.isRecorderReturnsOnCall == nil { - fake.isRecorderReturnsOnCall = make(map[int]struct { - result1 bool +func (fake *FakeParticipant) KindReturnsOnCall(i int, result1 livekit.ParticipantInfo_Kind) { + fake.kindMutex.Lock() + defer fake.kindMutex.Unlock() + fake.KindStub = nil + if fake.kindReturnsOnCall == nil { + fake.kindReturnsOnCall = make(map[int]struct { + result1 livekit.ParticipantInfo_Kind }) } - fake.isRecorderReturnsOnCall[i] = struct { - result1 bool + fake.kindReturnsOnCall[i] = struct { + result1 livekit.ParticipantInfo_Kind }{result1} } @@ -1416,12 +1416,12 @@ func (fake *FakeParticipant) Invocations() map[string][][]interface{} { defer fake.iDMutex.RUnlock() fake.identityMutex.RLock() defer fake.identityMutex.RUnlock() - fake.isAgentMutex.RLock() - defer fake.isAgentMutex.RUnlock() + fake.isDependentMutex.RLock() + defer fake.isDependentMutex.RUnlock() fake.isPublisherMutex.RLock() defer fake.isPublisherMutex.RUnlock() - fake.isRecorderMutex.RLock() - defer fake.isRecorderMutex.RUnlock() + fake.kindMutex.RLock() + defer fake.kindMutex.RUnlock() fake.removePublishedTrackMutex.RLock() defer fake.removePublishedTrackMutex.RUnlock() fake.setMetadataMutex.RLock() diff --git a/pkg/service/wire_gen.go b/pkg/service/wire_gen.go index 80b8bd8c0..08d493b13 100644 --- a/pkg/service/wire_gen.go +++ b/pkg/service/wire_gen.go @@ -1,6 +1,6 @@ // Code generated by Wire. DO NOT EDIT. -//go:generate go run github.com/google/wire/cmd/wire +//go:generate go run -mod=mod github.com/google/wire/cmd/wire //go:build !wireinject // +build !wireinject