deps: update psrpc to v0.8.0 (#4882)
* deps: update psrpc to v0.8.0 psrpc v0.8.0 splits the brokers into leaf packages so importing psrpc no longer pulls in nats.go and go-redis, and drops the root constructors: - return psrpc.NewRedisMessageBus(rc, opts...) + return redisbus.New(rc, opts...) getMessageBus keeps its NewLocalMessageBus branch -- that shim stays at the root because localbus costs no dependency. wire_gen.go carries a verbatim copy of the provider, so it gets the identical edit rather than a wire rerun, which would churn unrelated output. redisbus.New takes ...bus.BusOption and psrpc.BusOption is an alias for it, so PSRPCConfig.BusOptions() spreads in unchanged. The nats-io requirements drop out of go.mod; this module only ever used the Redis bus, and nats came in indirectly through psrpc's root package. * Reorder import statements in ioservice_sip_test.go
This commit is contained in:
@@ -16,19 +16,20 @@ package service_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/dennwc/iters"
|
||||
"github.com/livekit/livekit-server/pkg/service"
|
||||
"github.com/livekit/psrpc"
|
||||
"slices"
|
||||
"testing"
|
||||
|
||||
"github.com/livekit/protocol/livekit"
|
||||
"github.com/dennwc/iters"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/service"
|
||||
"github.com/livekit/protocol/livekit"
|
||||
"github.com/livekit/psrpc/pkg/bus/redisbus"
|
||||
)
|
||||
|
||||
func ioStoreDocker(t testing.TB) (*service.IOInfoService, *service.RedisStore) {
|
||||
r := redisClientDocker(t)
|
||||
bus := psrpc.NewRedisMessageBus(r)
|
||||
bus := redisbus.New(r)
|
||||
rs := service.NewRedisStore(r)
|
||||
io, err := service.NewIOInfoService(bus, rs, rs, rs, nil)
|
||||
require.NoError(t, err)
|
||||
|
||||
+2
-1
@@ -35,6 +35,7 @@ import (
|
||||
"github.com/livekit/protocol/utils"
|
||||
"github.com/livekit/protocol/webhook"
|
||||
"github.com/livekit/psrpc"
|
||||
"github.com/livekit/psrpc/pkg/bus/redisbus"
|
||||
"github.com/livekit/psrpc/pkg/middleware/otelpsrpc"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/agent"
|
||||
@@ -198,7 +199,7 @@ func getMessageBus(rc redis.UniversalClient, psrpcConf rpc.PSRPCConfig) psrpc.Me
|
||||
if rc == nil {
|
||||
return psrpc.NewLocalMessageBus(opts...)
|
||||
}
|
||||
return psrpc.NewRedisMessageBus(rc, opts...)
|
||||
return redisbus.New(rc, opts...)
|
||||
}
|
||||
|
||||
func getEgressStore(s ObjectStore) EgressStore {
|
||||
|
||||
@@ -21,6 +21,7 @@ import (
|
||||
"github.com/livekit/protocol/utils"
|
||||
"github.com/livekit/protocol/webhook"
|
||||
"github.com/livekit/psrpc"
|
||||
"github.com/livekit/psrpc/pkg/bus/redisbus"
|
||||
"github.com/livekit/psrpc/pkg/middleware/otelpsrpc"
|
||||
"github.com/pion/turn/v5"
|
||||
"github.com/pkg/errors"
|
||||
@@ -259,7 +260,7 @@ func getMessageBus(rc redis.UniversalClient, psrpcConf rpc.PSRPCConfig) psrpc.Me
|
||||
if rc == nil {
|
||||
return psrpc.NewLocalMessageBus(opts...)
|
||||
}
|
||||
return psrpc.NewRedisMessageBus(rc, opts...)
|
||||
return redisbus.New(rc, opts...)
|
||||
}
|
||||
|
||||
func getEgressStore(s ObjectStore) EgressStore {
|
||||
|
||||
Reference in New Issue
Block a user