Use request id to make api idempotence on sdk retry (#4694)

* Use request id to make api idempotence on sdk retry

Derive resource id from request id
This commit is contained in:
cnderrauber
2026-08-12 09:28:39 +08:00
committed by GitHub
parent 223587e140
commit fad2cc4afe
9 changed files with 143 additions and 18 deletions
+4 -3
View File
@@ -18,13 +18,14 @@ import (
"context"
"errors"
"google.golang.org/protobuf/types/known/emptypb"
"github.com/livekit/protocol/livekit"
"github.com/livekit/protocol/logger"
"github.com/livekit/protocol/rpc"
"google.golang.org/protobuf/types/known/emptypb"
)
func (s *IOInfoService) CreateIngress(ctx context.Context, info *livekit.IngressInfo) (*emptypb.Empty, error) {
func (s *IOInfoService) CreateIngress(ctx context.Context, info *livekit.IngressInfo) (*rpc.CreateIngressResponse, error) {
if s.is == nil {
return nil, ErrIngressNotConnected
}
@@ -36,7 +37,7 @@ func (s *IOInfoService) CreateIngress(ctx context.Context, info *livekit.Ingress
s.telemetry.IngressCreated(ctx, info)
return &emptypb.Empty{}, nil
return &rpc.CreateIngressResponse{Info: info}, nil
}
func (s *IOInfoService) GetIngressInfo(ctx context.Context, req *rpc.GetIngressInfoRequest) (*rpc.GetIngressInfoResponse, error) {