egress

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	EgressTypeRoomComposite  = "room_composite"
	EgressTypeWeb            = "web"
	EgressTypeTrackComposite = "track_composite"
	EgressTypeTrack          = "track"

	OutputTypeFile     = "file"
	OutputTypeStream   = "stream"
	OutputTypeSegments = "segments"
	OutputTypeMultiple = "multiple"

	Unknown = "unknown"
)
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

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

func GetTypes

func GetTypes(info *livekit.EgressInfo) (string, string)

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 Deprecated

func NewRedisRPCClient

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

Deprecated

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 Deprecated

func NewRedisRPCServer

func NewRedisRPCServer(rc redis.UniversalClient) RPCServer

Deprecated

type RedisRPC

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

func (*RedisRPC) ClaimRequest

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

func (*RedisRPC) EgressSubscription

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

func (*RedisRPC) GetRequestChannel

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

func (*RedisRPC) GetUpdateChannel

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

func (*RedisRPC) SendRequest

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

func (*RedisRPC) SendResponse

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

func (*RedisRPC) SendUpdate

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