rpc

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_pkg_service_rpc_egress_proto protoreflect.FileDescriptor
View Source
var File_pkg_service_rpc_ingress_proto protoreflect.FileDescriptor
View Source
var File_pkg_service_rpc_io_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type EgressClient

type EgressClient interface {
	EgressInternalClient
	EgressHandlerClient
}

func NewEgressClient

func NewEgressClient(nodeID livekit.NodeID, bus psrpc.MessageBus) (EgressClient, error)

type EgressHandlerClient

func NewEgressHandlerClient

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

NewEgressHandlerClient creates a psrpc client that implements the EgressHandlerClient interface.

type EgressHandlerServer

type EgressHandlerServer interface {
	RegisterUpdateStreamTopic(string) error
	DeregisterUpdateStreamTopic(string)

	RegisterStopEgressTopic(string) error
	DeregisterStopEgressTopic(string)

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

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

func NewEgressHandlerServer

func NewEgressHandlerServer(serverID string, 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, *livekit.UpdateStreamRequest) (*livekit.EgressInfo, error)

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

type EgressInternalClient

func NewEgressInternalClient

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

NewEgressInternalClient creates a psrpc client that implements the EgressInternalClient interface.

type EgressInternalServer

type EgressInternalServer interface {
	RegisterStartEgressTopic(string) error
	DeregisterStartEgressTopic(string)

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

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

func NewEgressInternalServer

func NewEgressInternalServer(serverID string, 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, *livekit3.StartEgressRequest) (*livekit.EgressInfo, error)
	StartEgressAffinity(*livekit3.StartEgressRequest) float32

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

type IOInfoClient added in v1.3.4

func NewIOInfoClient added in v1.3.4

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

NewIOInfoClient creates a psrpc client that implements the IOInfoClient interface.

type IOInfoServer added in v1.3.4

type IOInfoServer interface {
	// Close and wait for pending RPCs to complete
	Shutdown()

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

func NewIOInfoServer added in v1.3.4

func NewIOInfoServer(serverID string, 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 IOInfoServerImpl added in v1.3.4

type IngressClient added in v1.3.4

type IngressClient interface {
	IngressInternalClient
	IngressHandlerClient
}

func NewIngressClient added in v1.3.4

func NewIngressClient(nodeID livekit.NodeID, bus psrpc.MessageBus) (IngressClient, error)

type IngressHandlerClient added in v1.3.4

func NewIngressHandlerClient added in v1.3.4

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

NewIngressHandlerClient creates a psrpc client that implements the IngressHandlerClient interface.

type IngressHandlerServer added in v1.3.4

type IngressHandlerServer interface {
	RegisterUpdateIngressTopic(string) error
	DeregisterUpdateIngressTopic(string)

	RegisterDeleteIngressTopic(string) error
	DeregisterDeleteIngressTopic(string)

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

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

func NewIngressHandlerServer added in v1.3.4

func NewIngressHandlerServer(serverID string, 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 IngressHandlerServerImpl added in v1.3.4

type IngressHandlerServerImpl interface {
	UpdateIngress(context.Context, *livekit2.UpdateIngressRequest) (*livekit2.IngressState, error)

	DeleteIngress(context.Context, *livekit2.DeleteIngressRequest) (*livekit2.IngressState, error)
}

type IngressInternalClient added in v1.3.4

type IngressInternalClient interface {
	ListActiveIngress(context.Context, *ListActiveIngressRequest, ...psrpc.RequestOption) (<-chan *psrpc.Response[*ListActiveIngressResponse], error)
}

func NewIngressInternalClient added in v1.3.4

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

NewIngressInternalClient creates a psrpc client that implements the IngressInternalClient interface.

type IngressInternalServer added in v1.3.4

type IngressInternalServer interface {
	// Close and wait for pending RPCs to complete
	Shutdown()

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

func NewIngressInternalServer added in v1.3.4

func NewIngressInternalServer(serverID string, 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 added in v1.3.4

type IngressInternalServerImpl interface {
	ListActiveIngress(context.Context, *ListActiveIngressRequest) (*ListActiveIngressResponse, error)
}

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 added in v1.3.4

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

func (*ListActiveIngressRequest) Descriptor deprecated added in v1.3.4

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

Deprecated: Use ListActiveIngressRequest.ProtoReflect.Descriptor instead.

func (*ListActiveIngressRequest) ProtoMessage added in v1.3.4

func (*ListActiveIngressRequest) ProtoMessage()

func (*ListActiveIngressRequest) ProtoReflect added in v1.3.4

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

func (*ListActiveIngressRequest) Reset added in v1.3.4

func (x *ListActiveIngressRequest) Reset()

func (*ListActiveIngressRequest) String added in v1.3.4

func (x *ListActiveIngressRequest) String() string

type ListActiveIngressResponse added in v1.3.4

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 added in v1.3.4

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

Deprecated: Use ListActiveIngressResponse.ProtoReflect.Descriptor instead.

func (*ListActiveIngressResponse) GetIngressIds added in v1.3.4

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

func (*ListActiveIngressResponse) ProtoMessage added in v1.3.4

func (*ListActiveIngressResponse) ProtoMessage()

func (*ListActiveIngressResponse) ProtoReflect added in v1.3.4

func (*ListActiveIngressResponse) Reset added in v1.3.4

func (x *ListActiveIngressResponse) Reset()

func (*ListActiveIngressResponse) String added in v1.3.4

func (x *ListActiveIngressResponse) String() string

type Race added in v1.3.4

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

func NewRace added in v1.3.4

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 added in v1.3.4

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 added in v1.3.4

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.

Jump to

Keyboard shortcuts

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