modified README files and changed version to v2.0.0
This commit is contained in:
24
README.md
24
README.md
@@ -49,22 +49,34 @@ This project aims to create a peer to peer (p2p) network, where a user can use t
|
|||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import "github.com/Akilan1999/p2p-rendering-computation/abstractions"
|
import (
|
||||||
|
"github.com/Akilan1999/p2p-rendering-computation/abstractions"
|
||||||
|
"os"
|
||||||
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// Initialize with base p2prc config files
|
// check if the config file exists
|
||||||
err := abstractions.Init("TEST")
|
if _, err := os.Stat("config.json"); err != nil {
|
||||||
if err != nil {
|
// Initialize with base p2prc config files
|
||||||
return
|
_, err := abstractions.Init("TEST", nil)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// start p2prc
|
// start p2prc
|
||||||
_, err = abstractions.Start()
|
_, err := abstractions.Start()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Export once this is added export P2PRC as environment paths
|
||||||
|
```
|
||||||
|
export P2PRC=<PROJECT PATH>
|
||||||
|
export PATH=<PROJECT PATH>:${PATH}
|
||||||
|
```
|
||||||
[Read more](Docs/Abstractions.md) ...
|
[Read more](Docs/Abstractions.md) ...
|
||||||
|
|
||||||
## Installation from source
|
## Installation from source
|
||||||
|
|||||||
30
main.go
30
main.go
@@ -1,15 +1,15 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/Akilan1999/p2p-rendering-computation/cmd"
|
"github.com/Akilan1999/p2p-rendering-computation/cmd"
|
||||||
"github.com/urfave/cli/v2"
|
"github.com/urfave/cli/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
// VERSION specifies the version of the platform
|
// VERSION specifies the version of the platform
|
||||||
var VERSION = "1.5.0"
|
var VERSION = "2.0.0"
|
||||||
var mode string
|
var mode string
|
||||||
|
|
||||||
// Varaibles if mode is client
|
// Varaibles if mode is client
|
||||||
@@ -17,15 +17,15 @@ var OS, Pull_location, Run_script string
|
|||||||
var List_servers, Ip_table bool
|
var List_servers, Ip_table bool
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
app := cli.NewApp()
|
app := cli.NewApp()
|
||||||
app.Name = "p2p-rendering-computation"
|
app.Name = "p2p-rendering-computation"
|
||||||
app.Usage = "p2p cli application to create and access VMs in other servers"
|
app.Usage = "p2p cli application to create and access VMs in other servers"
|
||||||
app.Version = VERSION
|
app.Version = VERSION
|
||||||
app.Flags = cmd.AppConfigFlags
|
app.Flags = cmd.AppConfigFlags
|
||||||
app.Action = cmd.CliAction
|
app.Action = cmd.CliAction
|
||||||
|
|
||||||
err := app.Run(os.Args)
|
err := app.Run(os.Args)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user