Files
livekit-3d/pkg/service/rpc/io.psrpc.go
T
Raja Subramanian 80c647ef15 Update PSRPC to 0.2.5 (#1357)
Not able to update cloud without this.
2023-01-31 14:11:44 +05:30

148 lines
5.3 KiB
Go

// Code generated by protoc-gen-psrpc v0.2.5, DO NOT EDIT.
// source: pkg/service/rpc/io.proto
package rpc
import context "context"
import psrpc "github.com/livekit/psrpc"
import version "github.com/livekit/psrpc/version"
import google_protobuf2 "google.golang.org/protobuf/types/known/emptypb"
import livekit "github.com/livekit/protocol/livekit"
import livekit3 "github.com/livekit/protocol/livekit"
var _ = version.PsrpcVersion_0_2_5
// =======================
// IOInfo Client Interface
// =======================
type IOInfoClient interface {
UpdateEgressInfo(context.Context, *livekit.EgressInfo, ...psrpc.RequestOption) (*google_protobuf2.Empty, error)
GetIngressInfo(context.Context, *livekit3.GetIngressInfoRequest, ...psrpc.RequestOption) (*livekit3.GetIngressInfoResponse, error)
UpdateIngressState(context.Context, *livekit3.UpdateIngressStateRequest, ...psrpc.RequestOption) (*google_protobuf2.Empty, error)
}
// ===========================
// IOInfo ServerImpl Interface
// ===========================
type IOInfoServerImpl interface {
UpdateEgressInfo(context.Context, *livekit.EgressInfo) (*google_protobuf2.Empty, error)
GetIngressInfo(context.Context, *livekit3.GetIngressInfoRequest) (*livekit3.GetIngressInfoResponse, error)
UpdateIngressState(context.Context, *livekit3.UpdateIngressStateRequest) (*google_protobuf2.Empty, error)
}
// =======================
// IOInfo Server Interface
// =======================
type IOInfoServer interface {
// Close and wait for pending RPCs to complete
Shutdown()
// Close immediately, without waiting for pending RPCs
Kill()
}
// =============
// IOInfo Client
// =============
type iOInfoClient struct {
client *psrpc.RPCClient
}
// NewIOInfoClient creates a psrpc client that implements the IOInfoClient interface.
func NewIOInfoClient(clientID string, bus psrpc.MessageBus, opts ...psrpc.ClientOption) (IOInfoClient, error) {
rpcClient, err := psrpc.NewRPCClient("IOInfo", clientID, bus, opts...)
if err != nil {
return nil, err
}
return &iOInfoClient{
client: rpcClient,
}, nil
}
func (c *iOInfoClient) UpdateEgressInfo(ctx context.Context, req *livekit.EgressInfo, opts ...psrpc.RequestOption) (*google_protobuf2.Empty, error) {
return psrpc.RequestSingle[*google_protobuf2.Empty](ctx, c.client, "UpdateEgressInfo", "", req, opts...)
}
func (c *iOInfoClient) GetIngressInfo(ctx context.Context, req *livekit3.GetIngressInfoRequest, opts ...psrpc.RequestOption) (*livekit3.GetIngressInfoResponse, error) {
return psrpc.RequestSingle[*livekit3.GetIngressInfoResponse](ctx, c.client, "GetIngressInfo", "", req, opts...)
}
func (c *iOInfoClient) UpdateIngressState(ctx context.Context, req *livekit3.UpdateIngressStateRequest, opts ...psrpc.RequestOption) (*google_protobuf2.Empty, error) {
return psrpc.RequestSingle[*google_protobuf2.Empty](ctx, c.client, "UpdateIngressState", "", req, opts...)
}
// =============
// IOInfo Server
// =============
type iOInfoServer struct {
svc IOInfoServerImpl
rpc *psrpc.RPCServer
}
// NewIOInfoServer builds a RPCServer that will route requests
// to the corresponding method in the provided svc implementation.
func NewIOInfoServer(serverID string, svc IOInfoServerImpl, bus psrpc.MessageBus, opts ...psrpc.ServerOption) (IOInfoServer, error) {
s := psrpc.NewRPCServer("IOInfo", serverID, bus, opts...)
var err error
err = psrpc.RegisterHandler(s, "UpdateEgressInfo", "", svc.UpdateEgressInfo, nil)
if err != nil {
s.Close(false)
return nil, err
}
err = psrpc.RegisterHandler(s, "GetIngressInfo", "", svc.GetIngressInfo, nil)
if err != nil {
s.Close(false)
return nil, err
}
err = psrpc.RegisterHandler(s, "UpdateIngressState", "", svc.UpdateIngressState, nil)
if err != nil {
s.Close(false)
return nil, err
}
return &iOInfoServer{
svc: svc,
rpc: s,
}, nil
}
func (s *iOInfoServer) Shutdown() {
s.rpc.Close(false)
}
func (s *iOInfoServer) Kill() {
s.rpc.Close(true)
}
var psrpcFileDescriptor2 = []byte{
// 236 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00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