remove references to grpc/comms net

This commit is contained in:
Matthew R. Kasun
2022-04-21 15:53:44 -04:00
parent 886ec31553
commit 7152f6ccd4
44 changed files with 25 additions and 498 deletions

View File

@@ -3,7 +3,6 @@ package ncutils
import (
"bytes"
"crypto/rand"
"crypto/tls"
"encoding/gob"
"errors"
"fmt"
@@ -23,8 +22,6 @@ import (
"github.com/gravitl/netmaker/logger"
"github.com/gravitl/netmaker/models"
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
)
// Version - version of the netclient
@@ -381,17 +378,6 @@ func GetWGPathSpecific() string {
}
}
// GRPCRequestOpts - gets grps request opts
func GRPCRequestOpts(isSecure string) grpc.DialOption {
var requestOpts grpc.DialOption
requestOpts = grpc.WithInsecure()
if isSecure == "on" {
h2creds := credentials.NewTLS(&tls.Config{NextProtos: []string{"h2"}})
requestOpts = grpc.WithTransportCredentials(h2creds)
}
return requestOpts
}
// Copy - copies a src file to dest
func Copy(src, dst string) error {
sourceFileStat, err := os.Stat(src)