Files
livekit/pkg/service/interfaces.go
T
Raja Subramanian 4789ae4c7d Fix interface duplicate definition. (#157)
Got the following error on a fresh install
```
wire: /root/ws/livekit-server/pkg/service/interfaces.go:35:2: DeleteRoom redeclared
wire: /root/ws/livekit-server/pkg/service/interfaces.go:38:2: 	other declaration of DeleteRoom
wire: generate failed
Error: exit status 1
```
Probably something from the latest `wire` version.

After consulting David, removing the duplicate.

Testing:
--------
- Server builds and runs. Client is able to connect.
2021-10-25 21:25:46 +05:30

44 lines
1.5 KiB
Go

package service
import (
"context"
"time"
livekit "github.com/livekit/protocol/proto"
"github.com/livekit/livekit-server/pkg/routing"
"github.com/livekit/livekit-server/pkg/rtc"
)
//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -generate
// encapsulates CRUD operations for room settings
//counterfeiter:generate . RoomStore
type RoomStore interface {
StoreRoom(ctx context.Context, room *livekit.Room) error
LoadRoom(ctx context.Context, idOrName string) (*livekit.Room, error)
ListRooms(ctx context.Context) ([]*livekit.Room, error)
DeleteRoom(ctx context.Context, idOrName string) error
// enable locking on a specific room to prevent race
// returns a (lock uuid, error)
LockRoom(ctx context.Context, name string, duration time.Duration) (string, error)
UnlockRoom(ctx context.Context, name string, uid string) error
StoreParticipant(ctx context.Context, roomName string, participant *livekit.ParticipantInfo) error
LoadParticipant(ctx context.Context, roomName, identity string) (*livekit.ParticipantInfo, error)
ListParticipants(ctx context.Context, roomName string) ([]*livekit.ParticipantInfo, error)
DeleteParticipant(ctx context.Context, roomName, identity string) error
}
type RoomManager interface {
RoomStore
GetRoom(ctx context.Context, roomName string) *rtc.Room
StartSession(ctx context.Context, roomName string, pi routing.ParticipantInit, requestSource routing.MessageSource, responseSink routing.MessageSink)
CleanupRooms() error
CloseIdleRooms()
HasParticipants() bool
Stop()
}