rpc

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 28 Imported by: 25

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SIPDispatchResult_name = map[int32]string{
		0: "LEGACY_ACCEPT_OR_PIN",
		1: "ACCEPT",
		2: "REQUEST_PIN",
		3: "REJECT",
		4: "DROP",
	}
	SIPDispatchResult_value = map[string]int32{
		"LEGACY_ACCEPT_OR_PIN": 0,
		"ACCEPT":               1,
		"REQUEST_PIN":          2,
		"REJECT":               3,
		"DROP":                 4,
	}
)

Enum value maps for SIPDispatchResult.

View Source
var DefaultPSRPCConfig = PSRPCConfig{
	MaxAttempts: 3,
	Timeout:     3 * time.Second,
	Backoff:     2 * time.Second,
	BufferSize:  1000,
}
View Source
var File_rpc_agent_proto protoreflect.FileDescriptor
View Source
var File_rpc_egress_proto protoreflect.FileDescriptor
View Source
var File_rpc_ingress_proto protoreflect.FileDescriptor
View Source
var File_rpc_io_proto protoreflect.FileDescriptor
View Source
var File_rpc_keepalive_proto protoreflect.FileDescriptor
View Source
var File_rpc_participant_proto protoreflect.FileDescriptor
View Source
var File_rpc_room_proto protoreflect.FileDescriptor
View Source
var File_rpc_signal_proto protoreflect.FileDescriptor
View Source
var File_rpc_sip_proto protoreflect.FileDescriptor

Functions

func CurryMetricLabels added in v1.14.0

func CurryMetricLabels(labels prometheus.Labels)

func InitPSRPCStats added in v1.10.0

func InitPSRPCStats(constLabels prometheus.Labels, opts ...PSRPCMetricsOption)

func WithClientLogger added in v1.10.0

func WithClientLogger(logger logger.Logger) psrpc.ClientOption

func WithServerLogger added in v1.10.0

func WithServerLogger(logger logger.Logger) psrpc.ServerOption

Types

type AgentInternalClient added in v1.9.1

type AgentInternalClient interface {
	CheckEnabled(ctx context.Context, req *CheckEnabledRequest, opts ...psrpc.RequestOption) (<-chan *psrpc.Response[*CheckEnabledResponse], error)

	JobRequest(ctx context.Context, namespace string, jobType string, req *livekit1.Job, opts ...psrpc.RequestOption) (*google_protobuf.Empty, error)

	SubscribeWorkerRegistered(ctx context.Context, handlerNamespace string) (psrpc.Subscription[*google_protobuf.Empty], error)
}

func NewAgentInternalClient added in v1.9.1

func NewAgentInternalClient(bus psrpc.MessageBus, opts ...psrpc.ClientOption) (AgentInternalClient, error)

NewAgentInternalClient creates a psrpc client that implements the AgentInternalClient interface.

type AgentInternalServer added in v1.9.1

type AgentInternalServer interface {
	RegisterJobRequestTopic(namespace string, jobType string) error
	DeregisterJobRequestTopic(namespace string, jobType string)
	PublishWorkerRegistered(ctx context.Context, handlerNamespace string, msg *google_protobuf.Empty) error

	// Close and wait for pending RPCs to complete
	Shutdown()

	// Close immediately, without waiting for pending RPCs
	Kill()
}

func NewAgentInternalServer added in v1.9.1

func NewAgentInternalServer(svc AgentInternalServerImpl, bus psrpc.MessageBus, opts ...psrpc.ServerOption) (AgentInternalServer, error)

NewAgentInternalServer builds a RPCServer that will route requests to the corresponding method in the provided svc implementation.

type AgentInternalServerImpl added in v1.9.1

type AgentInternalServerImpl interface {
	CheckEnabled(context.Context, *CheckEnabledRequest) (*CheckEnabledResponse, error)

	JobRequest(context.Context, *livekit1.Job) (*google_protobuf.Empty, error)
	JobRequestAffinity(context.Context, *livekit1.Job) float32
}

type CheckEnabledRequest added in v1.9.1

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

func (*CheckEnabledRequest) Descriptor deprecated added in v1.9.1

func (*CheckEnabledRequest) Descriptor() ([]byte, []int)

Deprecated: Use CheckEnabledRequest.ProtoReflect.Descriptor instead.

func (*CheckEnabledRequest) ProtoMessage added in v1.9.1

func (*CheckEnabledRequest) ProtoMessage()

func (*CheckEnabledRequest) ProtoReflect added in v1.9.1

func (x *CheckEnabledRequest) ProtoReflect() protoreflect.Message

func (*CheckEnabledRequest) Reset added in v1.9.1

func (x *CheckEnabledRequest) Reset()

func (*CheckEnabledRequest) String added in v1.9.1

func (x *CheckEnabledRequest) String() string

type CheckEnabledResponse added in v1.9.1

type CheckEnabledResponse struct {
	RoomEnabled      bool     `protobuf:"varint,1,opt,name=room_enabled,json=roomEnabled,proto3" json:"room_enabled,omitempty"`
	PublisherEnabled bool     `protobuf:"varint,2,opt,name=publisher_enabled,json=publisherEnabled,proto3" json:"publisher_enabled,omitempty"`
	Namespaces       []string `protobuf:"bytes,3,rep,name=namespaces,proto3" json:"namespaces,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckEnabledResponse) Descriptor deprecated added in v1.9.1

func (*CheckEnabledResponse) Descriptor() ([]byte, []int)

Deprecated: Use CheckEnabledResponse.ProtoReflect.Descriptor instead.

func (*CheckEnabledResponse) GetNamespaces added in v1.14.0

func (x *CheckEnabledResponse) GetNamespaces() []string

func (*CheckEnabledResponse) GetPublisherEnabled added in v1.9.1

func (x *CheckEnabledResponse) GetPublisherEnabled() bool

func (*CheckEnabledResponse) GetRoomEnabled added in v1.9.1

func (x *CheckEnabledResponse) GetRoomEnabled() bool

func (*CheckEnabledResponse) ProtoMessage added in v1.9.1

func (*CheckEnabledResponse) ProtoMessage()

func (*CheckEnabledResponse) ProtoReflect added in v1.9.1

func (x *CheckEnabledResponse) ProtoReflect() protoreflect.Message

func (*CheckEnabledResponse) Reset added in v1.9.1

func (x *CheckEnabledResponse) Reset()

func (*CheckEnabledResponse) String added in v1.9.1

func (x *CheckEnabledResponse) String() string

type ClientParams added in v1.9.0

type ClientParams struct {
	PSRPCConfig
	Bus      psrpc.MessageBus
	Logger   logger.Logger
	Observer middleware.MetricsObserver
}

func NewClientParams added in v1.9.0

func NewClientParams(
	config PSRPCConfig,
	bus psrpc.MessageBus,
	logger logger.Logger,
	observer middleware.MetricsObserver,
) ClientParams

func (*ClientParams) Options added in v1.14.0

func (p *ClientParams) Options() []psrpc.ClientOption

type DeleteWHIPResourceRequest added in v1.5.6

type DeleteWHIPResourceRequest struct {
	ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"`
	StreamKey  string `protobuf:"bytes,2,opt,name=stream_key,json=streamKey,proto3" json:"stream_key,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteWHIPResourceRequest) Descriptor deprecated added in v1.5.6

func (*DeleteWHIPResourceRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteWHIPResourceRequest.ProtoReflect.Descriptor instead.

func (*DeleteWHIPResourceRequest) GetResourceId added in v1.5.6

func (x *DeleteWHIPResourceRequest) GetResourceId() string

func (*DeleteWHIPResourceRequest) GetStreamKey added in v1.5.9

func (x *DeleteWHIPResourceRequest) GetStreamKey() string

func (*DeleteWHIPResourceRequest) ProtoMessage added in v1.5.6

func (*DeleteWHIPResourceRequest) ProtoMessage()

func (*DeleteWHIPResourceRequest) ProtoReflect added in v1.5.6

func (*DeleteWHIPResourceRequest) Reset added in v1.5.6

func (x *DeleteWHIPResourceRequest) Reset()

func (*DeleteWHIPResourceRequest) String added in v1.5.6

func (x *DeleteWHIPResourceRequest) String() string

type EgressClient

type EgressClient interface {
	EgressInternalClient
	EgressHandlerClient
}

func NewEgressClient

func NewEgressClient(params ClientParams) (EgressClient, error)

type EgressHandlerClient

type EgressHandlerClient interface {
	UpdateStream(ctx context.Context, topic string, req *livekit2.UpdateStreamRequest, opts ...psrpc.RequestOption) (*livekit2.EgressInfo, error)

	StopEgress(ctx context.Context, topic string, req *livekit2.StopEgressRequest, opts ...psrpc.RequestOption) (*livekit2.EgressInfo, error)
}

func NewEgressHandlerClient

func NewEgressHandlerClient(bus psrpc.MessageBus, opts ...psrpc.ClientOption) (EgressHandlerClient, error)

NewEgressHandlerClient creates a psrpc client that implements the EgressHandlerClient interface.

type EgressHandlerServer

type EgressHandlerServer interface {
	RegisterUpdateStreamTopic(topic string) error
	DeregisterUpdateStreamTopic(topic string)
	RegisterStopEgressTopic(topic string) error
	DeregisterStopEgressTopic(topic string)

	// Close and wait for pending RPCs to complete
	Shutdown()

	// Close immediately, without waiting for pending RPCs
	Kill()
}

func NewEgressHandlerServer

func NewEgressHandlerServer(svc EgressHandlerServerImpl, bus psrpc.MessageBus, opts ...psrpc.ServerOption) (EgressHandlerServer, error)

NewEgressHandlerServer builds a RPCServer that will route requests to the corresponding method in the provided svc implementation.

type EgressHandlerServerImpl

type EgressHandlerServerImpl interface {
	UpdateStream(context.Context, *livekit2.UpdateStreamRequest) (*livekit2.EgressInfo, error)

	StopEgress(context.Context, *livekit2.StopEgressRequest) (*livekit2.EgressInfo, error)
}

type EgressInternalClient

type EgressInternalClient interface {
	StartEgress(ctx context.Context, topic string, req *StartEgressRequest, opts ...psrpc.RequestOption) (*livekit2.EgressInfo, error)

	ListActiveEgress(ctx context.Context, topic string, req *ListActiveEgressRequest, opts ...psrpc.RequestOption) (<-chan *psrpc.Response[*ListActiveEgressResponse], error)
}

func NewEgressInternalClient

func NewEgressInternalClient(bus psrpc.MessageBus, opts ...psrpc.ClientOption) (EgressInternalClient, error)

NewEgressInternalClient creates a psrpc client that implements the EgressInternalClient interface.

type EgressInternalServer

type EgressInternalServer interface {
	RegisterStartEgressTopic(topic string) error
	DeregisterStartEgressTopic(topic string)
	RegisterListActiveEgressTopic(topic string) error
	DeregisterListActiveEgressTopic(topic string)

	// Close and wait for pending RPCs to complete
	Shutdown()

	// Close immediately, without waiting for pending RPCs
	Kill()
}

func NewEgressInternalServer

func NewEgressInternalServer(svc EgressInternalServerImpl, bus psrpc.MessageBus, opts ...psrpc.ServerOption) (EgressInternalServer, error)

NewEgressInternalServer builds a RPCServer that will route requests to the corresponding method in the provided svc implementation.

type EgressInternalServerImpl

type EgressInternalServerImpl interface {
	StartEgress(context.Context, *StartEgressRequest) (*livekit2.EgressInfo, error)
	StartEgressAffinity(context.Context, *StartEgressRequest) float32

	ListActiveEgress(context.Context, *ListActiveEgressRequest) (*ListActiveEgressResponse, error)
}

type EvaluateSIPDispatchRulesRequest added in v1.9.1

type EvaluateSIPDispatchRulesRequest struct {
	SipParticipantId string `protobuf:"bytes,1,opt,name=sip_participant_id,json=sipParticipantId,proto3" json:"sip_participant_id,omitempty"`
	// What Number is calling
	CallingNumber string `protobuf:"bytes,2,opt,name=calling_number,json=callingNumber,proto3" json:"calling_number,omitempty"`
	// What Number was called
	CalledNumber string `protobuf:"bytes,3,opt,name=called_number,json=calledNumber,proto3" json:"called_number,omitempty"`
	// What is the IP address of the called number
	SrcAddress string `protobuf:"bytes,4,opt,name=src_address,json=srcAddress,proto3" json:"src_address,omitempty"`
	// What pin has been entered if any
	Pin string `protobuf:"bytes,5,opt,name=pin,proto3" json:"pin,omitempty"`
	// Caller rejected pin prompt, only try public rooms
	NoPin bool `protobuf:"varint,6,opt,name=no_pin,json=noPin,proto3" json:"no_pin,omitempty"`
	// What Host was called
	CalledHost string `protobuf:"bytes,7,opt,name=called_host,json=calledHost,proto3" json:"called_host,omitempty"`
	// contains filtered or unexported fields
}

func (*EvaluateSIPDispatchRulesRequest) Descriptor deprecated added in v1.9.1

func (*EvaluateSIPDispatchRulesRequest) Descriptor() ([]byte, []int)

Deprecated: Use EvaluateSIPDispatchRulesRequest.ProtoReflect.Descriptor instead.

func (*EvaluateSIPDispatchRulesRequest) GetCalledHost added in v1.9.4

func (x *EvaluateSIPDispatchRulesRequest) GetCalledHost() string

func (*EvaluateSIPDispatchRulesRequest) GetCalledNumber added in v1.9.1

func (x *EvaluateSIPDispatchRulesRequest) GetCalledNumber() string

func (*EvaluateSIPDispatchRulesRequest) GetCallingNumber added in v1.9.1

func (x *EvaluateSIPDispatchRulesRequest) GetCallingNumber() string

func (*EvaluateSIPDispatchRulesRequest) GetNoPin added in v1.9.2

func (x *EvaluateSIPDispatchRulesRequest) GetNoPin() bool

func (*EvaluateSIPDispatchRulesRequest) GetPin added in v1.9.1

func (*EvaluateSIPDispatchRulesRequest) GetSipParticipantId added in v1.9.1

func (x *EvaluateSIPDispatchRulesRequest) GetSipParticipantId() string

func (*EvaluateSIPDispatchRulesRequest) GetSrcAddress added in v1.9.1

func (x *EvaluateSIPDispatchRulesRequest) GetSrcAddress() string

func (*EvaluateSIPDispatchRulesRequest) ProtoMessage added in v1.9.1

func (*EvaluateSIPDispatchRulesRequest) ProtoMessage()

func (*EvaluateSIPDispatchRulesRequest) ProtoReflect added in v1.9.1

func (*EvaluateSIPDispatchRulesRequest) Reset added in v1.9.1

func (*EvaluateSIPDispatchRulesRequest) String added in v1.9.1

type EvaluateSIPDispatchRulesResponse added in v1.9.1

type EvaluateSIPDispatchRulesResponse struct {

	// non-empty string if SIPParticipant should be placed a room
	RoomName string `protobuf:"bytes,1,opt,name=room_name,json=roomName,proto3" json:"room_name,omitempty"`
	// What should be used for the LiveKit identity
	ParticipantIdentity string `protobuf:"bytes,2,opt,name=participant_identity,json=participantIdentity,proto3" json:"participant_identity,omitempty"`
	// Deprecated: Marked as deprecated in rpc/io.proto.
	RequestPin bool `protobuf:"varint,3,opt,name=request_pin,json=requestPin,proto3" json:"request_pin,omitempty"` // see result
	// optional token that should be used when creating LiveKit participant
	Token string `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"`
	// optional websocket url that should be used when creating LiveKit participant
	WsUrl  string            `protobuf:"bytes,5,opt,name=ws_url,json=wsUrl,proto3" json:"ws_url,omitempty"`
	Result SIPDispatchResult `protobuf:"varint,6,opt,name=result,proto3,enum=rpc.SIPDispatchResult" json:"result,omitempty"`
	// contains filtered or unexported fields
}

func (*EvaluateSIPDispatchRulesResponse) Descriptor deprecated added in v1.9.1

func (*EvaluateSIPDispatchRulesResponse) Descriptor() ([]byte, []int)

Deprecated: Use EvaluateSIPDispatchRulesResponse.ProtoReflect.Descriptor instead.

func (*EvaluateSIPDispatchRulesResponse) GetParticipantIdentity added in v1.9.1

func (x *EvaluateSIPDispatchRulesResponse) GetParticipantIdentity() string

func (*EvaluateSIPDispatchRulesResponse) GetRequestPin deprecated added in v1.9.1

func (x *EvaluateSIPDispatchRulesResponse) GetRequestPin() bool

Deprecated: Marked as deprecated in rpc/io.proto.

func (*EvaluateSIPDispatchRulesResponse) GetResult added in v1.9.9

func (*EvaluateSIPDispatchRulesResponse) GetRoomName added in v1.9.1

func (x *EvaluateSIPDispatchRulesResponse) GetRoomName() string

func (*EvaluateSIPDispatchRulesResponse) GetToken added in v1.9.4

func (*EvaluateSIPDispatchRulesResponse) GetWsUrl added in v1.9.4

func (*EvaluateSIPDispatchRulesResponse) ProtoMessage added in v1.9.1

func (*EvaluateSIPDispatchRulesResponse) ProtoMessage()

func (*EvaluateSIPDispatchRulesResponse) ProtoReflect added in v1.9.1

func (*EvaluateSIPDispatchRulesResponse) Reset added in v1.9.1

func (*EvaluateSIPDispatchRulesResponse) String added in v1.9.1

type GetEgressRequest added in v1.8.1

type GetEgressRequest struct {
	EgressId string `protobuf:"bytes,1,opt,name=egress_id,json=egressId,proto3" json:"egress_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetEgressRequest) Descriptor deprecated added in v1.8.1

func (*GetEgressRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetEgressRequest.ProtoReflect.Descriptor instead.

func (*GetEgressRequest) GetEgressId added in v1.8.1

func (x *GetEgressRequest) GetEgressId() string

func (*GetEgressRequest) ProtoMessage added in v1.8.1

func (*GetEgressRequest) ProtoMessage()

func (*GetEgressRequest) ProtoReflect added in v1.8.1

func (x *GetEgressRequest) ProtoReflect() protoreflect.Message

func (*GetEgressRequest) Reset added in v1.8.1

func (x *GetEgressRequest) Reset()

func (*GetEgressRequest) String added in v1.8.1

func (x *GetEgressRequest) String() string

type GetIngressInfoRequest

type GetIngressInfoRequest struct {
	IngressId string `protobuf:"bytes,1,opt,name=ingress_id,json=ingressId,proto3" json:"ingress_id,omitempty"`
	StreamKey string `protobuf:"bytes,2,opt,name=stream_key,json=streamKey,proto3" json:"stream_key,omitempty"`
	// contains filtered or unexported fields
}

Query an ingress info from an ingress ID or stream key

func (*GetIngressInfoRequest) Descriptor deprecated

func (*GetIngressInfoRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetIngressInfoRequest.ProtoReflect.Descriptor instead.

func (*GetIngressInfoRequest) GetIngressId

func (x *GetIngressInfoRequest) GetIngressId() string

func (*GetIngressInfoRequest) GetStreamKey

func (x *GetIngressInfoRequest) GetStreamKey() string

func (*GetIngressInfoRequest) ProtoMessage

func (*GetIngressInfoRequest) ProtoMessage()

func (*GetIngressInfoRequest) ProtoReflect

func (x *GetIngressInfoRequest) ProtoReflect() protoreflect.Message

func (*GetIngressInfoRequest) Reset

func (x *GetIngressInfoRequest) Reset()

func (*GetIngressInfoRequest) String

func (x *GetIngressInfoRequest) String() string

type GetIngressInfoResponse

type GetIngressInfoResponse struct {
	Info          *livekit.IngressInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
	Token         string               `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
	WsUrl         string               `protobuf:"bytes,3,opt,name=ws_url,json=wsUrl,proto3" json:"ws_url,omitempty"`
	LoggingFields map[string]string    `` /* 188-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*GetIngressInfoResponse) Descriptor deprecated

func (*GetIngressInfoResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetIngressInfoResponse.ProtoReflect.Descriptor instead.

func (*GetIngressInfoResponse) GetInfo

func (*GetIngressInfoResponse) GetLoggingFields added in v1.9.8

func (x *GetIngressInfoResponse) GetLoggingFields() map[string]string

func (*GetIngressInfoResponse) GetToken

func (x *GetIngressInfoResponse) GetToken() string

func (*GetIngressInfoResponse) GetWsUrl

func (x *GetIngressInfoResponse) GetWsUrl() string

func (*GetIngressInfoResponse) ProtoMessage

func (*GetIngressInfoResponse) ProtoMessage()

func (*GetIngressInfoResponse) ProtoReflect

func (x *GetIngressInfoResponse) ProtoReflect() protoreflect.Message

func (*GetIngressInfoResponse) Reset

func (x *GetIngressInfoResponse) Reset()

func (*GetIngressInfoResponse) String

func (x *GetIngressInfoResponse) String() string

type GetSIPTrunkAuthenticationRequest added in v1.9.1

type GetSIPTrunkAuthenticationRequest struct {

	// What Number is calling
	From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"`
	// What Number was called
	To string `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"`
	// What is the IP address of the called number
	SrcAddress string `protobuf:"bytes,4,opt,name=src_address,json=srcAddress,proto3" json:"src_address,omitempty"`
	// What Host was called
	ToHost string `protobuf:"bytes,5,opt,name=to_host,json=toHost,proto3" json:"to_host,omitempty"`
	// contains filtered or unexported fields
}

func (*GetSIPTrunkAuthenticationRequest) Descriptor deprecated added in v1.9.1

func (*GetSIPTrunkAuthenticationRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetSIPTrunkAuthenticationRequest.ProtoReflect.Descriptor instead.

func (*GetSIPTrunkAuthenticationRequest) GetFrom added in v1.9.1

func (*GetSIPTrunkAuthenticationRequest) GetSrcAddress added in v1.9.1

func (x *GetSIPTrunkAuthenticationRequest) GetSrcAddress() string

func (*GetSIPTrunkAuthenticationRequest) GetTo added in v1.9.1

func (*GetSIPTrunkAuthenticationRequest) GetToHost added in v1.9.4

func (*GetSIPTrunkAuthenticationRequest) ProtoMessage added in v1.9.1

func (*GetSIPTrunkAuthenticationRequest) ProtoMessage()

func (*GetSIPTrunkAuthenticationRequest) ProtoReflect added in v1.9.1

func (*GetSIPTrunkAuthenticationRequest) Reset added in v1.9.1

func (*GetSIPTrunkAuthenticationRequest) String added in v1.9.1

type GetSIPTrunkAuthenticationResponse added in v1.9.1

type GetSIPTrunkAuthenticationResponse struct {

	// Expected username and password
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	Drop     bool   `protobuf:"varint,3,opt,name=drop,proto3" json:"drop,omitempty"`
	// contains filtered or unexported fields
}

func (*GetSIPTrunkAuthenticationResponse) Descriptor deprecated added in v1.9.1

func (*GetSIPTrunkAuthenticationResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetSIPTrunkAuthenticationResponse.ProtoReflect.Descriptor instead.

func (*GetSIPTrunkAuthenticationResponse) GetDrop added in v1.9.9

func (*GetSIPTrunkAuthenticationResponse) GetPassword added in v1.9.1

func (x *GetSIPTrunkAuthenticationResponse) GetPassword() string

func (*GetSIPTrunkAuthenticationResponse) GetUsername added in v1.9.1

func (x *GetSIPTrunkAuthenticationResponse) GetUsername() string

func (*GetSIPTrunkAuthenticationResponse) ProtoMessage added in v1.9.1

func (*GetSIPTrunkAuthenticationResponse) ProtoMessage()

func (*GetSIPTrunkAuthenticationResponse) ProtoReflect added in v1.9.1

func (*GetSIPTrunkAuthenticationResponse) Reset added in v1.9.1

func (*GetSIPTrunkAuthenticationResponse) String added in v1.9.1

type IOInfoClient

func NewIOInfoClient

func NewIOInfoClient(bus psrpc.MessageBus, opts ...psrpc.ClientOption) (IOInfoClient, error)

NewIOInfoClient creates a psrpc client that implements the IOInfoClient interface.

type IOInfoServer

type IOInfoServer interface {

	// Close and wait for pending RPCs to complete
	Shutdown()

	// Close immediately, without waiting for pending RPCs
	Kill()
}

func NewIOInfoServer

func NewIOInfoServer(svc IOInfoServerImpl, bus psrpc.MessageBus, opts ...psrpc.ServerOption) (IOInfoServer, error)

NewIOInfoServer builds a RPCServer that will route requests to the corresponding method in the provided svc implementation.

type IngressClient

type IngressClient interface {
	IngressInternalClient
	IngressHandlerClient
}

func NewIngressClient

func NewIngressClient(params ClientParams) (IngressClient, error)

type IngressHandlerClient

type IngressHandlerClient interface {
	UpdateIngress(ctx context.Context, topic string, req *livekit3.UpdateIngressRequest, opts ...psrpc.RequestOption) (*livekit3.IngressState, error)

	DeleteIngress(ctx context.Context, topic string, req *livekit3.DeleteIngressRequest, opts ...psrpc.RequestOption) (*livekit3.IngressState, error)

	DeleteWHIPResource(ctx context.Context, topic string, req *DeleteWHIPResourceRequest, opts ...psrpc.RequestOption) (*google_protobuf.Empty, error)
}

func NewIngressHandlerClient

func NewIngressHandlerClient(bus psrpc.MessageBus, opts ...psrpc.ClientOption) (IngressHandlerClient, error)

NewIngressHandlerClient creates a psrpc client that implements the IngressHandlerClient interface.

type IngressHandlerServer

type IngressHandlerServer interface {
	RegisterUpdateIngressTopic(topic string) error
	DeregisterUpdateIngressTopic(topic string)
	RegisterDeleteIngressTopic(topic string) error
	DeregisterDeleteIngressTopic(topic string)
	RegisterDeleteWHIPResourceTopic(topic string) error
	DeregisterDeleteWHIPResourceTopic(topic string)

	// Close and wait for pending RPCs to complete
	Shutdown()

	// Close immediately, without waiting for pending RPCs
	Kill()
}

func NewIngressHandlerServer

func NewIngressHandlerServer(svc IngressHandlerServerImpl, bus psrpc.MessageBus, opts ...psrpc.ServerOption) (IngressHandlerServer, error)

NewIngressHandlerServer builds a RPCServer that will route requests to the corresponding method in the provided svc implementation.

type IngressInternalClient

type IngressInternalClient interface {
	StartIngress(ctx context.Context, req *StartIngressRequest, opts ...psrpc.RequestOption) (*livekit3.IngressInfo, error)

	ListActiveIngress(ctx context.Context, topic string, req *ListActiveIngressRequest, opts ...psrpc.RequestOption) (<-chan *psrpc.Response[*ListActiveIngressResponse], error)
}

func NewIngressInternalClient

func NewIngressInternalClient(bus psrpc.MessageBus, opts ...psrpc.ClientOption) (IngressInternalClient, error)

NewIngressInternalClient creates a psrpc client that implements the IngressInternalClient interface.

type IngressInternalServer

type IngressInternalServer interface {
	RegisterListActiveIngressTopic(topic string) error
	DeregisterListActiveIngressTopic(topic string)

	// Close and wait for pending RPCs to complete
	Shutdown()

	// Close immediately, without waiting for pending RPCs
	Kill()
}

func NewIngressInternalServer

func NewIngressInternalServer(svc IngressInternalServerImpl, bus psrpc.MessageBus, opts ...psrpc.ServerOption) (IngressInternalServer, error)

NewIngressInternalServer builds a RPCServer that will route requests to the corresponding method in the provided svc implementation.

type IngressInternalServerImpl

type IngressInternalServerImpl interface {
	StartIngress(context.Context, *StartIngressRequest) (*livekit3.IngressInfo, error)
	StartIngressAffinity(context.Context, *StartIngressRequest) float32

	ListActiveIngress(context.Context, *ListActiveIngressRequest) (*ListActiveIngressResponse, error)
}

type InternalCreateSIPParticipantRequest added in v1.9.5

type InternalCreateSIPParticipantRequest struct {

	// IP that SIP INVITE is sent too
	Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	// Number used to make the call
	Number string `protobuf:"bytes,3,opt,name=number,proto3" json:"number,omitempty"`
	// Number to call to
	CallTo              string `protobuf:"bytes,4,opt,name=call_to,json=callTo,proto3" json:"call_to,omitempty"`
	Username            string `protobuf:"bytes,5,opt,name=username,proto3" json:"username,omitempty"`
	Password            string `protobuf:"bytes,6,opt,name=password,proto3" json:"password,omitempty"`
	RoomName            string `protobuf:"bytes,7,opt,name=room_name,json=roomName,proto3" json:"room_name,omitempty"`
	ParticipantIdentity string `protobuf:"bytes,8,opt,name=participant_identity,json=participantIdentity,proto3" json:"participant_identity,omitempty"`
	// optional token that should be used when creating LiveKit participant
	Token string `protobuf:"bytes,9,opt,name=token,proto3" json:"token,omitempty"`
	// optional websocket url that should be used when creating LiveKit participant
	WsUrl string `protobuf:"bytes,10,opt,name=ws_url,json=wsUrl,proto3" json:"ws_url,omitempty"`
	// Optionally send following DTMF digits (extension codes) when making a call.
	// Character 'w' can be used to add a 0.5 sec delay.
	Dtmf string `protobuf:"bytes,11,opt,name=dtmf,proto3" json:"dtmf,omitempty"`
	// Optionally play ringtone in the room as an audible indicator for existing participants
	PlayRingtone bool `protobuf:"varint,12,opt,name=play_ringtone,json=playRingtone,proto3" json:"play_ringtone,omitempty"`
	// contains filtered or unexported fields
}

func (*InternalCreateSIPParticipantRequest) Descriptor deprecated added in v1.9.5

func (*InternalCreateSIPParticipantRequest) Descriptor() ([]byte, []int)

Deprecated: Use InternalCreateSIPParticipantRequest.ProtoReflect.Descriptor instead.

func (*InternalCreateSIPParticipantRequest) GetAddress added in v1.9.5

func (*InternalCreateSIPParticipantRequest) GetCallTo added in v1.9.5

func (*InternalCreateSIPParticipantRequest) GetDtmf added in v1.12.0

func (*InternalCreateSIPParticipantRequest) GetNumber added in v1.9.5

func (*InternalCreateSIPParticipantRequest) GetParticipantIdentity added in v1.9.5

func (x *InternalCreateSIPParticipantRequest) GetParticipantIdentity() string

func (*InternalCreateSIPParticipantRequest) GetPassword added in v1.9.5

func (*InternalCreateSIPParticipantRequest) GetPlayRingtone added in v1.14.0

func (x *InternalCreateSIPParticipantRequest) GetPlayRingtone() bool

func (*InternalCreateSIPParticipantRequest) GetRoomName added in v1.9.5

func (*InternalCreateSIPParticipantRequest) GetToken added in v1.9.8

func (*InternalCreateSIPParticipantRequest) GetUsername added in v1.9.5

func (*InternalCreateSIPParticipantRequest) GetWsUrl added in v1.9.8

func (*InternalCreateSIPParticipantRequest) ProtoMessage added in v1.9.5

func (*InternalCreateSIPParticipantRequest) ProtoMessage()

func (*InternalCreateSIPParticipantRequest) ProtoReflect added in v1.9.5

func (*InternalCreateSIPParticipantRequest) Reset added in v1.9.5

func (*InternalCreateSIPParticipantRequest) String added in v1.9.5

type InternalCreateSIPParticipantResponse added in v1.9.5

type InternalCreateSIPParticipantResponse struct {
	ParticipantId       string `protobuf:"bytes,1,opt,name=participant_id,json=participantId,proto3" json:"participant_id,omitempty"`
	ParticipantIdentity string `protobuf:"bytes,2,opt,name=participant_identity,json=participantIdentity,proto3" json:"participant_identity,omitempty"`
	// contains filtered or unexported fields
}

func (*InternalCreateSIPParticipantResponse) Descriptor deprecated added in v1.9.5

func (*InternalCreateSIPParticipantResponse) Descriptor() ([]byte, []int)

Deprecated: Use InternalCreateSIPParticipantResponse.ProtoReflect.Descriptor instead.

func (*InternalCreateSIPParticipantResponse) GetParticipantId added in v1.9.5

func (x *InternalCreateSIPParticipantResponse) GetParticipantId() string

func (*InternalCreateSIPParticipantResponse) GetParticipantIdentity added in v1.9.5

func (x *InternalCreateSIPParticipantResponse) GetParticipantIdentity() string

func (*InternalCreateSIPParticipantResponse) ProtoMessage added in v1.9.5

func (*InternalCreateSIPParticipantResponse) ProtoMessage()

func (*InternalCreateSIPParticipantResponse) ProtoReflect added in v1.9.5

func (*InternalCreateSIPParticipantResponse) Reset added in v1.9.5

func (*InternalCreateSIPParticipantResponse) String added in v1.9.5

type KeepaliveClient added in v1.9.5

type KeepaliveClient[NodeIDTopicType ~string] interface {
	SubscribePing(ctx context.Context, nodeID NodeIDTopicType) (psrpc.Subscription[*KeepalivePing], error)
}

func NewKeepaliveClient added in v1.9.5

func NewKeepaliveClient[NodeIDTopicType ~string](bus psrpc.MessageBus, opts ...psrpc.ClientOption) (KeepaliveClient[NodeIDTopicType], error)

NewKeepaliveClient creates a psrpc client that implements the KeepaliveClient interface.

type KeepalivePing added in v1.9.5

type KeepalivePing struct {
	Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*KeepalivePing) Descriptor deprecated added in v1.9.5

func (*KeepalivePing) Descriptor() ([]byte, []int)

Deprecated: Use KeepalivePing.ProtoReflect.Descriptor instead.

func (*KeepalivePing) GetTimestamp added in v1.9.5

func (x *KeepalivePing) GetTimestamp() int64

func (*KeepalivePing) ProtoMessage added in v1.9.5

func (*KeepalivePing) ProtoMessage()

func (*KeepalivePing) ProtoReflect added in v1.9.5

func (x *KeepalivePing) ProtoReflect() protoreflect.Message

func (*KeepalivePing) Reset added in v1.9.5

func (x *KeepalivePing) Reset()

func (*KeepalivePing) String added in v1.9.5

func (x *KeepalivePing) String() string

type KeepalivePubSub added in v1.9.5

type KeepalivePubSub interface {
	KeepaliveClient[livekit.NodeID]
	KeepaliveServer[livekit.NodeID]
}

func NewKeepalivePubSub added in v1.9.5

func NewKeepalivePubSub(params ClientParams) (KeepalivePubSub, error)

type KeepaliveServer added in v1.9.5

type KeepaliveServer[NodeIDTopicType ~string] interface {
	PublishPing(ctx context.Context, nodeID NodeIDTopicType, msg *KeepalivePing) error

	// Close and wait for pending RPCs to complete
	Shutdown()

	// Close immediately, without waiting for pending RPCs
	Kill()
}

func NewKeepaliveServer added in v1.9.5

func NewKeepaliveServer[NodeIDTopicType ~string](svc KeepaliveServerImpl, bus psrpc.MessageBus, opts ...psrpc.ServerOption) (KeepaliveServer[NodeIDTopicType], error)

NewKeepaliveServer builds a RPCServer that will route requests to the corresponding method in the provided svc implementation.

type KeepaliveServerImpl added in v1.9.5

type KeepaliveServerImpl interface {
}

type ListActiveEgressRequest

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

func (*ListActiveEgressRequest) Descriptor deprecated

func (*ListActiveEgressRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListActiveEgressRequest.ProtoReflect.Descriptor instead.

func (*ListActiveEgressRequest) ProtoMessage

func (*ListActiveEgressRequest) ProtoMessage()

func (*ListActiveEgressRequest) ProtoReflect

func (x *ListActiveEgressRequest) ProtoReflect() protoreflect.Message

func (*ListActiveEgressRequest) Reset

func (x *ListActiveEgressRequest) Reset()

func (*ListActiveEgressRequest) String

func (x *ListActiveEgressRequest) String() string

type ListActiveEgressResponse

type ListActiveEgressResponse struct {
	EgressIds []string `protobuf:"bytes,1,rep,name=egress_ids,json=egressIds,proto3" json:"egress_ids,omitempty"`
	// contains filtered or unexported fields
}

func (*ListActiveEgressResponse) Descriptor deprecated

func (*ListActiveEgressResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListActiveEgressResponse.ProtoReflect.Descriptor instead.

func (*ListActiveEgressResponse) GetEgressIds

func (x *ListActiveEgressResponse) GetEgressIds() []string

func (*ListActiveEgressResponse) ProtoMessage

func (*ListActiveEgressResponse) ProtoMessage()

func (*ListActiveEgressResponse) ProtoReflect

func (x *ListActiveEgressResponse) ProtoReflect() protoreflect.Message

func (*ListActiveEgressResponse) Reset

func (x *ListActiveEgressResponse) Reset()

func (*ListActiveEgressResponse) String

func (x *ListActiveEgressResponse) String() string

type ListActiveIngressRequest

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

func (*ListActiveIngressRequest) Descriptor deprecated

func (*ListActiveIngressRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListActiveIngressRequest.ProtoReflect.Descriptor instead.

func (*ListActiveIngressRequest) ProtoMessage

func (*ListActiveIngressRequest) ProtoMessage()

func (*ListActiveIngressRequest) ProtoReflect

func (x *ListActiveIngressRequest) ProtoReflect() protoreflect.Message

func (*ListActiveIngressRequest) Reset

func (x *ListActiveIngressRequest) Reset()

func (*ListActiveIngressRequest) String

func (x *ListActiveIngressRequest) String() string

type ListActiveIngressResponse

type ListActiveIngressResponse struct {
	IngressIds []string `protobuf:"bytes,1,rep,name=ingress_ids,json=ingressIds,proto3" json:"ingress_ids,omitempty"`
	// contains filtered or unexported fields
}

func (*ListActiveIngressResponse) Descriptor deprecated

func (*ListActiveIngressResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListActiveIngressResponse.ProtoReflect.Descriptor instead.

func (*ListActiveIngressResponse) GetIngressIds

func (x *ListActiveIngressResponse) GetIngressIds() []string

func (*ListActiveIngressResponse) ProtoMessage

func (*ListActiveIngressResponse) ProtoMessage()

func (*ListActiveIngressResponse) ProtoReflect

func (*ListActiveIngressResponse) Reset

func (x *ListActiveIngressResponse) Reset()

func (*ListActiveIngressResponse) String

func (x *ListActiveIngressResponse) String() string

type PSRPCConfig added in v1.9.0

type PSRPCConfig struct {
	MaxAttempts int           `yaml:"max_attempts,omitempty"`
	Timeout     time.Duration `yaml:"timeout,omitempty"`
	Backoff     time.Duration `yaml:"backoff,omitempty"`
	BufferSize  int           `yaml:"buffer_size,omitempty"`
}

type PSRPCMetricsObserver added in v1.10.0

type PSRPCMetricsObserver struct{}

func (PSRPCMetricsObserver) OnMultiRequest added in v1.10.0

func (o PSRPCMetricsObserver) OnMultiRequest(role middleware.MetricRole, info psrpc.RPCInfo, duration time.Duration, responseCount int, errorCount int)

func (PSRPCMetricsObserver) OnStreamClose added in v1.10.0

func (o PSRPCMetricsObserver) OnStreamClose(role middleware.MetricRole, info psrpc.RPCInfo)

func (PSRPCMetricsObserver) OnStreamOpen added in v1.10.0

func (o PSRPCMetricsObserver) OnStreamOpen(role middleware.MetricRole, info psrpc.RPCInfo)

func (PSRPCMetricsObserver) OnStreamRecv added in v1.10.0

func (o PSRPCMetricsObserver) OnStreamRecv(role middleware.MetricRole, info psrpc.RPCInfo, err error)

func (PSRPCMetricsObserver) OnStreamSend added in v1.10.0

func (o PSRPCMetricsObserver) OnStreamSend(role middleware.MetricRole, info psrpc.RPCInfo, duration time.Duration, err error)

func (PSRPCMetricsObserver) OnUnaryRequest added in v1.10.0

func (o PSRPCMetricsObserver) OnUnaryRequest(role middleware.MetricRole, info psrpc.RPCInfo, duration time.Duration, err error)

type PSRPCMetricsOption added in v1.14.0

type PSRPCMetricsOption func(*psrpcMetricsOptions)

func WithCurryLabels added in v1.14.0

func WithCurryLabels(labels prometheus.Labels) PSRPCMetricsOption

type ParticipantClient added in v1.9.0

type ParticipantClient[ParticipantTopicType ~string] interface {
	RemoveParticipant(ctx context.Context, participant ParticipantTopicType, req *livekit4.RoomParticipantIdentity, opts ...psrpc.RequestOption) (*livekit4.RemoveParticipantResponse, error)

	MutePublishedTrack(ctx context.Context, participant ParticipantTopicType, req *livekit4.MuteRoomTrackRequest, opts ...psrpc.RequestOption) (*livekit4.MuteRoomTrackResponse, error)

	UpdateParticipant(ctx context.Context, participant ParticipantTopicType, req *livekit4.UpdateParticipantRequest, opts ...psrpc.RequestOption) (*livekit.ParticipantInfo, error)

	UpdateSubscriptions(ctx context.Context, participant ParticipantTopicType, req *livekit4.UpdateSubscriptionsRequest, opts ...psrpc.RequestOption) (*livekit4.UpdateSubscriptionsResponse, error)
}

func NewParticipantClient added in v1.9.0

func NewParticipantClient[ParticipantTopicType ~string](bus psrpc.MessageBus, opts ...psrpc.ClientOption) (ParticipantClient[ParticipantTopicType], error)

NewParticipantClient creates a psrpc client that implements the ParticipantClient interface.

type ParticipantServer added in v1.9.0

type ParticipantServer[ParticipantTopicType ~string] interface {
	RegisterRemoveParticipantTopic(participant ParticipantTopicType) error
	DeregisterRemoveParticipantTopic(participant ParticipantTopicType)
	RegisterMutePublishedTrackTopic(participant ParticipantTopicType) error
	DeregisterMutePublishedTrackTopic(participant ParticipantTopicType)
	RegisterUpdateParticipantTopic(participant ParticipantTopicType) error
	DeregisterUpdateParticipantTopic(participant ParticipantTopicType)
	RegisterUpdateSubscriptionsTopic(participant ParticipantTopicType) error
	DeregisterUpdateSubscriptionsTopic(participant ParticipantTopicType)
	RegisterAllParticipantTopics(participant ParticipantTopicType) error
	DeregisterAllParticipantTopics(participant ParticipantTopicType)

	// Close and wait for pending RPCs to complete
	Shutdown()

	// Close immediately, without waiting for pending RPCs
	Kill()
}

func NewParticipantServer added in v1.9.0

func NewParticipantServer[ParticipantTopicType ~string](svc ParticipantServerImpl, bus psrpc.MessageBus, opts ...psrpc.ServerOption) (ParticipantServer[ParticipantTopicType], error)

NewParticipantServer builds a RPCServer that will route requests to the corresponding method in the provided svc implementation.

type ParticipantTopic added in v1.8.1

type ParticipantTopic string

func FormatParticipantTopic added in v1.8.1

func FormatParticipantTopic(roomName livekit.RoomName, identity livekit.ParticipantIdentity) ParticipantTopic

type Race

type Race[T any] struct {
	// contains filtered or unexported fields
}

func NewRace

func NewRace[T any](ctx context.Context) *Race[T]

NewRace creates a race to yield the result from one or more candidate functions

func (*Race[T]) Go

func (r *Race[T]) Go(fn func(ctx context.Context) (*T, error))

Go adds a candidate function to the race by running it in a new goroutine

func (*Race[T]) Wait

func (r *Race[T]) Wait() (int, *T, error)

Wait awaits the first complete function and returns the index and results or -1 if the context is cancelled before any candidate finishes.

type RelaySignalRequest added in v1.4.3

type RelaySignalRequest struct {
	StartSession *livekit.StartSession    `protobuf:"bytes,1,opt,name=start_session,json=startSession,proto3" json:"start_session,omitempty"`
	Requests     []*livekit.SignalRequest `protobuf:"bytes,3,rep,name=requests,proto3" json:"requests,omitempty"`
	Seq          uint64                   `protobuf:"varint,4,opt,name=seq,proto3" json:"seq,omitempty"`
	Close        bool                     `protobuf:"varint,5,opt,name=close,proto3" json:"close,omitempty"`
	// contains filtered or unexported fields
}

func (*RelaySignalRequest) Descriptor deprecated added in v1.4.3

func (*RelaySignalRequest) Descriptor() ([]byte, []int)

Deprecated: Use RelaySignalRequest.ProtoReflect.Descriptor instead.

func (*RelaySignalRequest) GetClose added in v1.5.6

func (x *RelaySignalRequest) GetClose() bool

func (*RelaySignalRequest) GetRequests added in v1.5.3

func (x *RelaySignalRequest) GetRequests() []*livekit.SignalRequest

func (*RelaySignalRequest) GetSeq added in v1.5.3

func (x *RelaySignalRequest) GetSeq() uint64

func (*RelaySignalRequest) GetStartSession added in v1.4.3

func (x *RelaySignalRequest) GetStartSession() *livekit.StartSession

func (*RelaySignalRequest) ProtoMessage added in v1.4.3

func (*RelaySignalRequest) ProtoMessage()

func (*RelaySignalRequest) ProtoReflect added in v1.4.3

func (x *RelaySignalRequest) ProtoReflect() protoreflect.Message

func (*RelaySignalRequest) Reset added in v1.4.3

func (x *RelaySignalRequest) Reset()

func (*RelaySignalRequest) String added in v1.4.3

func (x *RelaySignalRequest) String() string

type RelaySignalResponse added in v1.4.3

type RelaySignalResponse struct {
	Responses []*livekit.SignalResponse `protobuf:"bytes,2,rep,name=responses,proto3" json:"responses,omitempty"`
	Seq       uint64                    `protobuf:"varint,3,opt,name=seq,proto3" json:"seq,omitempty"`
	Close     bool                      `protobuf:"varint,4,opt,name=close,proto3" json:"close,omitempty"`
	// contains filtered or unexported fields
}

func (*RelaySignalResponse) Descriptor deprecated added in v1.4.3

func (*RelaySignalResponse) Descriptor() ([]byte, []int)

Deprecated: Use RelaySignalResponse.ProtoReflect.Descriptor instead.

func (*RelaySignalResponse) GetClose added in v1.5.6

func (x *RelaySignalResponse) GetClose() bool

func (*RelaySignalResponse) GetResponses added in v1.5.2

func (x *RelaySignalResponse) GetResponses() []*livekit.SignalResponse

func (*RelaySignalResponse) GetSeq added in v1.5.3

func (x *RelaySignalResponse) GetSeq() uint64

func (*RelaySignalResponse) ProtoMessage added in v1.4.3

func (*RelaySignalResponse) ProtoMessage()

func (*RelaySignalResponse) ProtoReflect added in v1.4.3

func (x *RelaySignalResponse) ProtoReflect() protoreflect.Message

func (*RelaySignalResponse) Reset added in v1.4.3

func (x *RelaySignalResponse) Reset()

func (*RelaySignalResponse) String added in v1.4.3

func (x *RelaySignalResponse) String() string

type RoomClient added in v1.8.1

type RoomClient[RoomTopicType ~string] interface {
	DeleteRoom(ctx context.Context, room RoomTopicType, req *livekit4.DeleteRoomRequest, opts ...psrpc.RequestOption) (*livekit4.DeleteRoomResponse, error)

	SendData(ctx context.Context, room RoomTopicType, req *livekit4.SendDataRequest, opts ...psrpc.RequestOption) (*livekit4.SendDataResponse, error)

	UpdateRoomMetadata(ctx context.Context, room RoomTopicType, req *livekit4.UpdateRoomMetadataRequest, opts ...psrpc.RequestOption) (*livekit.Room, error)
}

func NewRoomClient added in v1.8.1

func NewRoomClient[RoomTopicType ~string](bus psrpc.MessageBus, opts ...psrpc.ClientOption) (RoomClient[RoomTopicType], error)

NewRoomClient creates a psrpc client that implements the RoomClient interface.

type RoomServer added in v1.8.1

type RoomServer[RoomTopicType ~string] interface {
	RegisterDeleteRoomTopic(room RoomTopicType) error
	DeregisterDeleteRoomTopic(room RoomTopicType)
	RegisterSendDataTopic(room RoomTopicType) error
	DeregisterSendDataTopic(room RoomTopicType)
	RegisterUpdateRoomMetadataTopic(room RoomTopicType) error
	DeregisterUpdateRoomMetadataTopic(room RoomTopicType)
	RegisterAllRoomTopics(room RoomTopicType) error
	DeregisterAllRoomTopics(room RoomTopicType)

	// Close and wait for pending RPCs to complete
	Shutdown()

	// Close immediately, without waiting for pending RPCs
	Kill()
}

func NewRoomServer added in v1.8.1

func NewRoomServer[RoomTopicType ~string](svc RoomServerImpl, bus psrpc.MessageBus, opts ...psrpc.ServerOption) (RoomServer[RoomTopicType], error)

NewRoomServer builds a RPCServer that will route requests to the corresponding method in the provided svc implementation.

type RoomTopic added in v1.8.1

type RoomTopic string

func FormatRoomTopic added in v1.8.1

func FormatRoomTopic(roomName livekit.RoomName) RoomTopic

type SIPClient added in v1.9.1

type SIPClient interface {
	SIPInternalClient
}

func NewSIPClient added in v1.9.1

func NewSIPClient(bus psrpc.MessageBus) (SIPClient, error)

type SIPDispatchResult added in v1.9.9

type SIPDispatchResult int32
const (
	SIPDispatchResult_LEGACY_ACCEPT_OR_PIN SIPDispatchResult = 0 // check request_pin field
	SIPDispatchResult_ACCEPT               SIPDispatchResult = 1
	SIPDispatchResult_REQUEST_PIN          SIPDispatchResult = 2
	SIPDispatchResult_REJECT               SIPDispatchResult = 3
	SIPDispatchResult_DROP                 SIPDispatchResult = 4
)

func (SIPDispatchResult) Descriptor added in v1.9.9

func (SIPDispatchResult) Enum added in v1.9.9

func (SIPDispatchResult) EnumDescriptor deprecated added in v1.9.9

func (SIPDispatchResult) EnumDescriptor() ([]byte, []int)

Deprecated: Use SIPDispatchResult.Descriptor instead.

func (SIPDispatchResult) Number added in v1.9.9

func (SIPDispatchResult) String added in v1.9.9

func (x SIPDispatchResult) String() string

func (SIPDispatchResult) Type added in v1.9.9

type SIPInternalClient added in v1.9.1

type SIPInternalClient interface {
	CreateSIPParticipant(ctx context.Context, topic string, req *InternalCreateSIPParticipantRequest, opts ...psrpc.RequestOption) (*InternalCreateSIPParticipantResponse, error)
}

func NewSIPInternalClient added in v1.9.1

func NewSIPInternalClient(bus psrpc.MessageBus, opts ...psrpc.ClientOption) (SIPInternalClient, error)

NewSIPInternalClient creates a psrpc client that implements the SIPInternalClient interface.

type SIPInternalServer added in v1.9.1

type SIPInternalServer interface {
	RegisterCreateSIPParticipantTopic(topic string) error
	DeregisterCreateSIPParticipantTopic(topic string)

	// Close and wait for pending RPCs to complete
	Shutdown()

	// Close immediately, without waiting for pending RPCs
	Kill()
}

func NewSIPInternalServer added in v1.9.1

func NewSIPInternalServer(svc SIPInternalServerImpl, bus psrpc.MessageBus, opts ...psrpc.ServerOption) (SIPInternalServer, error)

NewSIPInternalServer builds a RPCServer that will route requests to the corresponding method in the provided svc implementation.

type SIPInternalServerImpl added in v1.9.1

type SIPInternalServerImpl interface {
	CreateSIPParticipant(context.Context, *InternalCreateSIPParticipantRequest) (*InternalCreateSIPParticipantResponse, error)
	CreateSIPParticipantAffinity(context.Context, *InternalCreateSIPParticipantRequest) float32
}

type SignalClient added in v1.4.3

type SignalClient[NodeIdTopicType ~string] interface {
	RelaySignal(ctx context.Context, nodeId NodeIdTopicType, opts ...psrpc.RequestOption) (psrpc.ClientStream[*RelaySignalRequest, *RelaySignalResponse], error)
}

func NewSignalClient added in v1.4.3

func NewSignalClient[NodeIdTopicType ~string](bus psrpc.MessageBus, opts ...psrpc.ClientOption) (SignalClient[NodeIdTopicType], error)

NewSignalClient creates a psrpc client that implements the SignalClient interface.

type SignalServer added in v1.4.3

type SignalServer[NodeIdTopicType ~string] interface {
	RegisterRelaySignalTopic(nodeId NodeIdTopicType) error
	DeregisterRelaySignalTopic(nodeId NodeIdTopicType)

	// Close and wait for pending RPCs to complete
	Shutdown()

	// Close immediately, without waiting for pending RPCs
	Kill()
}

func NewSignalServer added in v1.4.3

func NewSignalServer[NodeIdTopicType ~string](svc SignalServerImpl, bus psrpc.MessageBus, opts ...psrpc.ServerOption) (SignalServer[NodeIdTopicType], error)

NewSignalServer builds a RPCServer that will route requests to the corresponding method in the provided svc implementation.

type SignalServerImpl added in v1.4.3

type SignalServerImpl interface {
	RelaySignal(psrpc.ServerStream[*RelaySignalResponse, *RelaySignalRequest]) error
}

type StartEgressRequest

type StartEgressRequest struct {

	// request metadata
	EgressId string `protobuf:"bytes,1,opt,name=egress_id,json=egressId,proto3" json:"egress_id,omitempty"`
	// request
	//
	// Types that are assignable to Request:
	//
	//	*StartEgressRequest_RoomComposite
	//	*StartEgressRequest_Web
	//	*StartEgressRequest_Participant
	//	*StartEgressRequest_TrackComposite
	//	*StartEgressRequest_Track
	Request isStartEgressRequest_Request `protobuf_oneof:"request"`
	// connection info
	RoomId string `protobuf:"bytes,3,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"`
	Token  string `protobuf:"bytes,8,opt,name=token,proto3" json:"token,omitempty"`
	WsUrl  string `protobuf:"bytes,9,opt,name=ws_url,json=wsUrl,proto3" json:"ws_url,omitempty"`
	// contains filtered or unexported fields
}

func (*StartEgressRequest) Descriptor deprecated

func (*StartEgressRequest) Descriptor() ([]byte, []int)

Deprecated: Use StartEgressRequest.ProtoReflect.Descriptor instead.

func (*StartEgressRequest) GetEgressId

func (x *StartEgressRequest) GetEgressId() string

func (*StartEgressRequest) GetParticipant added in v1.7.0

func (*StartEgressRequest) GetRequest

func (m *StartEgressRequest) GetRequest() isStartEgressRequest_Request

func (*StartEgressRequest) GetRoomComposite

func (x *StartEgressRequest) GetRoomComposite() *livekit.RoomCompositeEgressRequest

func (*StartEgressRequest) GetRoomId

func (x *StartEgressRequest) GetRoomId() string

func (*StartEgressRequest) GetToken

func (x *StartEgressRequest) GetToken() string

func (*StartEgressRequest) GetTrack

func (*StartEgressRequest) GetTrackComposite

func (x *StartEgressRequest) GetTrackComposite() *livekit.TrackCompositeEgressRequest

func (*StartEgressRequest) GetWeb

func (*StartEgressRequest) GetWsUrl

func (x *StartEgressRequest) GetWsUrl() string

func (*StartEgressRequest) ProtoMessage

func (*StartEgressRequest) ProtoMessage()

func (*StartEgressRequest) ProtoReflect

func (x *StartEgressRequest) ProtoReflect() protoreflect.Message

func (*StartEgressRequest) Reset

func (x *StartEgressRequest) Reset()

func (*StartEgressRequest) String

func (x *StartEgressRequest) String() string

type StartEgressRequest_Participant added in v1.7.0

type StartEgressRequest_Participant struct {
	Participant *livekit.ParticipantEgressRequest `protobuf:"bytes,13,opt,name=participant,proto3,oneof"`
}

type StartEgressRequest_RoomComposite

type StartEgressRequest_RoomComposite struct {
	RoomComposite *livekit.RoomCompositeEgressRequest `protobuf:"bytes,5,opt,name=room_composite,json=roomComposite,proto3,oneof"`
}

type StartEgressRequest_Track

type StartEgressRequest_Track struct {
	Track *livekit.TrackEgressRequest `protobuf:"bytes,7,opt,name=track,proto3,oneof"`
}

type StartEgressRequest_TrackComposite

type StartEgressRequest_TrackComposite struct {
	TrackComposite *livekit.TrackCompositeEgressRequest `protobuf:"bytes,6,opt,name=track_composite,json=trackComposite,proto3,oneof"`
}

type StartEgressRequest_Web

type StartEgressRequest_Web struct {
	Web *livekit.WebEgressRequest `protobuf:"bytes,11,opt,name=web,proto3,oneof"`
}

type StartIngressRequest added in v1.6.0

type StartIngressRequest struct {
	Info          *livekit.IngressInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
	Token         string               `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
	WsUrl         string               `protobuf:"bytes,3,opt,name=ws_url,json=wsUrl,proto3" json:"ws_url,omitempty"`
	LoggingFields map[string]string    `` /* 188-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*StartIngressRequest) Descriptor deprecated added in v1.6.0

func (*StartIngressRequest) Descriptor() ([]byte, []int)

Deprecated: Use StartIngressRequest.ProtoReflect.Descriptor instead.

func (*StartIngressRequest) GetInfo added in v1.6.0

func (x *StartIngressRequest) GetInfo() *livekit.IngressInfo

func (*StartIngressRequest) GetLoggingFields added in v1.9.8

func (x *StartIngressRequest) GetLoggingFields() map[string]string

func (*StartIngressRequest) GetToken added in v1.6.0

func (x *StartIngressRequest) GetToken() string

func (*StartIngressRequest) GetWsUrl added in v1.6.0

func (x *StartIngressRequest) GetWsUrl() string

func (*StartIngressRequest) ProtoMessage added in v1.6.0

func (*StartIngressRequest) ProtoMessage()

func (*StartIngressRequest) ProtoReflect added in v1.6.0

func (x *StartIngressRequest) ProtoReflect() protoreflect.Message

func (*StartIngressRequest) Reset added in v1.6.0

func (x *StartIngressRequest) Reset()

func (*StartIngressRequest) String added in v1.6.0

func (x *StartIngressRequest) String() string

type TopicFormatter added in v1.8.1

type TopicFormatter interface {
	ParticipantTopic(ctx context.Context, roomName livekit.RoomName, identity livekit.ParticipantIdentity) ParticipantTopic
	RoomTopic(ctx context.Context, roomName livekit.RoomName) RoomTopic
}

func NewTopicFormatter added in v1.9.0

func NewTopicFormatter() TopicFormatter

type TypedParticipantClient added in v1.9.0

type TypedParticipantClient = ParticipantClient[ParticipantTopic]

func NewTypedParticipantClient added in v1.9.0

func NewTypedParticipantClient(params ClientParams) (TypedParticipantClient, error)

type TypedParticipantServer added in v1.9.0

type TypedParticipantServer = ParticipantServer[ParticipantTopic]

func NewTypedParticipantServer added in v1.9.0

func NewTypedParticipantServer(svc ParticipantServerImpl, bus psrpc.MessageBus, opts ...psrpc.ServerOption) (TypedParticipantServer, error)

type TypedRoomClient added in v1.8.1

type TypedRoomClient = RoomClient[RoomTopic]

func NewTypedRoomClient added in v1.8.1

func NewTypedRoomClient(params ClientParams) (TypedRoomClient, error)

type TypedRoomServer added in v1.8.1

type TypedRoomServer = RoomServer[RoomTopic]

func NewTypedRoomServer added in v1.8.1

func NewTypedRoomServer(svc RoomServerImpl, bus psrpc.MessageBus, opts ...psrpc.ServerOption) (TypedRoomServer, error)

type TypedSignalClient added in v1.4.3

type TypedSignalClient = SignalClient[livekit.NodeID]

func NewTypedSignalClient added in v1.4.3

func NewTypedSignalClient(nodeID livekit.NodeID, bus psrpc.MessageBus, opts ...psrpc.ClientOption) (TypedSignalClient, error)

type TypedSignalServer added in v1.4.3

type TypedSignalServer = SignalServer[livekit.NodeID]

func NewTypedSignalServer added in v1.4.3

func NewTypedSignalServer(nodeID livekit.NodeID, svc SignalServerImpl, bus psrpc.MessageBus, opts ...psrpc.ServerOption) (TypedSignalServer, error)

type UnimplementedMetricsObserver added in v1.10.0

type UnimplementedMetricsObserver struct{}

func (UnimplementedMetricsObserver) OnMultiRequest added in v1.10.0

func (o UnimplementedMetricsObserver) OnMultiRequest(role middleware.MetricRole, rpcInfo psrpc.RPCInfo, duration time.Duration, responseCount int, errorCount int)

func (UnimplementedMetricsObserver) OnStreamClose added in v1.10.0

func (o UnimplementedMetricsObserver) OnStreamClose(role middleware.MetricRole, rpcInfo psrpc.RPCInfo)

func (UnimplementedMetricsObserver) OnStreamOpen added in v1.10.0

func (o UnimplementedMetricsObserver) OnStreamOpen(role middleware.MetricRole, rpcInfo psrpc.RPCInfo)

func (UnimplementedMetricsObserver) OnStreamRecv added in v1.10.0

func (o UnimplementedMetricsObserver) OnStreamRecv(role middleware.MetricRole, rpcInfo psrpc.RPCInfo, err error)

func (UnimplementedMetricsObserver) OnStreamSend added in v1.10.0

func (o UnimplementedMetricsObserver) OnStreamSend(role middleware.MetricRole, rpcInfo psrpc.RPCInfo, duration time.Duration, err error)

func (UnimplementedMetricsObserver) OnUnaryRequest added in v1.10.0

func (o UnimplementedMetricsObserver) OnUnaryRequest(role middleware.MetricRole, rpcInfo psrpc.RPCInfo, duration time.Duration, err error)

type UpdateIngressStateRequest

type UpdateIngressStateRequest struct {
	IngressId string                `protobuf:"bytes,1,opt,name=ingress_id,json=ingressId,proto3" json:"ingress_id,omitempty"`
	State     *livekit.IngressState `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"`
	// contains filtered or unexported fields
}

Request to store an update to the ingress state ingress -> service

func (*UpdateIngressStateRequest) Descriptor deprecated

func (*UpdateIngressStateRequest) Descriptor() ([]byte, []int)

Deprecated: Use UpdateIngressStateRequest.ProtoReflect.Descriptor instead.

func (*UpdateIngressStateRequest) GetIngressId

func (x *UpdateIngressStateRequest) GetIngressId() string

func (*UpdateIngressStateRequest) GetState

func (*UpdateIngressStateRequest) ProtoMessage

func (*UpdateIngressStateRequest) ProtoMessage()

func (*UpdateIngressStateRequest) ProtoReflect

func (*UpdateIngressStateRequest) Reset

func (x *UpdateIngressStateRequest) Reset()

func (*UpdateIngressStateRequest) String

func (x *UpdateIngressStateRequest) String() string

type UpdateMetricsRequest added in v1.9.4

type UpdateMetricsRequest struct {
	Info        *livekit.EgressInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
	AvgCpuUsage float32             `protobuf:"fixed32,3,opt,name=avg_cpu_usage,json=avgCpuUsage,proto3" json:"avg_cpu_usage,omitempty"`
	MaxCpuUsage float32             `protobuf:"fixed32,4,opt,name=max_cpu_usage,json=maxCpuUsage,proto3" json:"max_cpu_usage,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateMetricsRequest) Descriptor deprecated added in v1.9.4

func (*UpdateMetricsRequest) Descriptor() ([]byte, []int)

Deprecated: Use UpdateMetricsRequest.ProtoReflect.Descriptor instead.

func (*UpdateMetricsRequest) GetAvgCpuUsage added in v1.9.4

func (x *UpdateMetricsRequest) GetAvgCpuUsage() float32

func (*UpdateMetricsRequest) GetInfo added in v1.9.4

func (x *UpdateMetricsRequest) GetInfo() *livekit.EgressInfo

func (*UpdateMetricsRequest) GetMaxCpuUsage added in v1.9.4

func (x *UpdateMetricsRequest) GetMaxCpuUsage() float32

func (*UpdateMetricsRequest) ProtoMessage added in v1.9.4

func (*UpdateMetricsRequest) ProtoMessage()

func (*UpdateMetricsRequest) ProtoReflect added in v1.9.4

func (x *UpdateMetricsRequest) ProtoReflect() protoreflect.Message

func (*UpdateMetricsRequest) Reset added in v1.9.4

func (x *UpdateMetricsRequest) Reset()

func (*UpdateMetricsRequest) String added in v1.9.4

func (x *UpdateMetricsRequest) String() string

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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