5 Commits

Author SHA1 Message Date
d2d1b5bc9f fixed untracked files 2023-02-14 19:44:24 +00:00
888ad8acb7 fixed untracked files 2023-02-14 19:40:53 +00:00
e5d4381fd9 fixed untracked files 2023-02-14 19:35:57 +00:00
c7be50d3b7 fixed untracked files 2023-02-14 19:34:30 +00:00
1c06d5b882 changed module name 2023-02-14 19:33:22 +00:00
27 changed files with 724 additions and 721 deletions

BIN
.DS_Store vendored

Binary file not shown.

10
.gitignore vendored
View File

@@ -11,13 +11,23 @@ config.json
#ignore generated iptables #ignore generated iptables
p2p/iptable/ p2p/iptable/
!p2p/iptable/.gitkeep
#ignore plugins added #ignore plugins added
plugin/deploy/ plugin/deploy/
!plugin/deploy/.gitkeep
#ignore track container file #ignore track container file
client/trackcontainers/ client/trackcontainers/
!client/trackcontainers/.gitkeep
# Test generated files # Test generated files
generate/p2prctest generate/p2prctest
!generate/p2prctest/.gitkeep
generate/Test generate/Test
!generate/Test/.gitkeep
#ignore windows exe files #ignore windows exe files
*.exe *.exe
dist/ dist/
#MACOS .idea file
.DS_Store
.gitkeep

Binary file not shown.

View File

@@ -3,7 +3,7 @@ package client
import ( import (
"encoding/json" "encoding/json"
"errors" "errors"
"git.sr.ht/~akilan1999/p2p-rendering-computation/config" "github.com/Akilan1999/p2p-rendering-computation/config"
"github.com/google/uuid" "github.com/google/uuid"
"io/ioutil" "io/ioutil"
"os" "os"
@@ -227,7 +227,6 @@ func ReadGroup() (*Groups,error) {
return &groups, nil return &groups, nil
} }
// WriteGroup Function to write type Groups to the grouptrackcontainers.json file // WriteGroup Function to write type Groups to the grouptrackcontainers.json file
func (grp *Groups) WriteGroup() error { func (grp *Groups) WriteGroup() error {
file, err := json.MarshalIndent(grp, "", " ") file, err := json.MarshalIndent(grp, "", " ")

View File

@@ -2,7 +2,7 @@ package client
import ( import (
"fmt" "fmt"
"git.sr.ht/~akilan1999/p2p-rendering-computation/server/docker" "github.com/Akilan1999/p2p-rendering-computation/server/docker"
"testing" "testing"
) )

View File

@@ -3,7 +3,7 @@ package client
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"git.sr.ht/~akilan1999/p2p-rendering-computation/server" "github.com/Akilan1999/p2p-rendering-computation/server"
"io/ioutil" "io/ioutil"
"net/http" "net/http"
) )

View File

@@ -4,8 +4,8 @@ import (
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
"git.sr.ht/~akilan1999/p2p-rendering-computation/config" "github.com/Akilan1999/p2p-rendering-computation/config"
"git.sr.ht/~akilan1999/p2p-rendering-computation/server/docker" "github.com/Akilan1999/p2p-rendering-computation/server/docker"
"io/ioutil" "io/ioutil"
"os" "os"
) )

View File

@@ -2,7 +2,7 @@ package client
import ( import (
"fmt" "fmt"
"git.sr.ht/~akilan1999/p2p-rendering-computation/server/docker" "github.com/Akilan1999/p2p-rendering-computation/server/docker"
"testing" "testing"
) )

View File

@@ -3,8 +3,8 @@ package clientIPTable
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"git.sr.ht/~akilan1999/p2p-rendering-computation/config" "github.com/Akilan1999/p2p-rendering-computation/config"
"git.sr.ht/~akilan1999/p2p-rendering-computation/p2p" "github.com/Akilan1999/p2p-rendering-computation/p2p"
"io" "io"
"io/ioutil" "io/ioutil"
"mime/multipart" "mime/multipart"

View File

@@ -3,8 +3,8 @@ package client
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"git.sr.ht/~akilan1999/p2p-rendering-computation/p2p" "github.com/Akilan1999/p2p-rendering-computation/p2p"
"git.sr.ht/~akilan1999/p2p-rendering-computation/server/docker" "github.com/Akilan1999/p2p-rendering-computation/server/docker"
"io/ioutil" "io/ioutil"
"net/http" "net/http"
"strconv" "strconv"

View File

@@ -2,13 +2,13 @@ package cmd
import ( import (
"fmt" "fmt"
"git.sr.ht/~akilan1999/p2p-rendering-computation/client" "github.com/Akilan1999/p2p-rendering-computation/client"
"git.sr.ht/~akilan1999/p2p-rendering-computation/client/clientIPTable" "github.com/Akilan1999/p2p-rendering-computation/client/clientIPTable"
"git.sr.ht/~akilan1999/p2p-rendering-computation/config" "github.com/Akilan1999/p2p-rendering-computation/config"
"git.sr.ht/~akilan1999/p2p-rendering-computation/generate" "github.com/Akilan1999/p2p-rendering-computation/generate"
"git.sr.ht/~akilan1999/p2p-rendering-computation/p2p" "github.com/Akilan1999/p2p-rendering-computation/p2p"
"git.sr.ht/~akilan1999/p2p-rendering-computation/plugin" "github.com/Akilan1999/p2p-rendering-computation/plugin"
"git.sr.ht/~akilan1999/p2p-rendering-computation/server" "github.com/Akilan1999/p2p-rendering-computation/server"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )

View File

View File

@@ -4,7 +4,7 @@ package generate
import ( import (
"fmt" "fmt"
"git.sr.ht/~akilan1999/p2p-rendering-computation/config" "github.com/Akilan1999/p2p-rendering-computation/config"
"github.com/otiai10/copy" "github.com/otiai10/copy"
"go/ast" "go/ast"
"go/token" "go/token"

View File

@@ -2,7 +2,7 @@ package generate
import ( import (
"fmt" "fmt"
"git.sr.ht/~akilan1999/p2p-rendering-computation/config" "github.com/Akilan1999/p2p-rendering-computation/config"
"testing" "testing"
) )

2
go.mod
View File

@@ -1,4 +1,4 @@
module git.sr.ht/~akilan1999/p2p-rendering-computation module github.com/Akilan1999/p2p-rendering-computation
go 1.15 go 1.15

View File

@@ -1,7 +1,7 @@
package main package main
import ( import (
"git.sr.ht/~akilan1999/p2p-rendering-computation/cmd" "github.com/Akilan1999/p2p-rendering-computation/cmd"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
"log" "log"
"os" "os"

View File

@@ -2,7 +2,7 @@ package frp
import ( import (
"fmt" "fmt"
"git.sr.ht/~akilan1999/p2p-rendering-computation/server/docker" "github.com/Akilan1999/p2p-rendering-computation/server/docker"
"github.com/fatedier/frp/client" "github.com/fatedier/frp/client"
"github.com/fatedier/frp/pkg/config" "github.com/fatedier/frp/pkg/config"
"github.com/phayes/freeport" "github.com/phayes/freeport"

View File

@@ -3,7 +3,7 @@ package p2p
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"git.sr.ht/~akilan1999/p2p-rendering-computation/config" "github.com/Akilan1999/p2p-rendering-computation/config"
"io/ioutil" "io/ioutil"
"net" "net"
"net/http" "net/http"

View File

View File

@@ -3,7 +3,7 @@ package p2p
import ( import (
"bytes" "bytes"
"errors" "errors"
"git.sr.ht/~akilan1999/p2p-rendering-computation/config" "github.com/Akilan1999/p2p-rendering-computation/config"
"io" "io"
"io/ioutil" "io/ioutil"
"log" "log"

View File

@@ -1,7 +1,7 @@
package plugin package plugin
import ( import (
"git.sr.ht/~akilan1999/p2p-rendering-computation/config" "github.com/Akilan1999/p2p-rendering-computation/config"
"github.com/go-git/go-git/v5" "github.com/go-git/go-git/v5"
"net/url" "net/url"
"os" "os"
@@ -38,7 +38,6 @@ func DownloadPlugin(pluginurl string) error {
return err return err
} }
return nil return nil
} }

View File

@@ -5,8 +5,8 @@ import (
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
"git.sr.ht/~akilan1999/p2p-rendering-computation/client" "github.com/Akilan1999/p2p-rendering-computation/client"
"git.sr.ht/~akilan1999/p2p-rendering-computation/config" "github.com/Akilan1999/p2p-rendering-computation/config"
"github.com/google/uuid" "github.com/google/uuid"
"gopkg.in/yaml.v2" "gopkg.in/yaml.v2"
"io/ioutil" "io/ioutil"

View File

@@ -2,9 +2,9 @@ package plugin
import ( import (
"fmt" "fmt"
"git.sr.ht/~akilan1999/p2p-rendering-computation/client" "github.com/Akilan1999/p2p-rendering-computation/client"
"git.sr.ht/~akilan1999/p2p-rendering-computation/config" "github.com/Akilan1999/p2p-rendering-computation/config"
"git.sr.ht/~akilan1999/p2p-rendering-computation/server/docker" "github.com/Akilan1999/p2p-rendering-computation/server/docker"
"net" "net"
"strconv" "strconv"
"testing" "testing"

View File

@@ -7,7 +7,7 @@ import (
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
"git.sr.ht/~akilan1999/p2p-rendering-computation/config" "github.com/Akilan1999/p2p-rendering-computation/config"
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/container"
"github.com/docker/docker/client" "github.com/docker/docker/client"
@@ -165,7 +165,6 @@ func BuildRunContainer(NumPorts int, GPU string, ContainerName string) (*DockerV
return nil, err return nil, err
} }
return RespDocker, nil return RespDocker, nil
} }
@@ -208,7 +207,6 @@ func (d *DockerVM)imageBuild(dockerClient *client.Client) error {
func (d *DockerVM) runContainer(dockerClient *client.Client) error { func (d *DockerVM) runContainer(dockerClient *client.Client) error {
ctx, _ := context.WithTimeout(context.Background(), time.Second*2000) ctx, _ := context.WithTimeout(context.Background(), time.Second*2000)
// The first mode runs using the Docker Api. As the API supports using // The first mode runs using the Docker Api. As the API supports using
// CPU and uses a shell script for GPU call because till this point of // CPU and uses a shell script for GPU call because till this point of
// implementation docker api does not support the flag "--gpu all" // implementation docker api does not support the flag "--gpu all"

View File

@@ -2,7 +2,7 @@ package server
import ( import (
"fmt" "fmt"
"git.sr.ht/~akilan1999/p2p-rendering-computation/server/docker" "github.com/Akilan1999/p2p-rendering-computation/server/docker"
"net" "net"
"net/rpc" "net/rpc"
) )
@@ -28,8 +28,6 @@ func (l *Listener) StartContainer( reply *Docker) error {
return nil return nil
} }
func Rpc() { func Rpc() {
rpcServer, err := net.ResolveTCPAddr("tcp", "0.0.0.0:"+port) rpcServer, err := net.ResolveTCPAddr("tcp", "0.0.0.0:"+port)
if err != nil { if err != nil {
@@ -43,4 +41,3 @@ func Rpc() {
rpc.Register(listener) rpc.Register(listener)
rpc.Accept(inbound) rpc.Accept(inbound)
} }

View File

@@ -3,11 +3,11 @@ package server
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"git.sr.ht/~akilan1999/p2p-rendering-computation/client/clientIPTable" "github.com/Akilan1999/p2p-rendering-computation/client/clientIPTable"
"git.sr.ht/~akilan1999/p2p-rendering-computation/config" "github.com/Akilan1999/p2p-rendering-computation/config"
"git.sr.ht/~akilan1999/p2p-rendering-computation/p2p" "github.com/Akilan1999/p2p-rendering-computation/p2p"
"git.sr.ht/~akilan1999/p2p-rendering-computation/p2p/frp" "github.com/Akilan1999/p2p-rendering-computation/p2p/frp"
"git.sr.ht/~akilan1999/p2p-rendering-computation/server/docker" "github.com/Akilan1999/p2p-rendering-computation/server/docker"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"io/ioutil" "io/ioutil"
"net/http" "net/http"