egress

package
v0.13.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2022 License: MIT Imports: 9 Imported by: 5

Documentation

Index

Constants

View Source
const (
	RequestExpiration = time.Second * 2
)

Variables

This section is empty.

Functions

func BuildEgressToken

func BuildEgressToken(egressID, apiKey, secret, roomName string) (string, error)

Types

type RPCClient added in v0.13.3

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 added in v0.13.3

func NewRedisRPCClient(nodeID livekit.NodeID, rc *redis.Client) RPCClient

type RPCServer added in v0.13.3

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 added in v0.13.3

func NewRedisRPCServer(rc *redis.Client) RPCServer

type RedisRPC added in v0.13.3

type RedisRPC struct {
	// contains filtered or unexported fields
}

func (*RedisRPC) ClaimRequest added in v0.13.3

func (r *RedisRPC) ClaimRequest(ctx context.Context, req *livekit.StartEgressRequest) (bool, error)

func (*RedisRPC) EgressSubscription added in v0.13.3

func (r *RedisRPC) EgressSubscription(ctx context.Context, egressID string) (utils.PubSub, error)

func (*RedisRPC) GetRequestChannel added in v0.13.3

func (r *RedisRPC) GetRequestChannel(ctx context.Context) (utils.PubSub, error)

func (*RedisRPC) GetUpdateChannel added in v0.13.3

func (r *RedisRPC) GetUpdateChannel(ctx context.Context) (utils.PubSub, error)

func (*RedisRPC) SendRequest added in v0.13.3

func (r *RedisRPC) SendRequest(ctx context.Context, request proto.Message) (*livekit.EgressInfo, error)

func (*RedisRPC) SendResponse added in v0.13.3

func (r *RedisRPC) SendResponse(ctx context.Context, request proto.Message, info *livekit.EgressInfo, err error) error

func (*RedisRPC) SendUpdate added in v0.13.3

func (r *RedisRPC) SendUpdate(ctx context.Context, info *livekit.EgressInfo) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL