mirror of
https://github.com/livekit/livekit.git
synced 2026-05-14 20:35:27 +00:00
Allow listing ingress by id (#1874)
This commit is contained in:
@@ -18,7 +18,7 @@ require (
|
||||
github.com/jxskiss/base62 v1.1.0
|
||||
github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1
|
||||
github.com/livekit/mediatransportutil v0.0.0-20230612070454-d5299b956135
|
||||
github.com/livekit/protocol v1.5.10-0.20230713013703-71d539707e4c
|
||||
github.com/livekit/protocol v1.5.10-0.20230714010226-3c53edc91962
|
||||
github.com/livekit/psrpc v0.3.2
|
||||
github.com/mackerelio/go-osstat v0.2.4
|
||||
github.com/magefile/mage v1.15.0
|
||||
|
||||
@@ -124,8 +124,8 @@ 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-20230612070454-d5299b956135 h1:lWYbsondvqG69czxoACDwaJ/BoyD57BahCo70ZH+m4U=
|
||||
github.com/livekit/mediatransportutil v0.0.0-20230612070454-d5299b956135/go.mod h1:MRc0zSOSzXuFt0X218SgabzlaKevkvCckPgBEoHYc34=
|
||||
github.com/livekit/protocol v1.5.10-0.20230713013703-71d539707e4c h1:o2xIq3un7M7un8wU7jYw+6mV1uSp7oWA2lCHRm5m3+Y=
|
||||
github.com/livekit/protocol v1.5.10-0.20230713013703-71d539707e4c/go.mod h1:eRzojAYSPJuNgDHMlvLji/CPauj9hrgvb6rVPUj6MoU=
|
||||
github.com/livekit/protocol v1.5.10-0.20230714010226-3c53edc91962 h1:y+rtYNMGmvpEgQlNG/wOUO16S497ygh83wQSUBKHpG4=
|
||||
github.com/livekit/protocol v1.5.10-0.20230714010226-3c53edc91962/go.mod h1:eRzojAYSPJuNgDHMlvLji/CPauj9hrgvb6rVPUj6MoU=
|
||||
github.com/livekit/psrpc v0.3.2 h1:eAaJhASme33gtoBhCRLH9jsnWcdm1tHWf0WzaDk56ew=
|
||||
github.com/livekit/psrpc v0.3.2/go.mod h1:n6JntEg+zT6Ji8InoyTpV7wusPNwGqqtxmHlkNhDN0U=
|
||||
github.com/mackerelio/go-osstat v0.2.4 h1:qxGbdPkFo65PXOb/F/nhDKpF2nGmGaCFDLXoZjJTtUs=
|
||||
|
||||
+13
-4
@@ -216,10 +216,19 @@ func (s *IngressService) ListIngress(ctx context.Context, req *livekit.ListIngre
|
||||
return nil, ErrIngressNotConnected
|
||||
}
|
||||
|
||||
infos, err := s.store.ListIngress(ctx, livekit.RoomName(req.RoomName))
|
||||
if err != nil {
|
||||
logger.Errorw("could not list ingress info", err)
|
||||
return nil, err
|
||||
var infos []*livekit.IngressInfo
|
||||
if req.IngressId != "" {
|
||||
info, err := s.store.LoadIngress(ctx, req.IngressId)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
infos = []*livekit.IngressInfo{info}
|
||||
} else {
|
||||
infos, err = s.store.ListIngress(ctx, livekit.RoomName(req.RoomName))
|
||||
if err != nil {
|
||||
logger.Errorw("could not list ingress info", err)
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
return &livekit.ListIngressResponse{Items: infos}, nil
|
||||
|
||||
Reference in New Issue
Block a user