Documentation ¶
Index ¶
- Constants
- Variables
- func BuildEgressToken(egressID, apiKey, secret, roomName string) (string, error)
- type RPCClient
- type RPCServer
- type RedisRPC
- func (r *RedisRPC) ClaimRequest(ctx context.Context, req *livekit.StartEgressRequest) (bool, error)
- func (r *RedisRPC) EgressSubscription(ctx context.Context, egressID string) (utils.PubSub, error)
- func (r *RedisRPC) GetRequestChannel(ctx context.Context) (utils.PubSub, error)
- func (r *RedisRPC) GetUpdateChannel(ctx context.Context) (utils.PubSub, error)
- func (r *RedisRPC) SendRequest(ctx context.Context, request proto.Message) (*livekit.EgressInfo, error)
- func (r *RedisRPC) SendResponse(ctx context.Context, request proto.Message, info *livekit.EgressInfo, ...) error
- func (r *RedisRPC) SendUpdate(ctx context.Context, info *livekit.EgressInfo) error
Constants ¶
View Source
const (
RequestExpiration = time.Second * 2
)
Variables ¶
View Source
var ( ErrNoResponse = errors.New("no response from egress service") ErrEgressTimedOut = errors.New("egress timed out") )
Functions ¶
func BuildEgressToken ¶
Types ¶
type RPCClient ¶
type RPCClient interface { // GetUpdateChannel returns a subscription for egress info updates GetUpdateChannel(ctx context.Context) (utils.PubSub, error) // SendRequest sends a request to all available instances SendRequest(ctx context.Context, req proto.Message) (*livekit.EgressInfo, error) }
RPCClient is used by LiveKit Server
func NewRedisRPCClient ¶
type RPCServer ¶
type RPCServer interface { // GetRequestChannel returns a subscription for egress requests GetRequestChannel(ctx context.Context) (utils.PubSub, error) // ClaimRequest is used to take ownership of a request ClaimRequest(ctx context.Context, request *livekit.StartEgressRequest) (bool, error) // EgressSubscription subscribes to requests for a specific egress ID EgressSubscription(ctx context.Context, egressID string) (utils.PubSub, error) // SendResponse returns an RPC response SendResponse(ctx context.Context, request proto.Message, info *livekit.EgressInfo, err error) error // SendUpdate sends an egress info update SendUpdate(ctx context.Context, info *livekit.EgressInfo) error }
RPCServer is used by Egress
func NewRedisRPCServer ¶
func NewRedisRPCServer(rc *redis.Client) RPCServer
type RedisRPC ¶
type RedisRPC struct {
// contains filtered or unexported fields
}
func (*RedisRPC) ClaimRequest ¶
func (*RedisRPC) EgressSubscription ¶
func (*RedisRPC) GetRequestChannel ¶
func (*RedisRPC) GetUpdateChannel ¶
func (*RedisRPC) SendRequest ¶
func (*RedisRPC) SendResponse ¶
func (*RedisRPC) SendUpdate ¶
Click to show internal directories.
Click to hide internal directories.