This commit is contained in:
GoEdgeLab
2024-07-27 15:42:50 +08:00
parent d511145bc5
commit c19be78e0d
524 changed files with 1817 additions and 1346 deletions

View File

@@ -1,4 +1,4 @@
// Copyright 2022 GoEdge goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2022 GoEdge goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cloud .
package rpc

View File

@@ -1,10 +1,11 @@
// Copyright 2022 GoEdge goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2022 GoEdge goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cloud .
package rpc_test
import (
"github.com/TeaOSLab/EdgeNode/internal/rpc"
"testing"
"github.com/TeaOSLab/EdgeNode/internal/rpc"
)
func TestNewCallStat(t *testing.T) {

View File

@@ -6,6 +6,10 @@ import (
"encoding/base64"
"errors"
"fmt"
"net/url"
"sync"
"time"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/TeaOSLab/EdgeNode/internal/configs"
teaconst "github.com/TeaOSLab/EdgeNode/internal/const"
@@ -20,9 +24,6 @@ import (
"google.golang.org/grpc/encoding/gzip"
"google.golang.org/grpc/keepalive"
"google.golang.org/grpc/metadata"
"net/url"
"sync"
"time"
)
type RPCClient struct {

View File

@@ -1,16 +1,17 @@
// Copyright 2022 GoEdge goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2022 GoEdge goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cloud .
package rpc_test
import (
"sync"
"testing"
"time"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/TeaOSLab/EdgeNode/internal/rpc"
"github.com/TeaOSLab/EdgeNode/internal/utils/testutils"
_ "github.com/iwind/TeaGo/bootstrap"
timeutil "github.com/iwind/TeaGo/utils/time"
"sync"
"testing"
"time"
)
func TestRPCConcurrentCall(t *testing.T) {

View File

@@ -1,11 +1,12 @@
package rpc
import (
"strings"
"sync"
"github.com/TeaOSLab/EdgeNode/internal/configs"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"strings"
"sync"
)
var sharedRPC *RPCClient = nil