Compare commits
135 Commits
untracked-
...
setup-bare
| Author | SHA1 | Date | |
|---|---|---|---|
| 277259a65a | |||
| 22c8fefd8d | |||
| 623d7b93e0 | |||
| eb0a7d6b34 | |||
| 2bd39cc450 | |||
| afacc339ec | |||
| b3f5d63e16 | |||
| f833eba32b | |||
| b55134d194 | |||
| 0b0ae2df06 | |||
| ff105bf9e0 | |||
| 7a86bb29c9 | |||
| 71b23b1e0d | |||
|
|
64f8d77a65 | ||
| 5a5985a573 | |||
| 0a13327551 | |||
| 00317008a2 | |||
| ecd6b0cbf3 | |||
| dabba14741 | |||
| fc7ad63c06 | |||
| ac8a3dcdca | |||
| 447834b556 | |||
| 883b3a5cde | |||
| 2c8ef44bd8 | |||
| 63d079f71d | |||
| a4cd96c72f | |||
| 07dea4ff27 | |||
| a37f81a47f | |||
| 0c1e6edcbc | |||
| 9192901e25 | |||
| 5d20e688a8 | |||
| 505ef3b982 | |||
| 9d9e385909 | |||
| aa4b18f39d | |||
| f9fb225b91 | |||
| 7a5cb2f1e3 | |||
|
|
8ff61422d7 | ||
|
|
0c86c6e673 | ||
|
|
00629b604f | ||
| 72484da67b | |||
| 7f1e9cbbae | |||
|
|
c14a0521c9 | ||
| 504cdb41cf | |||
| c815ed34d7 | |||
| 60c4bba380 | |||
| 3a2cb47b6e | |||
| 8c708c6f11 | |||
| 83653866e6 | |||
|
|
9c94f20ea8 | ||
|
|
18ae29946d | ||
|
|
05936a5486 | ||
|
|
7d5e5cb619 | ||
|
|
04eea717a6 | ||
|
|
b6db9147c8 | ||
|
|
599f7ba2c6 | ||
|
|
38a05d6ab5 | ||
|
|
ea08b5c3ea | ||
|
|
1c496d8be1 | ||
|
|
a4b9634dc2 | ||
|
|
65b90d7ce9 | ||
|
|
95ab45bf62 | ||
| 751f1b15a6 | |||
| 8ccdcaefb5 | |||
| 213838715b | |||
|
|
f899b4e6bb | ||
| 2704caa5e4 | |||
| 2b6c7a5963 | |||
| b78c009f9f | |||
| 708eacd1db | |||
| 979e856272 | |||
| 614a3412c5 | |||
| ea90348fd2 | |||
|
|
a07c91c888 | ||
| 636646b0a1 | |||
| 3933b29979 | |||
| 96e755bc19 | |||
|
|
7f0a43625b | ||
| 29eff7a3af | |||
| 7ed25ef4b3 | |||
| 6b287f2cf1 | |||
| dfa8713aea | |||
| 263275d80c | |||
| 9caf6cde07 | |||
| d71bd991b0 | |||
| e21465b1eb | |||
| fb606cf4ff | |||
| 136243d6a5 | |||
|
|
2f6116993b | ||
|
|
0665a82815 | ||
|
|
a7d741909c | ||
|
|
232c13aca0 | ||
|
|
70aa82a946 | ||
|
|
8f4c2623e3 | ||
|
|
a038bf9f20 | ||
|
|
683e20953b | ||
|
|
8e6a6e246c | ||
|
|
06e5e1e67f | ||
|
|
2b191af951 | ||
|
|
85ac36d51b | ||
|
|
64225b85b7 | ||
|
|
66b26c5ea2 | ||
| 4d2b903a0f | |||
|
|
5ac033403f | ||
| d52aca3d14 | |||
| 05c9f52e6d | |||
| 732b31fafa | |||
| 5edf1f801b | |||
| 4e025bdc70 | |||
| 3bcba8a3e2 | |||
|
|
97d10918b1 | ||
|
|
d3181d272e | ||
|
|
0550a35df1 | ||
|
|
7984f72db1 | ||
|
|
806b499e72 | ||
|
|
cf1e7c6d6f | ||
|
|
86aaba23c4 | ||
|
|
53bef115b0 | ||
|
|
fbbb23c13a | ||
|
|
f0496f8184 | ||
| 69c0aa5cb1 | |||
|
|
88dddd0230 | ||
| c9f007a652 | |||
| 3b70ff5879 | |||
|
|
6161b0afa3 | ||
| 4268b5a637 | |||
|
|
60a00cbb57 | ||
| 35b9e7ea33 | |||
|
|
e965adf798 | ||
| 1428d324b1 | |||
| c646a1389e | |||
| be9de346e5 | |||
| 73e62ba0fa | |||
| 60500620db | |||
| 4dac4234ad | |||
| c7a665fdc8 |
20
.gitignore
vendored
20
.gitignore
vendored
@@ -21,3 +21,23 @@ generate/Test
|
|||||||
#ignore windows exe files
|
#ignore windows exe files
|
||||||
*.exe
|
*.exe
|
||||||
dist/
|
dist/
|
||||||
|
# Ignore any sort of logs
|
||||||
|
logs/
|
||||||
|
|
||||||
|
# ignore docker image files
|
||||||
|
server/docker/containers/
|
||||||
|
*.h
|
||||||
|
*.so
|
||||||
|
|
||||||
|
# generic folder to ignore
|
||||||
|
export/
|
||||||
|
|
||||||
|
# Any testing file
|
||||||
|
*test
|
||||||
|
|
||||||
|
# Ignore public and private keys
|
||||||
|
p2prc.publicKey
|
||||||
|
p2prc.privateKey
|
||||||
|
|
||||||
|
# Ignore pem files
|
||||||
|
*.pem
|
||||||
|
|||||||
169
Bindings/Client.go
Normal file
169
Bindings/Client.go
Normal file
@@ -0,0 +1,169 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import "C"
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/Akilan1999/p2p-rendering-computation/abstractions"
|
||||||
|
"github.com/Akilan1999/p2p-rendering-computation/p2p/frp"
|
||||||
|
)
|
||||||
|
|
||||||
|
// The Client package where data-types
|
||||||
|
// are manually converted to the
|
||||||
|
// to a string so that it can
|
||||||
|
// be export
|
||||||
|
|
||||||
|
// --------------------------------- Container Control ----------------------------------------
|
||||||
|
|
||||||
|
//export StartContainer
|
||||||
|
func StartContainer(IP string) (output *C.char) {
|
||||||
|
container, err := abstractions.StartContainer(IP)
|
||||||
|
if err != nil {
|
||||||
|
return C.CString(err.Error())
|
||||||
|
}
|
||||||
|
return ConvertStructToJSONString(container)
|
||||||
|
}
|
||||||
|
|
||||||
|
//export RemoveContainer
|
||||||
|
func RemoveContainer(IP string, ID string) (output *C.char) {
|
||||||
|
err := abstractions.RemoveContainer(IP, ID)
|
||||||
|
if err != nil {
|
||||||
|
return C.CString(err.Error())
|
||||||
|
}
|
||||||
|
return C.CString("Success")
|
||||||
|
}
|
||||||
|
|
||||||
|
// --------------------------------- Plugin Control ----------------------------------------
|
||||||
|
|
||||||
|
// DEPRECATED
|
||||||
|
////export ViewPlugin
|
||||||
|
//func ViewPlugin() (output *C.char) {
|
||||||
|
// plugins, err := plugin.DetectPlugins()
|
||||||
|
// if err != nil {
|
||||||
|
// return C.CString(err.Error())
|
||||||
|
// }
|
||||||
|
// return ConvertStructToJSONString(plugins)
|
||||||
|
//}
|
||||||
|
//
|
||||||
|
////export PullPlugin
|
||||||
|
//func PullPlugin(pluginUrl string) (output *C.char) {
|
||||||
|
// err := plugin.DownloadPlugin(pluginUrl)
|
||||||
|
// if err != nil {
|
||||||
|
// return C.CString(err.Error())
|
||||||
|
// }
|
||||||
|
// return C.CString("Success")
|
||||||
|
//}
|
||||||
|
//
|
||||||
|
////export DeletePlugin
|
||||||
|
//func DeletePlugin(pluginName string) (output *C.char) {
|
||||||
|
// err := plugin.DeletePlugin(pluginName)
|
||||||
|
// if err != nil {
|
||||||
|
// return C.CString(err.Error())
|
||||||
|
// }
|
||||||
|
// return C.CString("Success")
|
||||||
|
//}
|
||||||
|
//
|
||||||
|
////export ExecutePlugin
|
||||||
|
//func ExecutePlugin(pluginname string, ContainerID string) (output *C.char) {
|
||||||
|
// err := plugin.RunPluginContainer(pluginname, ContainerID)
|
||||||
|
// if err != nil {
|
||||||
|
// return C.CString(err.Error())
|
||||||
|
// }
|
||||||
|
// return C.CString("Success")
|
||||||
|
//}
|
||||||
|
|
||||||
|
// --------------------------------- Get Specs ----------------------------------------
|
||||||
|
|
||||||
|
//export GetSpecs
|
||||||
|
func GetSpecs(IP string) (output *C.char) {
|
||||||
|
specs, err := abstractions.GetSpecs(IP)
|
||||||
|
if err != nil {
|
||||||
|
return C.CString(err.Error())
|
||||||
|
}
|
||||||
|
return ConvertStructToJSONString(specs)
|
||||||
|
}
|
||||||
|
|
||||||
|
//export Init
|
||||||
|
func Init(customConfig string) (output *C.char) {
|
||||||
|
init, err := abstractions.Init(customConfig)
|
||||||
|
if err != nil {
|
||||||
|
return C.CString(err.Error())
|
||||||
|
}
|
||||||
|
return ConvertStructToJSONString(init)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// --------------------------------- P2P Controls -----------------------------------
|
||||||
|
|
||||||
|
//export ViewIPTable
|
||||||
|
func ViewIPTable() (output *C.char) {
|
||||||
|
table, err := abstractions.ViewIPTable()
|
||||||
|
if err != nil {
|
||||||
|
return C.CString(err.Error())
|
||||||
|
}
|
||||||
|
return ConvertStructToJSONString(table)
|
||||||
|
}
|
||||||
|
|
||||||
|
//export UpdateIPTable
|
||||||
|
func UpdateIPTable() (output *C.char) {
|
||||||
|
err := abstractions.UpdateIPTable()
|
||||||
|
if err != nil {
|
||||||
|
return C.CString(err.Error())
|
||||||
|
}
|
||||||
|
return C.CString("Success")
|
||||||
|
}
|
||||||
|
|
||||||
|
//export EscapeFirewall
|
||||||
|
func EscapeFirewall(HostOutsideNATIP string, HostOutsideNATPort string, internalPort string) (output *C.char) {
|
||||||
|
// Get free port from P2PRC server node
|
||||||
|
serverPort, err := frp.GetFRPServerPort("http://" + HostOutsideNATIP + ":" + HostOutsideNATPort)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return C.CString(err.Error())
|
||||||
|
}
|
||||||
|
|
||||||
|
time.Sleep(5 * time.Second)
|
||||||
|
|
||||||
|
ExposedPort, err := frp.StartFRPClientForServer(HostOutsideNATIP+":"+HostOutsideNATPort, serverPort, internalPort, "")
|
||||||
|
if err != nil {
|
||||||
|
return C.CString(err.Error())
|
||||||
|
}
|
||||||
|
|
||||||
|
return C.CString(ExposedPort)
|
||||||
|
}
|
||||||
|
|
||||||
|
//export MapPort
|
||||||
|
func MapPort(Port string, DomainName string) *C.char {
|
||||||
|
entireAddress, _, err := abstractions.MapPort(Port, DomainName)
|
||||||
|
if err != nil {
|
||||||
|
return C.CString(err.Error())
|
||||||
|
}
|
||||||
|
return C.CString(entireAddress)
|
||||||
|
}
|
||||||
|
|
||||||
|
// --------------------------------- Controlling Server ----------------------------------------
|
||||||
|
|
||||||
|
//export Server
|
||||||
|
func Server() (output *C.char) {
|
||||||
|
_, err := abstractions.Start()
|
||||||
|
if err != nil {
|
||||||
|
return C.CString(err.Error())
|
||||||
|
}
|
||||||
|
|
||||||
|
return ConvertStructToJSONString("")
|
||||||
|
}
|
||||||
|
|
||||||
|
// --------------------------------- Helper Functions ----------------------------------------
|
||||||
|
|
||||||
|
func ConvertStructToJSONString(Struct interface{}) *C.char {
|
||||||
|
jsonBytes, err := json.Marshal(Struct)
|
||||||
|
if err != nil {
|
||||||
|
return C.CString(err.Error())
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert the JSON bytes to a string
|
||||||
|
return C.CString(string(jsonBytes))
|
||||||
|
}
|
||||||
|
|
||||||
|
func main() {}
|
||||||
BIN
Bindings/python/.DS_Store
vendored
Normal file
BIN
Bindings/python/.DS_Store
vendored
Normal file
Binary file not shown.
11
Bindings/python/p2prc.py
Normal file
11
Bindings/python/p2prc.py
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
import ctypes
|
||||||
|
|
||||||
|
p2prc = ctypes.CDLL("SharedOBjects/p2prc.so")
|
||||||
|
|
||||||
|
p2prc.Init("")
|
||||||
|
|
||||||
|
def StartServer():
|
||||||
|
# Starting P2PRC as a server mode
|
||||||
|
p2prc.Server()
|
||||||
|
for _ in iter(int, 1):
|
||||||
|
pass
|
||||||
@@ -5,5 +5,5 @@ authors:
|
|||||||
given-names: Akilan
|
given-names: Akilan
|
||||||
title: P2PRC
|
title: P2PRC
|
||||||
license: "GPL-2.0"
|
license: "GPL-2.0"
|
||||||
version: 1.0.0
|
version: 2.0.0
|
||||||
date-released: 2021-07-22
|
date-released: 2023-06-08
|
||||||
|
|||||||
BIN
Docs/.DS_Store
vendored
Normal file
BIN
Docs/.DS_Store
vendored
Normal file
Binary file not shown.
20
Docs/Abstractions.md
Normal file
20
Docs/Abstractions.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# Abstractions
|
||||||
|
|
||||||
|
| [◀ Previous](Installation.md) | [Next ▶](Implementation.md) |
|
||||||
|
|:-----------:|---------|
|
||||||
|
|
||||||
|
The Abstractions package consists of black-boxed functions for P2PRC.
|
||||||
|
|
||||||
|
## Functions
|
||||||
|
- ```Init(<Project name>)```: Initializes P2PRC with all the needed configurations.
|
||||||
|
- ```Start()```: Starts p2prc as a server and makes it possible to extend by adding other routes and functionality to P2PRC.
|
||||||
|
- ```MapPort(<port no>)```: On the local machine the port you want to export to world.
|
||||||
|
- ```StartContainer(<ip address>)```: The machine on the p2p network where you want to spin up a docker container.
|
||||||
|
- ```RemoveContainer(<ip address>,<container id>)```: Terminate container based on the IP address and container name.
|
||||||
|
- ```GetSpecs(<ip address>)```: Get specs of a machine on the network based on the IP address.
|
||||||
|
- ```ViewIPTable()```: View the IP table which about nodes in the network.
|
||||||
|
- ```UpdateIPTable()```: Force update IP table to learn about new nodes faster.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Next Chapter: [Implementation](Implementation.md)
|
||||||
139
Docs/Bindings.md
Normal file
139
Docs/Bindings.md
Normal file
@@ -0,0 +1,139 @@
|
|||||||
|
# Language Bindings
|
||||||
|
[Language bindings](https://en.wikipedia.org/wiki/Language_binding) refers to wrappers to bridge 2 programming languages. This is used in P2PRC to extend calling P2PRC functions in other programming languages. Currently this is done by generating ```.so``` and ```.h``` from the Go compiler.
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
## How to build shared object files
|
||||||
|
#### The easier way
|
||||||
|
```bash
|
||||||
|
# Run
|
||||||
|
make sharedObjects
|
||||||
|
```
|
||||||
|
#### Or the direct way
|
||||||
|
```bash
|
||||||
|
# Run
|
||||||
|
cd Bindings && go build -buildmode=c-shared -o p2prc.so
|
||||||
|
```
|
||||||
|
#### If successfully built:
|
||||||
|
```bash
|
||||||
|
# Enter into the Bindings directory
|
||||||
|
cd Bindings
|
||||||
|
# List files
|
||||||
|
ls
|
||||||
|
# Find files
|
||||||
|
p2prc.h p2prc.so
|
||||||
|
```
|
||||||
|
<br>
|
||||||
|
|
||||||
|
## Workings under the hood
|
||||||
|
Below are a sample set of commands to
|
||||||
|
open the bindings implementation.
|
||||||
|
```
|
||||||
|
# run
|
||||||
|
cd Bindings/
|
||||||
|
# list files
|
||||||
|
ls
|
||||||
|
# search for file
|
||||||
|
Client.go
|
||||||
|
```
|
||||||
|
### In Client go
|
||||||
|
There a few things to notice which are different from
|
||||||
|
your standard Go programs:
|
||||||
|
|
||||||
|
#### 1. We import "C" which means [Cgo](https://pkg.go.dev/cmd/cgo) is required.
|
||||||
|
```go
|
||||||
|
import "C"
|
||||||
|
```
|
||||||
|
#### 2. All functions which are required to be called from other programming languages have comment such as.
|
||||||
|
```go
|
||||||
|
//export <function name>
|
||||||
|
|
||||||
|
// ------------ Example ----------------
|
||||||
|
// The function below allows to externally
|
||||||
|
// to call the P2PRC function to start containers
|
||||||
|
// in a specific node in the know list of nodes
|
||||||
|
// in the p2p network.
|
||||||
|
// Note: the comment "//export StartContainer".
|
||||||
|
|
||||||
|
//export StartContainer
|
||||||
|
func StartContainer(IP string) (output *C.char) {
|
||||||
|
container, err := client.StartContainer(IP, 0, false, "", "")
|
||||||
|
if err != nil {
|
||||||
|
return C.CString(err.Error())
|
||||||
|
}
|
||||||
|
return ConvertStructToJSONString(container)
|
||||||
|
}
|
||||||
|
```
|
||||||
|
#### 3. While looking through the file (If 2 files are compared it is pretty trivial to notice a common structure).
|
||||||
|
```go
|
||||||
|
// --------- Example ------------
|
||||||
|
|
||||||
|
//export StartContainer
|
||||||
|
func StartContainer(IP string) (output *C.char) {
|
||||||
|
container, err := client.StartContainer(IP, 0, false, "", "")
|
||||||
|
if err != nil {
|
||||||
|
return C.CString(err.Error())
|
||||||
|
}
|
||||||
|
return ConvertStructToJSONString(container)
|
||||||
|
}
|
||||||
|
|
||||||
|
//export ViewPlugin
|
||||||
|
func ViewPlugin() (output *C.char) {
|
||||||
|
plugins, err := plugin.DetectPlugins()
|
||||||
|
if err != nil {
|
||||||
|
return C.CString(err.Error())
|
||||||
|
}
|
||||||
|
return ConvertStructToJSONString(plugins)
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
#### It is easy to notice that:
|
||||||
|
- ```ConvertStructToJSONString(<go object>)```: This is a helper function that convert
|
||||||
|
a go object to JSON string initially and converts it to ```CString```.
|
||||||
|
- ```(output *C.char)```: This is the return type for most of the functions.
|
||||||
|
|
||||||
|
#### A Pseudo code to refer to the common function implementation shape could be represented as:
|
||||||
|
```
|
||||||
|
func <Function name> (output *C.char) {
|
||||||
|
<response>,<error> := <P2PRC function name>(<parameters if needed>)
|
||||||
|
if <error> != nil {
|
||||||
|
return C.CString(<error>.Error())
|
||||||
|
}
|
||||||
|
return ConvertStructToJSONString(<response>)
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
|
||||||
|
## Current languages supported
|
||||||
|
- Python
|
||||||
|
|
||||||
|
### Build sample python program
|
||||||
|
The easier way
|
||||||
|
```bash
|
||||||
|
# Run
|
||||||
|
make python
|
||||||
|
# Expected ouput
|
||||||
|
Output is in the Directory Bindings/python/export/
|
||||||
|
# Run
|
||||||
|
cd Bindings/python/export/
|
||||||
|
# list files
|
||||||
|
ls
|
||||||
|
# Expected output
|
||||||
|
SharedObjects/ p2prc.py
|
||||||
|
```
|
||||||
|
Above shows a generated folder which consists of a folder
|
||||||
|
called "SharedObjects/" which consists of ```p2prc.so```
|
||||||
|
and ```p2prc.h``` files. ```p2prc.py``` refers to a
|
||||||
|
sample python script calling P2PRC go functions.
|
||||||
|
To start an any project to extend P2PRC with python,
|
||||||
|
This generated folder can copied and created as a new
|
||||||
|
git repo for P2PRC extensions scripted or used a reference
|
||||||
|
point as proof of concept that P2PRC can be called from
|
||||||
|
other programming languages.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -6,7 +6,7 @@ commands as possible. The cli was built using the library called urfave cli v2 .
|
|||||||
major files created named as flags.go and actions.go.
|
major files created named as flags.go and actions.go.
|
||||||
### Flags.go
|
### Flags.go
|
||||||
The flags .go file is responsible to create the appropriate flags for the cli. There are 2 types of flags
|
The flags .go file is responsible to create the appropriate flags for the cli. There are 2 types of flags
|
||||||
called boolean and string as described in Fig 5.3.1. Each of the flags outputs are assigned to a
|
called boolean and string. Each of the flags outputs are assigned to a
|
||||||
variable to be handled. The flags can also detect environment variables set. This feature is useful
|
variable to be handled. The flags can also detect environment variables set. This feature is useful
|
||||||
because if the user wants to call certain flags in a repeated sequence it only has to be initialized
|
because if the user wants to call certain flags in a repeated sequence it only has to be initialized
|
||||||
once.
|
once.
|
||||||
|
|||||||
@@ -1,25 +1,13 @@
|
|||||||
# Client Module
|
# Client Module
|
||||||
This module is incharge of communicating with the server and receiving the appropriate information back from the server.
|
This module is incharge of communicating with the server and receiving the appropriate information back from the server.
|
||||||
Note: To [read more about the functions](https://pkg.go.dev/git.sr.ht/~akilan1999/p2p-rendering-computation@v0.0.0-20210404191839-6a046babcb02/client)
|
|
||||||
|
|
||||||
## Functions of the Client Module
|
## Functions of the Client Module
|
||||||
- [Interact with the Server Api](#functions-of-the-client-module)
|
<!-- - [Interact with the Server Api](#functions-of-the-client-module) -->
|
||||||
- [Decision maker on how the ip table is created or updated](#decision-maker-on-how-the-ip-table-is-created-or-updated)
|
- [Decision maker on how the ip table is created or updated](#decision-maker-on-how-the-ip-table-is-created-or-updated)
|
||||||
|
|
||||||
|
|
||||||
## Interact with the Server Api
|
|
||||||
This sections talks about the functionality implemented till now.
|
|
||||||
- The client can start docker containers using the function StartContainer.
|
|
||||||
This functions calls the route:
|
|
||||||
```
|
|
||||||
http://<server IP address>:<server port>/startcontainer
|
|
||||||
```
|
|
||||||
TODO: Outputs and how it's printed
|
|
||||||
|
|
||||||
## Decision maker on how the IP table is created or updated
|
## Decision maker on how the IP table is created or updated
|
||||||
- Does a local speedtest to verify and see if the server IP's in the IP table
|
- Does a local speedtest to verify and see if the server IP's in the IP table
|
||||||
are pingable.
|
are pingable.
|
||||||
- Downloads the Servers IP table.
|
|
||||||
- Tries to ping the servers IP Table addresses.
|
- Tries to ping the servers IP Table addresses.
|
||||||
- If it's pingable then it's added as a new entry in the IP table.
|
- If it's pingable then it's added as a new entry in the IP table.
|
||||||
- The following steps occurs in the clients IP table.
|
- The following steps occurs in the clients IP table.
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
# Client Module Implementation
|
# Client Module Implementation
|
||||||
|
|
||||||
|
The Client Module interacts with the P2P module and Server Module. It is responsible for interacting with the server module and appropriately updating the IP table on the client side. It connects to the server using the server's REST Apis. It is also the primary decision maker on how the IP table is updated is on the client side. This is because each user can have requirements like how many number of hops they would want to do to update their IP table. Hops is the number of times the client is going to download the IP table from different servers ,once it gets the IP tables from the previous servers.
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
## Topics
|
## Topics
|
||||||
1. [Updating the IP table](#updating-the-IP-table)
|
1. [Updating the IP table](#updating-the-IP-table)
|
||||||
2. [Reading server specifications](#reading-server-specifications)
|
2. [Reading server specifications](#reading-server-specifications)
|
||||||
@@ -78,8 +83,6 @@ show a sample structure of file ```grouptrackcontainer.json```.
|
|||||||
```
|
```
|
||||||
The default path to the container tracker is ```client/trackcontainers/grouptrackcontainer.json```.
|
The default path to the container tracker is ```client/trackcontainers/grouptrackcontainer.json```.
|
||||||
|
|
||||||
### Note:
|
> [!NOTE]
|
||||||
The group id will be auto-generated and will have its own prefix in the start which will mostly be ```grp<UUID>```.
|
> The group id will be auto-generated and will have its own prefix in the start which will mostly be ```grp<UUID>```.
|
||||||
When a container is removed using the command. ```p2prc --rm <IP Address> --id <Container id>```. It will be automatically deleted
|
> When a container is removed using the command. ```p2prc --rm <IP Address> --id <Container id>```. It will be automatically deleted from the groups it exists in.
|
||||||
from the groups it exists in.
|
|
||||||
|
|
||||||
|
|||||||
@@ -13,9 +13,19 @@ JSON format.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"dockerfile": "/<path>/p2p-rendering-computation/server/docker/containers/docker-ubuntu-sshd/",
|
"MachineName": "pc-74-120.customer.ask4.lan",
|
||||||
"iptable": "/<path>/p2p-rendering-computation/p2p/ip_table.json",
|
"IPTable": "/Users/akilan/Documents/p2p-rendering-computation/p2p/iptable/ip_table.json",
|
||||||
"speedtestfile": "/<path>/p2p-rendering-computation/p2p/50.bin"
|
"DockerContainers": "/Users/akilan/Documents/p2p-rendering-computation/server/docker/containers/",
|
||||||
|
"DefaultDockerFile": "/Users/akilan/Documents/p2p-rendering-computation/server/docker/containers/docker-ubuntu-sshd/",
|
||||||
|
"SpeedTestFile": "/Users/akilan/Documents/p2p-rendering-computation/p2p/50.bin",
|
||||||
|
"IPV6Address": "",
|
||||||
|
"PluginPath": "/Users/akilan/Documents/p2p-rendering-computation/plugin/deploy",
|
||||||
|
"TrackContainersPath": "/Users/akilan/Documents/p2p-rendering-computation/client/trackcontainers/trackcontainers.json",
|
||||||
|
"ServerPort": "8088",
|
||||||
|
"GroupTrackContainersPath": "/Users/akilan/Documents/p2p-rendering-computation/client/trackcontainers/grouptrackcontainers.json",
|
||||||
|
"FRPServerPort": "True",
|
||||||
|
"BehindNAT": "True",
|
||||||
|
"CustomConfig": null
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
2
Docs/DomainNameMappingsImplementation.md
Normal file
2
Docs/DomainNameMappingsImplementation.md
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# Domain name mappings
|
||||||
|
This
|
||||||
@@ -1,116 +0,0 @@
|
|||||||
# Generate Module
|
|
||||||
P2PRC is a great layer of abstraction. This means that in many cases it is not an end product but rather
|
|
||||||
a tool that customized as an end product. An example would be writing your own billing module to monetize
|
|
||||||
the computation power available. The generate module copies the current with the appropriate git histories
|
|
||||||
and keeps only the go files which would be useful to edit. To use the generate module the user will need
|
|
||||||
to have a go compiler present in his computer. Due to the introduction of this module there will 2 releases:
|
|
||||||
|
|
||||||
- Regular Release (Consists of only the build binary and cli command cannot access the generate module)
|
|
||||||
- Developer Release (Consists of important Go files and the cli can access the generate module)
|
|
||||||
|
|
||||||
## How does this work ?
|
|
||||||
|
|
||||||
### [Struct information](https://github.com/Akilan1999/p2p-rendering-computation/blob/9d69aed8ce0fe5273aaff2828f7d51c3d5ac2ce4/generate/generate.go#L19)
|
|
||||||
- ### ```Generate.go```:
|
|
||||||
This file creates a local copy of P2PRC from where the CLI was called from.
|
|
||||||
This go file also does various stuff like instruction of file should be ignored when copying and
|
|
||||||
which of should not be. Now let's understand this. Below is a sample code which does the following:
|
|
||||||
|
|
||||||
```go
|
|
||||||
//----------------------------------------------------------------
|
|
||||||
// Action performed:
|
|
||||||
// - Ensuring main.go file exists
|
|
||||||
// - Skipping all .go files apart from the ones listed above
|
|
||||||
// - Skipping .idea/ directory
|
|
||||||
// - Skipping Makefile file
|
|
||||||
//----------------------------------------------------------------
|
|
||||||
Options.Skip = func(src string) (bool, error) {
|
|
||||||
switch {
|
|
||||||
case strings.HasSuffix(src, "main.go"):
|
|
||||||
return false, nil
|
|
||||||
case strings.HasSuffix(src, ".go"):
|
|
||||||
return true, nil
|
|
||||||
case strings.HasSuffix(src, ".idea"):
|
|
||||||
return true, nil
|
|
||||||
case strings.HasSuffix(src, "Makefile"):
|
|
||||||
return true, nil
|
|
||||||
default:
|
|
||||||
return false, nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Doing the copy
|
|
||||||
err = copy.Copy("<P2PRC folder you want to copy from>", "<PATH to the directory>", Options)
|
|
||||||
```
|
|
||||||
|
|
||||||
Unfortunately currently this will have to be manually edited in the ```Generate.go``` file. When using the generate
|
|
||||||
module the user also creates their own Go module which is the modified version of P2PRC. This means
|
|
||||||
if the 1 modified package is using another modified package then the appropriate import have to be modified
|
|
||||||
in the file where the import is called:
|
|
||||||
|
|
||||||
Ex:
|
|
||||||
```go
|
|
||||||
//Sample Project module name = Test
|
|
||||||
//Package names:
|
|
||||||
//- Test/Genius
|
|
||||||
//- Test/GeGeGenuis
|
|
||||||
//
|
|
||||||
// When we call the generate function with the new project with the module name = MicDrop
|
|
||||||
// The new package name would be:
|
|
||||||
// - MicDrop/Genius
|
|
||||||
// - MicDrop/GeGeGenuis
|
|
||||||
|
|
||||||
// Test/Genius code depends on the package Test/GeGeGenuis
|
|
||||||
import (
|
|
||||||
"Test/GeGeGenuis"
|
|
||||||
)
|
|
||||||
|
|
||||||
// When we create a new module with the copy of the
|
|
||||||
// existing project we need change:
|
|
||||||
import (
|
|
||||||
"MicDrop/GeGeGenuis"
|
|
||||||
)
|
|
||||||
```
|
|
||||||
|
|
||||||
To do this we have built functions which can modify import names in the Go file provided.
|
|
||||||
To customize the use case of your generate module you would need to manually add your own
|
|
||||||
imports which are supposed to be replaced and in which files they are supposed to be replaced
|
|
||||||
in.
|
|
||||||
|
|
||||||
```go
|
|
||||||
// 1.0 - Test/Genius.go -> GeGeGenuis module
|
|
||||||
// a is struct of type NewProject
|
|
||||||
a.FileNameAST = "<path to project to copy from>/Test/Genius.go"
|
|
||||||
// Get AST information of the file
|
|
||||||
err := a.GetASTGoFile()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
// Change the appropriate Go file
|
|
||||||
err = a.ChangeImports("Test/GeGeGenuis", "MicDrop/GeGeGenuis")
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
// Writes the change to the appropriate file
|
|
||||||
err = a.WriteGoAst()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Higher order of execution of ```Generate.go```:
|
|
||||||
1. Copy entire P2PRC project and ignores files which are not meant to be copied
|
|
||||||
2. The folder name will be based on the new project name and the module name based on the new
|
|
||||||
module name provided.
|
|
||||||
3. Modifies the appropriate imports in the project as instructed in the code.
|
|
||||||
4. Creates a commit with the new changes in the new project.
|
|
||||||
|
|
||||||
|
|
||||||
- ### ``` modifyGenerate.go```:
|
|
||||||
This a really simple implementation where we replace the imports
|
|
||||||
in certain files as instructed from ```generate.go```. To do we create an AST (i.e Abstract Syntax tree)
|
|
||||||
from new file we want to change the imports in. AST create a tree structure of expression. To change the
|
|
||||||
import we can just traverse to the appropriate expression and change the value of that expression in
|
|
||||||
the case of modifying imports. This approach is more simple than using templates.
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,20 +1,23 @@
|
|||||||
# Implementation
|
# Implementation
|
||||||
|
| [◀ Previous](Introduction.md) | [Back to TOC](README.md) |
|
||||||
|
|:-----------:|---------|
|
||||||
|
|
||||||
This chapter describes how the project was built. It talks in depth of the implementation
|
This chapter describes how the project was built. It talks in depth of the implementation
|
||||||
performed to give a better understanding of the project.
|
performed to give a better understanding of the project.
|
||||||
|
|
||||||
## Programming langauge used
|
## Programming langauge used
|
||||||
The programming language used for this project was Golang. The reason Go lang was chosen was
|
The programming language used for this project was [Golang](https://go.dev/). The reason Go lang was chosen was
|
||||||
because it is a compiled language.
|
because it is a compiled language.<br>
|
||||||
The entire codebase is just a single binary file. When
|
The entire codebase is just a single binary file. When
|
||||||
distributing to other linux distributing the only requirement would be the binary file to run the
|
distributing to other linux distributing the only requirement would be the binary file to run the
|
||||||
code. It is easy to write independant modules and be monolithic at the sametime using Go. Using
|
code. It is easy to write independant modules and be monolithic at the sametime using Go.<br>
|
||||||
Go.mod makes it very easy to handle external libraries and modularise code. The go.mod name for
|
Using Go.mod makes it very easy to handle external libraries and modularise code. The go.mod name for
|
||||||
the project is git.sr.ht/~akilan1999/p2p-rendering-computation.
|
the project is [git.sr.ht/~akilan1999/p2p-rendering-computation](https://git.sr.ht/~akilan1999/p2p-rendering-computation).
|
||||||
|
|
||||||
## [Cli Module](CliImplementation.md)
|
- ## [Cli Module](CliImplementation.md)
|
||||||
## [Config Module](ConfigImplementation.md)
|
- ## [Config Module](ConfigImplementation.md)
|
||||||
## [Server Module](ServerImplementation.md)
|
- ## [Server Module](ServerImplementation.md)
|
||||||
## [Client Module](ClientImplementation.md)
|
- ## [Client Module](ClientImplementation.md)
|
||||||
## [P2P Module](P2PImplementation.md)
|
- ## [P2P Module](P2PImplementation.md)
|
||||||
## [Plugin Module](PluginImplementation.md)
|
- ## [Plugin Module](PluginImplementation.md)
|
||||||
## [Generate Module](GenerateImplementation.md)
|
- ## [Generate Module](GenerateImplementation.md)
|
||||||
@@ -1,9 +1,12 @@
|
|||||||
# Installation
|
# Installation
|
||||||
|
|
||||||
|
| [◀ Previous](Introduction.md) | [Next ▶](Abstractions.md) |
|
||||||
|
|:-----------:|---------|
|
||||||
|
|
||||||
Over here we will cover the basic steps to get the server and client side running.
|
Over here we will cover the basic steps to get the server and client side running.
|
||||||
|
|
||||||
## Alpha release install
|
## Latest release install
|
||||||
https://github.com/Akilan1999/p2p-rendering-computation/releases/tag/v1.0.0-alpha
|
https://github.com/Akilan1999/p2p-rendering-computation/releases
|
||||||
|
|
||||||
## Install from Github master branch
|
## Install from Github master branch
|
||||||
|
|
||||||
@@ -39,7 +42,7 @@ To set up P2PRC on Windows, simply run this batch file.
|
|||||||
.\install.bat
|
.\install.bat
|
||||||
```
|
```
|
||||||
|
|
||||||
### Add appropriate paths to .bashrc
|
### Add appropriate paths to `.bashrc`
|
||||||
```
|
```
|
||||||
export P2PRC=/<PATH>/p2p-rendering-computation
|
export P2PRC=/<PATH>/p2p-rendering-computation
|
||||||
export PATH=/<PATH>/p2p-rendering-computation:${PATH}
|
export PATH=/<PATH>/p2p-rendering-computation:${PATH}
|
||||||
@@ -65,7 +68,7 @@ USAGE:
|
|||||||
p2prc [global options] command [command options] [arguments...]
|
p2prc [global options] command [command options] [arguments...]
|
||||||
|
|
||||||
VERSION:
|
VERSION:
|
||||||
1.0.0
|
<version no>
|
||||||
|
|
||||||
COMMANDS:
|
COMMANDS:
|
||||||
help, h Shows a list of commands or help for one command
|
help, h Shows a list of commands or help for one command
|
||||||
@@ -78,7 +81,7 @@ GLOBAL OPTIONS:
|
|||||||
--ViewImages value, --vi value View images available on the server IP address [$VIEW_IMAGES]
|
--ViewImages value, --vi value View images available on the server IP address [$VIEW_IMAGES]
|
||||||
--CreateVM value, --touch value Creates Docker container on the selected server [$CREATE_VM]
|
--CreateVM value, --touch value Creates Docker container on the selected server [$CREATE_VM]
|
||||||
--ContainerName value, --cn value Specifying the container run on the server side [$CONTAINER_NAME]
|
--ContainerName value, --cn value Specifying the container run on the server side [$CONTAINER_NAME]
|
||||||
--RemoveVM value, --rm value Stop and Remove Docker container [$REMOVE_VM]
|
--RemoveVM value, --rm value Stop and Remove Docker container (IP:port) accompanied by container ID via --ID or --id [$REMOVE_VM]
|
||||||
--ID value, --id value Docker Container ID [$ID]
|
--ID value, --id value Docker Container ID [$ID]
|
||||||
--Ports value, -p value Number of ports to open for the Docker Container [$NUM_PORTS]
|
--Ports value, -p value Number of ports to open for the Docker Container [$NUM_PORTS]
|
||||||
--GPU, --gpu Create Docker Containers to access GPU (default: false) [$USE_GPU]
|
--GPU, --gpu Create Docker Containers to access GPU (default: false) [$USE_GPU]
|
||||||
@@ -86,10 +89,20 @@ GLOBAL OPTIONS:
|
|||||||
--SetDefaultConfig, --dc Sets a default configuration file (default: false) [$SET_DEFAULT_CONFIG]
|
--SetDefaultConfig, --dc Sets a default configuration file (default: false) [$SET_DEFAULT_CONFIG]
|
||||||
--NetworkInterfaces, --ni Shows the network interface in your computer (default: false) [$NETWORK_INTERFACE]
|
--NetworkInterfaces, --ni Shows the network interface in your computer (default: false) [$NETWORK_INTERFACE]
|
||||||
--ViewPlugins, --vp Shows plugins available to be executed (default: false) [$VIEW_PLUGIN]
|
--ViewPlugins, --vp Shows plugins available to be executed (default: false) [$VIEW_PLUGIN]
|
||||||
--TrackedContainers, --tc View containers which have been created from the client side (default: false) [$TRACKED_CONTAINERS]
|
--TrackedContainers, --tc View (currently running) containers which have been created from the client side (default: false) [$TRACKED_CONTAINERS]
|
||||||
--ExecutePlugin value, --plugin value Plugin which needs to be executed [$EXECUTE_PLUGIN]
|
--ExecutePlugin value, --plugin value Plugin which needs to be executed [$EXECUTE_PLUGIN]
|
||||||
|
--CreateGroup, --cgroup Creates a new group (default: false) [$CREATE_GROUP]
|
||||||
|
--Group value, --group value group flag with argument group ID [$GROUP]
|
||||||
|
--Groups, --groups View all groups (default: false) [$GROUPS]
|
||||||
|
--RemoveContainerGroup, --rmcgroup Remove specific container in the group (default: false) [$REMOVE_CONTAINER_GROUP]
|
||||||
|
--RemoveGroup value, --rmgroup value Removes the entire group [$REMOVE_GROUP]
|
||||||
|
--Generate value, --gen value Generates a new copy of P2PRC which can be modified based on your needs [$GENERATE]
|
||||||
|
--ModuleName value, --mod value New go project module name [$MODULENAME]
|
||||||
|
--PullPlugin value, --pp value Pulls plugin from git repos [$PULLPLUGIN]
|
||||||
|
--RemovePlugin value, --rp value Removes plugin [$REMOVEPLUGIN]
|
||||||
--help, -h show help (default: false)
|
--help, -h show help (default: false)
|
||||||
--version, -v print the version (default: false)
|
--version, -v print the version (default: false)
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
@@ -101,7 +114,7 @@ GLOBAL OPTIONS:
|
|||||||
# Using basic commands
|
# Using basic commands
|
||||||
|
|
||||||
### Start as a server
|
### Start as a server
|
||||||
Do ensure you have docker installed for this
|
Do ensure you have Docker installed for this
|
||||||
```
|
```
|
||||||
p2prc -s
|
p2prc -s
|
||||||
```
|
```
|
||||||
@@ -195,6 +208,11 @@ p2prc --pp <repo link>
|
|||||||
p2prc --rp <plugin name>
|
p2prc --rp <plugin name>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Added custom metadata about the current node
|
||||||
|
```
|
||||||
|
p2prc --amd "custom metadata"
|
||||||
|
```
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
@@ -210,23 +228,17 @@ This feature is still Under Development:
|
|||||||
- Debian/ubuntu: ```sudo apt install ansible```
|
- Debian/ubuntu: ```sudo apt install ansible```
|
||||||
- Others: [Installation link](https://ansible-tips-and-tricks.readthedocs.io/en/latest/ansible/install/)
|
- Others: [Installation link](https://ansible-tips-and-tricks.readthedocs.io/en/latest/ansible/install/)
|
||||||
|
|
||||||
#### Set ansible host_key_checking to false
|
|
||||||
- On linux
|
|
||||||
- ```sudo nano /etc/ansible/ansible.cfg```: Open the following file. If this file is not found then where
|
|
||||||
ever the file ```ansible.cfg``` is located.
|
|
||||||
- Add or uncomment ```host_key_checking = False```
|
|
||||||
|
|
||||||
#### Run Test Cases
|
#### Run Test Cases
|
||||||
- Generate Test Case Ansible file
|
- Generate Test Case Ansible file
|
||||||
- ```make testcases```
|
- ```make testcases```
|
||||||
- Enter inside plugin directory and run tests.
|
- Enter inside plugin directory and run tests.<br>
|
||||||
Note: That docker needs to installed and needs to run without
|
|
||||||
sudo. Refer the section install Docker.
|
|
||||||
- ```cd plugin```
|
|
||||||
- ```go test .```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> That docker needs to installed and needs to run without
|
||||||
|
> sudo. Refer the section [Install Docker](#install-docker).
|
||||||
|
> - ```cd plugin```
|
||||||
|
> - ```go test .```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Next Chapter: [Abstractions](Abstractions.md)
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
# Chapter 1: Introduction
|
# Chapter 1: Introduction
|
||||||
|
|
||||||
|
| [◀ Back to TOC](README.md) | [Next ▶](Installation.md) |
|
||||||
|
|:-----------:|---------|
|
||||||
|
|
||||||
## Abstract
|
## Abstract
|
||||||
This project focuses on creating a framework on running heavy tasks that a regular computer
|
This project focuses on creating a framework on running heavy tasks that a regular computer
|
||||||
cannot run easily such as graphically demanding video games, rendering 3D animations , protein
|
cannot run easily such as graphically demanding video games, rendering 3D animations , protein
|
||||||
@@ -21,7 +24,7 @@ run these heavy tasks can be really useful. Ethically speaking this is leading t
|
|||||||
computing power similar to what is happening in the web server area. By using peer to peer
|
computing power similar to what is happening in the web server area. By using peer to peer
|
||||||
principles it is possible to remove the monopolisation factor and increase the bandwidth between
|
principles it is possible to remove the monopolisation factor and increase the bandwidth between
|
||||||
the client and server.
|
the client and server.
|
||||||
|
<!--
|
||||||
## Aim
|
## Aim
|
||||||
This project aims to create a peer to peer (p2p) network, where a user can use the p2p network to
|
This project aims to create a peer to peer (p2p) network, where a user can use the p2p network to
|
||||||
act as a client (i.e sending tasks) or the server (i.e executing the tasks). A prototype application will
|
act as a client (i.e sending tasks) or the server (i.e executing the tasks). A prototype application will
|
||||||
@@ -33,4 +36,8 @@ or virtual environments across selected nodes.
|
|||||||
rendering tools and tools to batch any sort of tasks.
|
rendering tools and tools to batch any sort of tasks.
|
||||||
- Creating p2p network
|
- Creating p2p network
|
||||||
- Server to create a containerised environment
|
- Server to create a containerised environment
|
||||||
- The client node to run tasks on Server containerised node
|
- The client node to run tasks on Server containerised node -->
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Next Chapter: [Installation](Installation.md)
|
||||||
37
Docs/NAT-Traveral.md
Normal file
37
Docs/NAT-Traveral.md
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
# NAT Traversal
|
||||||
|
P2PRC currently supports TURN for NAT traversal.
|
||||||
|
|
||||||
|
## TURN
|
||||||
|
The current TURN implementation used is FRP. The TURN server is also required when
|
||||||
|
a P2PRC node is acting as a Server. The TURN server is determined based on the Node
|
||||||
|
with the least amount of latency based on the Nodes available on the IPTable.
|
||||||
|
Once a TURN server is determined there are 2 actions performed. The first one is
|
||||||
|
```/FRPPort``` to the TURN server to receive a port which is used to generate the external
|
||||||
|
port from the TURN server. The flow below describes the workflow.
|
||||||
|
|
||||||
|
### Client mode
|
||||||
|
- Call ```/FRPPort```
|
||||||
|
```
|
||||||
|
http://<turn server ip>:<server port no>/FRPport
|
||||||
|
```
|
||||||
|
- Call the TURN server in the following manner. The following is a sample code snippet below.
|
||||||
|
```go
|
||||||
|
import (
|
||||||
|
"github.com/Akilan1999/p2p-rendering-computation/p2p/frp"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
serverPort, err := frp.GetFRPServerPort("http://" + <lowestLatencyIpAddress.Ipv4> + ":" + lowestLatencyIpAddress.ServerPort)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
// Create 1 second delay to allow FRP server to start
|
||||||
|
time.Sleep(1 * time.Second)
|
||||||
|
// Starts FRP as a client with
|
||||||
|
proxyPort, err := frp.StartFRPClientForServer(<lowestLatencyIpAddress.Ipv4>, serverPort, <the port you want to expose externally>)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
@@ -19,11 +19,9 @@ In this repository the P2P module has been designed from sratch at the point of
|
|||||||
|
|
||||||
|
|
||||||
## Responsibility
|
## Responsibility
|
||||||
- To perform speed test to determine best node to connect
|
|
||||||
- To ensure the IP table has nodes which are pingable
|
- To ensure the IP table has nodes which are pingable
|
||||||
- Using techniques such as [UPNP](https://en.wikipedia.org/wiki/Universal_Plug_and_Play). Still under development
|
- Taking to nodes behind NAT. [More about the implementation](NAT-Traversal)...
|
||||||
- Port Forwarding (To be introducted in a future release)
|
|
||||||
|
|
||||||
|
|
||||||
## Note:
|
> [!NOTE]
|
||||||
If you are running in server mode it is recommended to use [DMZ](https://routerguide.net/when-and-how-to-setup-dmz-host-for-home-use/) to bypass the [NAT](https://en.wikipedia.org/wiki/Network_address_translation).
|
> If you are running in server mode it is recommended to use [DMZ](https://routerguide.net/when-and-how-to-setup-dmz-host-for-home-use/) to bypass the [NAT](https://en.wikipedia.org/wiki/Network_address_translation).
|
||||||
|
|||||||
@@ -1,10 +1,20 @@
|
|||||||
# P2P Module Implementation
|
# P2P Module Implementation
|
||||||
|
|
||||||
|
The P2P module (i.e Peer to Peer Module) is responsible for storing the IP table and interacting
|
||||||
|
with the IP table. In the following implementation of the P2P module ,the IP table stores
|
||||||
|
information about servers available in the network. The other functionality the P2P module takes
|
||||||
|
care of is doing the appropriate speed tests to the servers in the IP table. This is for informing the
|
||||||
|
users about nodes which are close by and nodes which have quicker uploads and downloads
|
||||||
|
speeds. The module is responsible to ensure that there are no duplicate server IPs in the IP table
|
||||||
|
and to remove all server IPs which are not pingable.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
The peer to peer implementation was built from scratch. This is because other peer to peer
|
The peer to peer implementation was built from scratch. This is because other peer to peer
|
||||||
libraries were on the implementation of the Distributed hash table. At the current moment all
|
libraries were on the implementation of the Distributed hash table. At the current moment all
|
||||||
those heavy features are not needed because the objective is to search and list all possible servers
|
those heavy features are not needed because the objective is to search and list all possible servers
|
||||||
available. The limitation being that to be a part of the network the user has to know at least 1
|
available. The limitation being that to be a part of the network the user has to know at least 1
|
||||||
server and has to have DMZ enabled from the router if the user wants to act as a server out of the
|
server. The advantage of building from scratch makes the module super light and
|
||||||
users local network. The advantage of building from scratch makes the module super light and
|
|
||||||
possibility for custom functions and structs. The sub topics below will mention the
|
possibility for custom functions and structs. The sub topics below will mention the
|
||||||
implementations of each functionality in depth.
|
implementations of each functionality in depth.
|
||||||
|
|
||||||
@@ -23,27 +33,53 @@ path of the IP table json file is received from the configuration module.
|
|||||||
"latency": "<latency>",
|
"latency": "<latency>",
|
||||||
"download": "<download>",
|
"download": "<download>",
|
||||||
"upload": "<upload>"
|
"upload": "<upload>"
|
||||||
"port no": "<server port no>"
|
"port no": "<server port no>",
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Speed Test
|
|
||||||
The speed test functions populate the fields which are latency, download, upload speed. Before the
|
|
||||||
speed test begins for each server IP address. The p2p module ensures that each server IP address
|
|
||||||
is pingable. If the server IP address is not pingable then it removes that IP address from the struct.
|
|
||||||
|
|
||||||
### Latency
|
### Latency
|
||||||
The latency is measured in milliseconds. The route /server_info is called from the
|
The latency is measured in milliseconds. The route /server_info is called from the
|
||||||
server and time it takes to provide a json response is recorded.
|
server and time it takes to provide a json response is recorded.
|
||||||
|
|
||||||
### Download speed
|
## NAT Traversal
|
||||||
The download speed is measured as (<file size>/<time taken to
|
P2PRC currently supports TURN for NAT traversal.
|
||||||
download>)*8. This gives the result in megabits per second. The file downloaded is a 50 mb
|
|
||||||
auto generated file.
|
|
||||||
|
|
||||||
|
## TURN
|
||||||
|
The current TURN implementation used is FRP. The TURN server is also required when
|
||||||
|
a P2PRC node is acting as a Server. The TURN server is determined based on the Node
|
||||||
|
with the least amount of latency based on the Nodes available on the IPTable.
|
||||||
|
Once a TURN server is determined there are 2 actions performed. The first one is
|
||||||
|
```/FRPPort``` to the TURN server to receive a port which is used to generate the external
|
||||||
|
port from the TURN server. The flow below describes the workflow.
|
||||||
|
|
||||||
|
### Client mode
|
||||||
|
- Call ```/FRPPort```
|
||||||
|
```
|
||||||
|
http://<turn server ip>:<server port no>/FRPport
|
||||||
|
```
|
||||||
|
- Call the TURN server in the following manner. The following is a sample code snippet below.
|
||||||
|
```go
|
||||||
|
import (
|
||||||
|
"github.com/Akilan1999/p2p-rendering-computation/p2p/frp"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
serverPort, err := frp.GetFRPServerPort("http://" + <lowestLatencyIpAddress.Ipv4> + ":" + lowestLatencyIpAddress.ServerPort)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
// Create 1 second delay to allow FRP server to start
|
||||||
|
time.Sleep(1 * time.Second)
|
||||||
|
// Starts FRP as a client with
|
||||||
|
proxyPort, err := frp.StartFRPClientForServer(<lowestLatencyIpAddress.Ipv4>, serverPort, <the port you want to expose externally>)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
### Upload speed
|
|
||||||
The upload speed is measured as (<file size>/<time taken to upload>)*8. This
|
|
||||||
gives the results in megabits per second. The file uploaded is a 50 mb auto generated file.
|
|
||||||
The route /upload is called from the server side to upload the file.
|
|
||||||
|
|||||||
@@ -54,22 +54,23 @@ nodes to execute Ansible instructions. In this project this file needs to be set
|
|||||||
go code or binary will populate this file automatically with the appropriate information required to connect to local or
|
go code or binary will populate this file automatically with the appropriate information required to connect to local or
|
||||||
remote containers.
|
remote containers.
|
||||||
|
|
||||||
#### Note: Add as exactly specified below
|
> [!NOTE]
|
||||||
```
|
> Add as exactly specified below:
|
||||||
all:
|
> ```
|
||||||
vars:
|
>all:
|
||||||
ansible_python_interpreter: /usr/bin/python3 // Path to your python 3 interpreter
|
> vars:
|
||||||
main:
|
> ansible_python_interpreter: /usr/bin/python3 // Path to your python 3 interpreter
|
||||||
hosts:
|
>main:
|
||||||
host1:
|
> hosts:
|
||||||
// Note: These values will be automatically overwritten
|
> host1:
|
||||||
// by the Go functions
|
> // Note: These values will be automatically overwritten
|
||||||
ansible_host: 0.0.0.0
|
> // by the Go functions
|
||||||
ansible_port: 39269
|
> ansible_host: 0.0.0.0
|
||||||
ansible_user: master
|
> ansible_port: 39269
|
||||||
ansible_ssh_pass: password
|
> ansible_user: master
|
||||||
ansible_sudo_pass: password
|
> ansible_ssh_pass: password
|
||||||
```
|
> ansible_sudo_pass: password
|
||||||
|
>```
|
||||||
|
|
||||||
## Ports.json
|
## Ports.json
|
||||||
The ```ports.json``` file is intended to mention the number of ports required
|
The ```ports.json``` file is intended to mention the number of ports required
|
||||||
|
|||||||
@@ -1,35 +0,0 @@
|
|||||||
# Problems in implementation
|
|
||||||
|
|
||||||
### Number of Devices in the network:
|
|
||||||
The current implementation has the major flaw which is that
|
|
||||||
the server has to be in port 8088 to detected in the public
|
|
||||||
network. As we know most personal networks have a single IP
|
|
||||||
address. This means we cannot have duplicate ports. A fix can
|
|
||||||
be to mention the open port on the IP table file.
|
|
||||||
(Ex: Possible feild to be added)
|
|
||||||
```
|
|
||||||
{
|
|
||||||
"ip_address": [
|
|
||||||
{
|
|
||||||
"ipv4": "localhost",
|
|
||||||
"latency": 14981051,
|
|
||||||
"download": 8142.122540206258,
|
|
||||||
"upload": 3578.766512629995,
|
|
||||||
"port": 8088
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Broadcast of container specs
|
|
||||||
At the moment the container specs are not broadcasted rather
|
|
||||||
just the machines specs and this module has yet to be tested
|
|
||||||
rigorously.
|
|
||||||
|
|
||||||
### Intergration with GPU
|
|
||||||
Certain machines have GPUs present in them which provide a
|
|
||||||
huge advantage for those who want to do rendering and certain
|
|
||||||
sort of computation. The Aim is to only allow it to be compatible
|
|
||||||
with Nvidia. But an better idea would be to provide compatability
|
|
||||||
with multiple GPU providers.
|
|
||||||
|
|
||||||
@@ -2,10 +2,11 @@
|
|||||||
# Table of contents
|
# Table of contents
|
||||||
1. [Introduction](Introduction.md)
|
1. [Introduction](Introduction.md)
|
||||||
2. [Installation](Installation.md)
|
2. [Installation](Installation.md)
|
||||||
3. [Design Architecture](DesignArchtectureIntro.md)
|
3. [Abstractions](Abstractions.md)
|
||||||
|
<!-- 3. [Design Architecture](DesignArchtectureIntro.md)
|
||||||
1. [Client Module](ClientArchitecture.md)
|
1. [Client Module](ClientArchitecture.md)
|
||||||
2. [P2P Module](P2PArchitecture.md)
|
2. [P2P Module](P2PArchitecture.md)
|
||||||
3. [Server Module](ServerArchitecture.md)
|
3. [Server Module](ServerArchitecture.md) -->
|
||||||
4. [Implementation](Implementation.md)
|
4. [Implementation](Implementation.md)
|
||||||
1. [Client Module](ClientImplementation.md)
|
1. [Client Module](ClientImplementation.md)
|
||||||
2. [P2P Module](P2PImplementation.md)
|
2. [P2P Module](P2PImplementation.md)
|
||||||
@@ -13,6 +14,7 @@
|
|||||||
4. [Config Module](ConfigImplementation.md)
|
4. [Config Module](ConfigImplementation.md)
|
||||||
5. [Cli Module](CliImplementation.md)
|
5. [Cli Module](CliImplementation.md)
|
||||||
6. [Plugin Module](PluginImplementation.md)
|
6. [Plugin Module](PluginImplementation.md)
|
||||||
7. [Generate Module](GenerateImplementation.md)
|
7. [Language bindings](Bindings.md)
|
||||||
5. [Problems](https://github.com/Akilan1999/p2p-rendering-computation/issues)
|
8. [Domain name mappings](Bindings.md)
|
||||||
|
<!-- 5. [Problems](https://github.com/Akilan1999/p2p-rendering-computation/issues) -->
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,14 @@ This section focuses on an in-depth understanding of the server module implement
|
|||||||
understand the architecture of the server module refer. The server module can be split
|
understand the architecture of the server module refer. The server module can be split
|
||||||
into various sections. Each section will provide information on how a certain feature works.
|
into various sections. Each section will provide information on how a certain feature works.
|
||||||
|
|
||||||
|
The server module takes care of setting and removing the virtualization environment (i.e
|
||||||
|
containers) for accessing and doing the appropriate computation. It also interacts with the peer to
|
||||||
|
peer module to update the IP table on the server side. The server module
|
||||||
|
accesses information regarding CPU and GPU specifications of the machine running the server
|
||||||
|
module. To do Speed tests the server has routes which allows it to upload and download a 50mb.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## Web framework
|
## Web framework
|
||||||
The web framework used for the server module is called Gin. The reason Gin was chosen is due to
|
The web framework used for the server module is called Gin. The reason Gin was chosen is due to
|
||||||
its wide use and strong documentation available on the official github repository. The default
|
its wide use and strong documentation available on the official github repository. The default
|
||||||
|
|||||||
9
Makefile
9
Makefile
@@ -9,3 +9,12 @@ testcases:
|
|||||||
run:
|
run:
|
||||||
go run main.go
|
go run main.go
|
||||||
|
|
||||||
|
sharedObjects:
|
||||||
|
sh build-bindings.sh
|
||||||
|
|
||||||
|
python:
|
||||||
|
sh build-python-package.sh
|
||||||
|
|
||||||
|
clean:
|
||||||
|
go clean -modcache
|
||||||
|
rm -fr .go-build vendor result*
|
||||||
|
|||||||
70
README.md
70
README.md
@@ -1,3 +1,6 @@
|
|||||||
|
> [!NOTE]
|
||||||
|
> Fixing documentation to latest changes. If you have any questions setting up P2PRC either [create an issue](https://github.com/Akilan1999/p2p-rendering-computation/issues/new/choose) or send me an email (me AT akilan dot io).
|
||||||
|
> Currently HEAD is always intended to stay on a working state. It is recommended to always use HEAD in your go.mod file.
|
||||||
|
|
||||||
<h1 align="center">
|
<h1 align="center">
|
||||||
<br>
|
<br>
|
||||||
@@ -18,20 +21,40 @@ The main aim of this project was to create a custom peer to peer network. The us
|
|||||||
client has total flexibility on how to batch the tasks and the user acting as the server has complete
|
client has total flexibility on how to batch the tasks and the user acting as the server has complete
|
||||||
flexibility on tracking the container's usages and killing the containers at any point of time.
|
flexibility on tracking the container's usages and killing the containers at any point of time.
|
||||||
|
|
||||||
## Gophers talk
|
## Latest tutorial
|
||||||
[](https://www.youtube.com/watch?v=ovcZLEhQxWk "P2PRC - Gophers monthly talk")
|
[](https://www.youtube.com/watch?v=OMwCpedu5cs")
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
## Table of contents
|
## Table of contents in the current README
|
||||||
1. [Introduction](#Introduction)
|
1. [Introduction](#Introduction)
|
||||||
2. [Installation](#Installation.md)
|
2. [Installation](#extend-your-application-with-p2prc)
|
||||||
3. [Design Architecture](#Design-Architecture)
|
3. [Design Architecture](#Design-Architecture)
|
||||||
4. [Implementation](#Implementation)
|
4. [Implementation](#Implementation)
|
||||||
5. [Find out more](#Find-out-more)
|
5. [Find out more](#Find-out-more)
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
# Table of contents in the Docs folder
|
||||||
|
1. [Introduction](Docs/Introduction.md)
|
||||||
|
2. [Installation](Docs/Installation.md)
|
||||||
|
3. [Abstractions](Docs/Abstractions.md)
|
||||||
|
<!-- 3. [Design Architecture](DesignArchtectureIntro.md)
|
||||||
|
1. [Client Module](ClientArchitecture.md)
|
||||||
|
2. [P2P Module](P2PArchitecture.md)
|
||||||
|
3. [Server Module](ServerArchitecture.md) -->
|
||||||
|
4. [Implementation](Docs/Implementation.md)
|
||||||
|
1. [Client Module](Docs/ClientImplementation.md)
|
||||||
|
2. [P2P Module](Docs/P2PImplementation.md)
|
||||||
|
3. [Server Module](Docs/ServerImplementation.md)
|
||||||
|
4. [Config Module](Docs/ConfigImplementation.md)
|
||||||
|
5. [Cli Module](Docs/CliImplementation.md)
|
||||||
|
6. [Plugin Module](Docs/PluginImplementation.md)
|
||||||
|
7. [Language Bindings](Docs/Bindings.md)
|
||||||
|
<!-- 5. [Problems](https://github.com/Akilan1999/p2p-rendering-computation/issues) -->
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
This project aims to create a peer to peer (p2p) network, where a user can use the p2p network to act as a client (i.e sending tasks) or the server (i.e executing the tasks). A prototype application will be developed, which comes bundled with a p2p module and possible to execute docker containers or virtual environments across selected nodes.
|
This project aims to create a peer to peer (p2p) network, where a user can use the p2p network to act as a client (i.e sending tasks) or the server (i.e executing the tasks). A prototype application will be developed, which comes bundled with a p2p module and possible to execute docker containers or virtual environments across selected nodes.
|
||||||
|
|
||||||
@@ -45,6 +68,44 @@ This project aims to create a peer to peer (p2p) network, where a user can use t
|
|||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
## Extend your application with P2PRC
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"github.com/Akilan1999/p2p-rendering-computation/abstractions"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
_, err := abstractions.Init(nil)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// start p2prc
|
||||||
|
_, err = abstractions.Start()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Run server till termination
|
||||||
|
for {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
### Export once this is added export P2PRC as environment paths
|
||||||
|
```
|
||||||
|
export P2PRC=<PROJECT PATH>
|
||||||
|
export PATH=<PROJECT PATH>:${PATH}
|
||||||
|
```
|
||||||
|
[Read more](Docs/Abstractions.md) ...
|
||||||
|
|
||||||
## Installation from source
|
## Installation from source
|
||||||
1. Ensure the Go compiler is installed
|
1. Ensure the Go compiler is installed
|
||||||
```
|
```
|
||||||
@@ -101,4 +162,3 @@ or just providing feedback on new features to build or even just curious about
|
|||||||
[](https://discord.gg/b4nRGTjYqy)
|
[](https://discord.gg/b4nRGTjYqy)
|
||||||
|
|
||||||
[](https://github.com/Gaurav-Gosain)
|
[](https://github.com/Gaurav-Gosain)
|
||||||
|
|
||||||
|
|||||||
88
abstractions/base.go
Normal file
88
abstractions/base.go
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
package abstractions
|
||||||
|
|
||||||
|
import "C"
|
||||||
|
import (
|
||||||
|
"github.com/Akilan1999/p2p-rendering-computation/client"
|
||||||
|
"github.com/Akilan1999/p2p-rendering-computation/client/clientIPTable"
|
||||||
|
Config "github.com/Akilan1999/p2p-rendering-computation/config"
|
||||||
|
"github.com/Akilan1999/p2p-rendering-computation/config/generate"
|
||||||
|
"github.com/Akilan1999/p2p-rendering-computation/p2p"
|
||||||
|
"github.com/Akilan1999/p2p-rendering-computation/server"
|
||||||
|
"github.com/Akilan1999/p2p-rendering-computation/server/docker"
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
"os"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Init Initialises p2prc
|
||||||
|
func Init(customConfig interface{}) (config *Config.Config, err error) {
|
||||||
|
|
||||||
|
// Get config file path
|
||||||
|
// Checks P2PRC path initially
|
||||||
|
// - Get PATH if environment varaible
|
||||||
|
path, err := Config.GetPathP2PRC("P2PRC")
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// check if the config file exists
|
||||||
|
if _, err = os.Stat(path + "config.json"); err != nil {
|
||||||
|
// Initialize with base p2prc config files
|
||||||
|
// set the config file with default paths
|
||||||
|
config, err = generate.SetDefaults("P2PRC", false, customConfig, false)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// If the configs are available then use them over generating new ones.
|
||||||
|
config, err = Config.ConfigInit(nil, nil)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Start p2prc in a server mode
|
||||||
|
func Start() (*gin.Engine, error) {
|
||||||
|
engine, err := server.Server()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return engine, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MapPort Creates a reverse proxy connection and maps the appropriate port
|
||||||
|
func MapPort(port string, domainName string) (entireAddres string, mapPort string, err error) {
|
||||||
|
entireAddres, mapPort, err = server.MapPort(port, domainName)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// StartContainer Starts docker container on the remote machine
|
||||||
|
func StartContainer(IP string) (container *docker.DockerVM, err error) {
|
||||||
|
container, err = client.StartContainer(IP, 0, false, "", "")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// RemoveContainer Removes docker container based on the IP address and ID
|
||||||
|
// provided
|
||||||
|
func RemoveContainer(IP string, ID string) error {
|
||||||
|
return client.RemoveContianer(IP, ID)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetSpecs Get spec information about the remote server
|
||||||
|
func GetSpecs(IP string) (specs *server.SysInfo, err error) {
|
||||||
|
specs, err = client.GetSpecs(IP)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// ViewIPTable View information of nodes in the network
|
||||||
|
func ViewIPTable() (table *p2p.IpAddresses, err error) {
|
||||||
|
table, err = p2p.ReadIpTable()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// UpdateIPTable Force updates IP tables based on new
|
||||||
|
// new nodes discovered in the network
|
||||||
|
func UpdateIPTable() (err error) {
|
||||||
|
return clientIPTable.UpdateIpTableListClient()
|
||||||
|
}
|
||||||
BIN
artwork/.DS_Store
vendored
Normal file
BIN
artwork/.DS_Store
vendored
Normal file
Binary file not shown.
@@ -4,13 +4,11 @@
|
|||||||
## Pure HTML Version of the p2prc Logo :)
|
## Pure HTML Version of the p2prc Logo :)
|
||||||

|

|
||||||
|
|
||||||
> Note: To change the size of the logo simply edit the CSS variable of `--size` under the `style` tag!
|
> [!NOTE]
|
||||||
|
> To change the size of the logo simply edit the CSS variable of `--size` under the `style` tag!
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### Embedding the HTML as a `foreignObject` element inside an SVG directly
|
### Embedding the HTML as a `foreignObject` element inside an SVG directly
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
1
build-bindings.sh
Normal file
1
build-bindings.sh
Normal file
@@ -0,0 +1 @@
|
|||||||
|
cd Bindings && go build -buildmode=c-shared -o p2prc.so
|
||||||
28
build-python-package.sh
Normal file
28
build-python-package.sh
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
# Create export directory for python
|
||||||
|
mkdir Bindings/python/export
|
||||||
|
|
||||||
|
# Creating SharedObjects directory for python
|
||||||
|
mkdir Bindings/python/export/SharedObjects
|
||||||
|
|
||||||
|
sh build-bindings.sh
|
||||||
|
|
||||||
|
cp Bindings/p2prc.h Bindings/python/export/SharedObjects/
|
||||||
|
cp Bindings/p2prc.so Bindings/python/export/SharedObjects/
|
||||||
|
|
||||||
|
cp Bindings/python/p2prc.py Bindings/python/export/
|
||||||
|
|
||||||
|
echo "Output is in the Directory Bindings/python/export/"
|
||||||
|
|
||||||
|
# Architectures for Linux
|
||||||
|
#archs=(amd64 arm64)
|
||||||
|
#
|
||||||
|
#for arch in ${archs[@]}
|
||||||
|
#do
|
||||||
|
# mkdir Bindings/python/export/SharedObjects/linux-${arch}
|
||||||
|
# cd Bindings/
|
||||||
|
# env GOOS=linux GOARCH=${arch} go build -buildmode=c-shared -o python/export/SharedObjects/linux-${arch}/p2prc.so
|
||||||
|
# echo "GOOS=linux GOARCH=${arch} go build -buildmode=c-shared -o python/export/SharedObjects/linux-${arch}/p2prc.so"
|
||||||
|
# cd ..
|
||||||
|
#done
|
||||||
@@ -1,311 +1,310 @@
|
|||||||
package client
|
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"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Groups Data Structure type
|
// Groups Data Structure type
|
||||||
type Groups struct {
|
type Groups struct {
|
||||||
GroupList []*Group `json:"Groups"`
|
GroupList []*Group `json:"Groups"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Group Information about a single group
|
// Group Information about a single group
|
||||||
type Group struct {
|
type Group struct {
|
||||||
ID string `json:"ID"`
|
ID string `json:"ID"`
|
||||||
TrackContainerList []*TrackContainer `json:"TrackContainer"`
|
TrackContainerList []*TrackContainer `json:"TrackContainer"`
|
||||||
// Sneaky as required only when removing the element
|
// Sneaky as required only when removing the element
|
||||||
// Set when GetGroup function is called
|
// Set when GetGroup function is called
|
||||||
index int
|
index int
|
||||||
}
|
}
|
||||||
|
|
||||||
// CreateGroup Creates a new group to add a set of track containers
|
// CreateGroup Creates a new group to add a set of track containers
|
||||||
func CreateGroup() (*Group, error){
|
func CreateGroup() (*Group, error) {
|
||||||
// Creating variable of type new group
|
// Creating variable of type new group
|
||||||
var NewGroup Group
|
var NewGroup Group
|
||||||
// Generate new UUID for group ID
|
// Generate new UUID for group ID
|
||||||
id := uuid.New()
|
id := uuid.New()
|
||||||
// Add new group id and prepend with the string "grp"
|
// Add new group id and prepend with the string "grp"
|
||||||
// The reason this is done is to differentiate between a
|
// The reason this is done is to differentiate between a
|
||||||
// group ID and docker container ID
|
// group ID and docker container ID
|
||||||
NewGroup.ID = "grp" + id.String()
|
NewGroup.ID = "grp" + id.String()
|
||||||
// Adding the new group to the
|
// Adding the new group to the
|
||||||
// GroupTrackContainer File
|
// GroupTrackContainer File
|
||||||
err := NewGroup.AddGroupToFile()
|
err := NewGroup.AddGroupToFile()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
return &NewGroup,nil
|
return &NewGroup, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// RemoveGroup Removes group based on the group ID provided
|
// RemoveGroup Removes group based on the group ID provided
|
||||||
func RemoveGroup(GroupID string) error {
|
func RemoveGroup(GroupID string) error {
|
||||||
// Read group information from the
|
// Read group information from the
|
||||||
//grouptrackcontainer json file
|
//grouptrackcontainer json file
|
||||||
groups, err := ReadGroup()
|
groups, err := ReadGroup()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
// Gets Group struct based on group ID
|
// Gets Group struct based on group ID
|
||||||
// provided
|
// provided
|
||||||
group, err := GetGroup(GroupID)
|
group, err := GetGroup(GroupID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
// Remove Group struct from the groups variable
|
// Remove Group struct from the groups variable
|
||||||
groups.GroupList = append(groups.GroupList[:group.index], groups.GroupList[group.index+1:]...)
|
groups.GroupList = append(groups.GroupList[:group.index], groups.GroupList[group.index+1:]...)
|
||||||
|
|
||||||
// Write new groups to the grouptrackcontainer json file
|
// Write new groups to the grouptrackcontainer json file
|
||||||
err = groups.WriteGroup()
|
err = groups.WriteGroup()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddContainerToGroup Adds container information to the Group based on the Group ID
|
// AddContainerToGroup Adds container information to the Group based on the Group ID
|
||||||
func AddContainerToGroup(ContainerID string, GroupID string) (*Group, error) {
|
func AddContainerToGroup(ContainerID string, GroupID string) (*Group, error) {
|
||||||
// Gets container information based on container ID provided
|
// Gets container information based on container ID provided
|
||||||
containerInfo, err := GetContainerInformation(ContainerID)
|
containerInfo, err := GetContainerInformation(ContainerID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
// Gets group information based on the group ID provided
|
// Gets group information based on the group ID provided
|
||||||
group, err := GetGroup(GroupID)
|
group, err := GetGroup(GroupID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
// Adds container information the group
|
// Adds container information the group
|
||||||
group.AddContainer(containerInfo)
|
group.AddContainer(containerInfo)
|
||||||
|
|
||||||
// Get Groups information from reading the grouptrackcontainer.json file
|
// Get Groups information from reading the grouptrackcontainer.json file
|
||||||
groups, err := ReadGroup()
|
groups, err := ReadGroup()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
// Updating specific element in the group list with the added container
|
// Updating specific element in the group list with the added container
|
||||||
groups.GroupList[group.index] = group
|
groups.GroupList[group.index] = group
|
||||||
// Write groups information on the grouptrackcontainer.json file
|
// Write groups information on the grouptrackcontainer.json file
|
||||||
err = groups.WriteGroup()
|
err = groups.WriteGroup()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
return group, nil
|
return group, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// RemoveContainerGroup Remove Container from the group ID specified
|
// RemoveContainerGroup Remove Container from the group ID specified
|
||||||
func RemoveContainerGroup(ContainerID string, GroupID string) (*Group,error) {
|
func RemoveContainerGroup(ContainerID string, GroupID string) (*Group, error) {
|
||||||
// Get container information based on container ID provided
|
// Get container information based on container ID provided
|
||||||
containerInfo, err := GetContainerInformation(ContainerID)
|
containerInfo, err := GetContainerInformation(ContainerID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil,err
|
return nil, err
|
||||||
}
|
}
|
||||||
// Gets group information based on the group ID provided
|
// Gets group information based on the group ID provided
|
||||||
group, err := GetGroup(GroupID)
|
group, err := GetGroup(GroupID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil,err
|
return nil, err
|
||||||
}
|
}
|
||||||
// Remove container from the appropriate group
|
// Remove container from the appropriate group
|
||||||
err = group.RemoveContainerGroup(containerInfo)
|
err = group.RemoveContainerGroup(containerInfo)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil,err
|
return nil, err
|
||||||
}
|
}
|
||||||
// Get Groups information from reading the grouptrackcontainer.json file
|
// Get Groups information from reading the grouptrackcontainer.json file
|
||||||
groups, err := ReadGroup()
|
groups, err := ReadGroup()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
// Updating specific element in the group list with the remove container
|
// Updating specific element in the group list with the remove container
|
||||||
groups.GroupList[group.index] = group
|
groups.GroupList[group.index] = group
|
||||||
// Write groups information on the grouptrackcontainer.json file
|
// Write groups information on the grouptrackcontainer.json file
|
||||||
err = groups.WriteGroup()
|
err = groups.WriteGroup()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
return group, nil
|
return group, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// RemoveContainerGroups Remove Container from groups (i.e which ever groups has information
|
// RemoveContainerGroups Remove Container from groups (i.e which ever groups has information
|
||||||
// about that container). This is mostly called when a container is deleted or removed from
|
// about that container). This is mostly called when a container is deleted or removed from
|
||||||
// the tracked container list
|
// the tracked container list
|
||||||
func RemoveContainerGroups(ContainerID string) error {
|
func RemoveContainerGroups(ContainerID string) error {
|
||||||
// Get container information based on container ID provided
|
// Get container information based on container ID provided
|
||||||
containerInfo, err := GetContainerInformation(ContainerID)
|
containerInfo, err := GetContainerInformation(ContainerID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
// Get Groups information from reading the grouptrackcontainer.json file
|
// Get Groups information from reading the grouptrackcontainer.json file
|
||||||
groups, err := ReadGroup()
|
groups, err := ReadGroup()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
// Removes container information from all groups it is found in
|
// Removes container information from all groups it is found in
|
||||||
err = groups.RemoveContainerGroups(containerInfo)
|
err = groups.RemoveContainerGroups(containerInfo)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
// Write groups information on the grouptrackcontainer.json file
|
// Write groups information on the grouptrackcontainer.json file
|
||||||
err = groups.WriteGroup()
|
err = groups.WriteGroup()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetGroup Gets group information based on
|
// GetGroup Gets group information based on
|
||||||
// group id provided
|
// group id provided
|
||||||
func GetGroup(GroupID string) (*Group,error) {
|
func GetGroup(GroupID string) (*Group, error) {
|
||||||
// Read group information from the
|
// Read group information from the
|
||||||
//grouptrackcontainer json file
|
//grouptrackcontainer json file
|
||||||
groups, err := ReadGroup()
|
groups, err := ReadGroup()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
// Iterate through the set of groups and
|
// Iterate through the set of groups and
|
||||||
// if the group ID matches then return it
|
// if the group ID matches then return it
|
||||||
for i, group := range groups.GroupList {
|
for i, group := range groups.GroupList {
|
||||||
if group.ID == GroupID {
|
if group.ID == GroupID {
|
||||||
group.index = i
|
group.index = i
|
||||||
return group, nil
|
return group, nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil,errors.New("Group not found. ")
|
return nil, errors.New("Group not found. ")
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddGroupToFile Adds Group struct to the GroupTrackContainer File
|
// AddGroupToFile Adds Group struct to the GroupTrackContainer File
|
||||||
func (grp *Group) AddGroupToFile() error {
|
func (grp *Group) AddGroupToFile() error {
|
||||||
// Gets all group information from the
|
// Gets all group information from the
|
||||||
// GroupTrackContainer JSON file
|
// GroupTrackContainer JSON file
|
||||||
groups, err := ReadGroup()
|
groups, err := ReadGroup()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
// Appending the newly created group
|
// Appending the newly created group
|
||||||
groups.GroupList = append(groups.GroupList, grp)
|
groups.GroupList = append(groups.GroupList, grp)
|
||||||
// Writing Group information to the GroupTrackContainer
|
// Writing Group information to the GroupTrackContainer
|
||||||
// JSON file
|
// JSON file
|
||||||
err = groups.WriteGroup()
|
err = groups.WriteGroup()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// ReadGroup Function reads grouptrackcontainers.json and converts
|
// ReadGroup Function reads grouptrackcontainers.json and converts
|
||||||
// result to Groups
|
// result to Groups
|
||||||
func ReadGroup() (*Groups,error) {
|
func ReadGroup() (*Groups, error) {
|
||||||
// Get Path from config
|
// Get Path from config
|
||||||
config, err := config.ConfigInit()
|
config, err := config.ConfigInit(nil, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil,err
|
return nil, err
|
||||||
}
|
}
|
||||||
jsonFile, err := os.Open(config.GroupTrackContainersPath)
|
jsonFile, err := os.Open(config.GroupTrackContainersPath)
|
||||||
// if we os.Open returns an error then handle it
|
// if we os.Open returns an error then handle it
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil,err
|
return nil, err
|
||||||
}
|
}
|
||||||
// defer the closing of our jsonFile so that we can parse it later on
|
// defer the closing of our jsonFile so that we can parse it later on
|
||||||
defer jsonFile.Close()
|
defer jsonFile.Close()
|
||||||
// read our opened xmlFile as a byte array.
|
// read our opened xmlFile as a byte array.
|
||||||
byteValue, _ := ioutil.ReadAll(jsonFile)
|
byteValue, _ := ioutil.ReadAll(jsonFile)
|
||||||
// we initialize our Users array
|
// we initialize our Users array
|
||||||
var groups Groups
|
var groups Groups
|
||||||
// we unmarshal our byteArray which contains our
|
// we unmarshal our byteArray which contains our
|
||||||
// jsonFile's content into 'users' which we defined above
|
// jsonFile's content into 'users' which we defined above
|
||||||
json.Unmarshal(byteValue, &groups)
|
json.Unmarshal(byteValue, &groups)
|
||||||
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, "", " ")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
// Get Path from config
|
// Get Path from config
|
||||||
config, err := config.ConfigInit()
|
config, err := config.ConfigInit(nil, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
// Writes to the appropriate file
|
// Writes to the appropriate file
|
||||||
err = ioutil.WriteFile(config.GroupTrackContainersPath, file, 0644)
|
err = ioutil.WriteFile(config.GroupTrackContainersPath, file, 0644)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddContainer Adds a container to the Tracked container list of the group
|
// AddContainer Adds a container to the Tracked container list of the group
|
||||||
func (grp *Group)AddContainer(Container *TrackContainer) error {
|
func (grp *Group) AddContainer(Container *TrackContainer) error {
|
||||||
grp.TrackContainerList = append(grp.TrackContainerList, Container)
|
grp.TrackContainerList = append(grp.TrackContainerList, Container)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// RemoveContainerGroup Removes container information from the group
|
// RemoveContainerGroup Removes container information from the group
|
||||||
func (grp *Group)RemoveContainerGroup(Container *TrackContainer) error {
|
func (grp *Group) RemoveContainerGroup(Container *TrackContainer) error {
|
||||||
// Iterating through all container in the Group of Tracked Container
|
// Iterating through all container in the Group of Tracked Container
|
||||||
for i, container := range grp.TrackContainerList {
|
for i, container := range grp.TrackContainerList {
|
||||||
// If the container ID matches then remove the container from the group
|
// If the container ID matches then remove the container from the group
|
||||||
if container.Id == Container.Id {
|
if container.Id == Container.Id {
|
||||||
grp.TrackContainerList = append(grp.TrackContainerList[:i], grp.TrackContainerList[i+1:]...)
|
grp.TrackContainerList = append(grp.TrackContainerList[:i], grp.TrackContainerList[i+1:]...)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// RemoveContainerGroups removes container found in all groups
|
// RemoveContainerGroups removes container found in all groups
|
||||||
func (grp *Groups)RemoveContainerGroups(Container *TrackContainer) error {
|
func (grp *Groups) RemoveContainerGroups(Container *TrackContainer) error {
|
||||||
// Iterating through all groups
|
// Iterating through all groups
|
||||||
for i,group := range grp.GroupList {
|
for i, group := range grp.GroupList {
|
||||||
// Removes the container in the following group
|
// Removes the container in the following group
|
||||||
// if it exists
|
// if it exists
|
||||||
err := group.RemoveContainerGroup(Container)
|
err := group.RemoveContainerGroup(Container)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
// Set group information to list groups
|
// Set group information to list groups
|
||||||
grp.GroupList[i] = group
|
grp.GroupList[i] = group
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// ModifyContainerGroups Modifies container information is all groups
|
// ModifyContainerGroups Modifies container information is all groups
|
||||||
// available
|
// available
|
||||||
func (TC *TrackContainer)ModifyContainerGroups() error {
|
func (TC *TrackContainer) ModifyContainerGroups() error {
|
||||||
group, err := ReadGroup()
|
group, err := ReadGroup()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
// Iterate though all groups and modify the container
|
// Iterate though all groups and modify the container
|
||||||
// information in groups where the modified container
|
// information in groups where the modified container
|
||||||
// ID matches
|
// ID matches
|
||||||
for i, _ := range group.GroupList {
|
for i, _ := range group.GroupList {
|
||||||
// Checking in each group if the modified container ID exists
|
// Checking in each group if the modified container ID exists
|
||||||
for j, _:= range group.GroupList[i].TrackContainerList {
|
for j, _ := range group.GroupList[i].TrackContainerList {
|
||||||
// If there is match then change them
|
// If there is match then change them
|
||||||
if group.GroupList[i].TrackContainerList[j].Id == TC.Id {
|
if group.GroupList[i].TrackContainerList[j].Id == TC.Id {
|
||||||
group.GroupList[i].TrackContainerList[j] = TC
|
group.GroupList[i].TrackContainerList[j] = TC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write modified result to the Groups track container JSON file
|
// Write modified result to the Groups track container JSON file
|
||||||
err = group.WriteGroup()
|
err = group.WriteGroup()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -46,14 +46,14 @@ func TestAddContainerToGroup(t *testing.T) {
|
|||||||
|
|
||||||
// Creating and adding the container to the
|
// Creating and adding the container to the
|
||||||
// tracked list
|
// tracked list
|
||||||
container1 ,err := docker.BuildRunContainer(0,"false","")
|
container1, err := docker.BuildRunContainer(0, "false", "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
t.Fail()
|
t.Fail()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Testing the AddTrackContainer Function and adding the first container created
|
// Testing the AddTrackContainer Function and adding the first container created
|
||||||
err = AddTrackContainer(container1,"0.0.0.0")
|
err = AddTrackContainer(container1, "0.0.0.0")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// Killing docker container created
|
// Killing docker container created
|
||||||
err = docker.StopAndRemoveContainer(container1.ID)
|
err = docker.StopAndRemoveContainer(container1.ID)
|
||||||
@@ -66,7 +66,7 @@ func TestAddContainerToGroup(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Adds container information to the group
|
// Adds container information to the group
|
||||||
Group, err := AddContainerToGroup(container1.ID,group.ID)
|
Group, err := AddContainerToGroup(container1.ID, group.ID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
t.Fail()
|
t.Fail()
|
||||||
@@ -109,14 +109,14 @@ func TestGroup_RemoveContainerGroup(t *testing.T) {
|
|||||||
|
|
||||||
// Creating and adding the container to the
|
// Creating and adding the container to the
|
||||||
// tracked list
|
// tracked list
|
||||||
container1 ,err := docker.BuildRunContainer(0,"false","")
|
container1, err := docker.BuildRunContainer(0, "false", "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
t.Fail()
|
t.Fail()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Testing the AddTrackContainer Function and adding the first container created
|
// Testing the AddTrackContainer Function and adding the first container created
|
||||||
err = AddTrackContainer(container1,"0.0.0.0")
|
err = AddTrackContainer(container1, "0.0.0.0")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// Killing docker container created
|
// Killing docker container created
|
||||||
err = docker.StopAndRemoveContainer(container1.ID)
|
err = docker.StopAndRemoveContainer(container1.ID)
|
||||||
@@ -129,7 +129,7 @@ func TestGroup_RemoveContainerGroup(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Adds container information to the group
|
// Adds container information to the group
|
||||||
Group, err := AddContainerToGroup(container1.ID,group.ID)
|
Group, err := AddContainerToGroup(container1.ID, group.ID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
t.Fail()
|
t.Fail()
|
||||||
@@ -138,7 +138,7 @@ func TestGroup_RemoveContainerGroup(t *testing.T) {
|
|||||||
PrettyPrint(Group)
|
PrettyPrint(Group)
|
||||||
|
|
||||||
// Removing docker container from the group
|
// Removing docker container from the group
|
||||||
Group, err = RemoveContainerGroup(container1.ID,group.ID)
|
Group, err = RemoveContainerGroup(container1.ID, group.ID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
t.Fail()
|
t.Fail()
|
||||||
@@ -182,7 +182,7 @@ func TestGroups_RemoveContainerGroups(t *testing.T) {
|
|||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
t.Fail()
|
t.Fail()
|
||||||
}
|
}
|
||||||
// Created another group assigned to variable group 1
|
// Created another group assigned to variable group 1
|
||||||
group1, err := CreateGroup()
|
group1, err := CreateGroup()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
@@ -191,14 +191,14 @@ func TestGroups_RemoveContainerGroups(t *testing.T) {
|
|||||||
|
|
||||||
// Creating and adding the container to the
|
// Creating and adding the container to the
|
||||||
// tracked list
|
// tracked list
|
||||||
container1 ,err := docker.BuildRunContainer(0,"false","")
|
container1, err := docker.BuildRunContainer(0, "false", "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
t.Fail()
|
t.Fail()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Testing the AddTrackContainer Function and adding the first container created
|
// Testing the AddTrackContainer Function and adding the first container created
|
||||||
err = AddTrackContainer(container1,"0.0.0.0")
|
err = AddTrackContainer(container1, "0.0.0.0")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// Killing docker container created
|
// Killing docker container created
|
||||||
err = docker.StopAndRemoveContainer(container1.ID)
|
err = docker.StopAndRemoveContainer(container1.ID)
|
||||||
@@ -211,7 +211,7 @@ func TestGroups_RemoveContainerGroups(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Adds container information to the group
|
// Adds container information to the group
|
||||||
Group, err := AddContainerToGroup(container1.ID,group.ID)
|
Group, err := AddContainerToGroup(container1.ID, group.ID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
t.Fail()
|
t.Fail()
|
||||||
@@ -220,7 +220,7 @@ func TestGroups_RemoveContainerGroups(t *testing.T) {
|
|||||||
PrettyPrint(Group)
|
PrettyPrint(Group)
|
||||||
|
|
||||||
// Adds container information to the group
|
// Adds container information to the group
|
||||||
Group1, err := AddContainerToGroup(container1.ID,group1.ID)
|
Group1, err := AddContainerToGroup(container1.ID, group1.ID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
t.Fail()
|
t.Fail()
|
||||||
|
|||||||
39
client/MAPPort.go
Normal file
39
client/MAPPort.go
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
package client
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/Akilan1999/p2p-rendering-computation/config"
|
||||||
|
"io/ioutil"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
type ResponseMAPPort struct {
|
||||||
|
IPAddress string
|
||||||
|
}
|
||||||
|
|
||||||
|
func MAPPort(port string, domainName string) (*ResponseMAPPort, error) {
|
||||||
|
Config, err := config.ConfigInit(nil, nil)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
//if version == "version 6" {
|
||||||
|
URL := "http://0.0.0.0:" + Config.ServerPort + "/MAPPort?port=" + port + "&domain_name=" + domainName
|
||||||
|
//} else {
|
||||||
|
// URL = "http://" + IP + ":" + serverPort + "/server_info"
|
||||||
|
//}
|
||||||
|
resp, err := http.Get(URL)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert response to byte value
|
||||||
|
byteValue, err := ioutil.ReadAll(resp.Body)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
var response ResponseMAPPort
|
||||||
|
response.IPAddress = string(byteValue)
|
||||||
|
|
||||||
|
return &response, nil
|
||||||
|
}
|
||||||
@@ -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"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,149 +1,149 @@
|
|||||||
package client
|
package client
|
||||||
|
|
||||||
import (
|
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"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TrackContainers This struct stores arrays of current containers running
|
// TrackContainers This struct stores arrays of current containers running
|
||||||
type TrackContainers struct {
|
type TrackContainers struct {
|
||||||
TrackContainerList []TrackContainer `json:"TrackContainer"`
|
TrackContainerList []TrackContainer `json:"TrackContainer"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// TrackContainer Stores information of current containers
|
// TrackContainer Stores information of current containers
|
||||||
type TrackContainer struct {
|
type TrackContainer struct {
|
||||||
Id string `json:"ID"`
|
Id string `json:"ID"`
|
||||||
Container *docker.DockerVM `json:"Container"`
|
Container *docker.DockerVM `json:"Container"`
|
||||||
IpAddress string `json:"IpAddress"`
|
IpAddress string `json:"IpAddress"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddTrackContainer Adds new container which has been added to the track container
|
// AddTrackContainer Adds new container which has been added to the track container
|
||||||
func AddTrackContainer(d *docker.DockerVM,ipAddress string) error {
|
func AddTrackContainer(d *docker.DockerVM, ipAddress string) error {
|
||||||
// Checking if pointer d is null
|
// Checking if pointer d is null
|
||||||
if d == nil {
|
if d == nil {
|
||||||
return errors.New("d is nil")
|
return errors.New("d is nil")
|
||||||
}
|
}
|
||||||
//Get config information to derive paths for track containers json file
|
//Get config information to derive paths for track containers json file
|
||||||
config,err := config.ConfigInit()
|
config, err := config.ConfigInit(nil, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Getting information about the file trackcontainers.json file
|
// Getting information about the file trackcontainers.json file
|
||||||
stat, err := os.Stat(config.TrackContainersPath)
|
stat, err := os.Stat(config.TrackContainersPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
// Initialize variable for TrackContainers
|
// Initialize variable for TrackContainers
|
||||||
var trackContainers TrackContainers
|
var trackContainers TrackContainers
|
||||||
// If the trackcontainers.json file is not empty then
|
// If the trackcontainers.json file is not empty then
|
||||||
// Read from that file
|
// Read from that file
|
||||||
if stat.Size() != 0 {
|
if stat.Size() != 0 {
|
||||||
// Reads tracked container file
|
// Reads tracked container file
|
||||||
trackContainersFile, err := ReadTrackContainers(config.TrackContainersPath)
|
trackContainersFile, err := ReadTrackContainers(config.TrackContainersPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
trackContainers = *trackContainersFile
|
trackContainers = *trackContainersFile
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize new variable with type struct TrackContainers and
|
// Initialize new variable with type struct TrackContainers and
|
||||||
// add container struct and ip address
|
// add container struct and ip address
|
||||||
var trackContainer TrackContainer
|
var trackContainer TrackContainer
|
||||||
trackContainer.Id = d.ID
|
trackContainer.Id = d.ID
|
||||||
trackContainer.Container = d
|
trackContainer.Container = d
|
||||||
trackContainer.IpAddress = ipAddress
|
trackContainer.IpAddress = ipAddress
|
||||||
|
|
||||||
// Adds new container as passed in the parameter to the struct
|
// Adds new container as passed in the parameter to the struct
|
||||||
if &trackContainer == nil {
|
if &trackContainer == nil {
|
||||||
return errors.New("trackContainer variable is nil")
|
return errors.New("trackContainer variable is nil")
|
||||||
}
|
}
|
||||||
trackContainers.TrackContainerList = append(trackContainers.TrackContainerList, trackContainer)
|
trackContainers.TrackContainerList = append(trackContainers.TrackContainerList, trackContainer)
|
||||||
|
|
||||||
// write modified information to the tracked json file
|
// write modified information to the tracked json file
|
||||||
data,err := json.MarshalIndent(trackContainers, "", "\t")
|
data, err := json.MarshalIndent(trackContainers, "", "\t")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
err = ioutil.WriteFile(config.TrackContainersPath,data,0777)
|
err = ioutil.WriteFile(config.TrackContainersPath, data, 0777)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// RemoveTrackedContainer This function removos tracked container from the trackcontainer JSON file
|
// RemoveTrackedContainer This function removos tracked container from the trackcontainer JSON file
|
||||||
func RemoveTrackedContainer(id string) error {
|
func RemoveTrackedContainer(id string) error {
|
||||||
//Get config information to derive paths for track containers json file
|
//Get config information to derive paths for track containers json file
|
||||||
config,err := config.ConfigInit()
|
config, err := config.ConfigInit(nil, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
// Getting tracked container struct
|
// Getting tracked container struct
|
||||||
trackedContainers, err := ReadTrackContainers(config.TrackContainersPath)
|
trackedContainers, err := ReadTrackContainers(config.TrackContainersPath)
|
||||||
// Storing index of element to remove
|
// Storing index of element to remove
|
||||||
var removeElement int
|
var removeElement int
|
||||||
removeElement = -1
|
removeElement = -1
|
||||||
for i := range trackedContainers.TrackContainerList {
|
for i := range trackedContainers.TrackContainerList {
|
||||||
if trackedContainers.TrackContainerList[i].Id == id {
|
if trackedContainers.TrackContainerList[i].Id == id {
|
||||||
removeElement = i
|
removeElement = i
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Checks if the element to be removed has been detected
|
// Checks if the element to be removed has been detected
|
||||||
if removeElement == -1 {
|
if removeElement == -1 {
|
||||||
return errors.New("Container ID not found in the tracked list")
|
return errors.New("Container ID not found in the tracked list")
|
||||||
}
|
}
|
||||||
// Remove the detected element from the struct
|
// Remove the detected element from the struct
|
||||||
trackedContainers.TrackContainerList = append(trackedContainers.TrackContainerList[:removeElement], trackedContainers.TrackContainerList[removeElement+1:]...)
|
trackedContainers.TrackContainerList = append(trackedContainers.TrackContainerList[:removeElement], trackedContainers.TrackContainerList[removeElement+1:]...)
|
||||||
|
|
||||||
// write modified information to the tracked json file
|
// write modified information to the tracked json file
|
||||||
data,err := json.MarshalIndent(trackedContainers, "", "\t")
|
data, err := json.MarshalIndent(trackedContainers, "", "\t")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
err = ioutil.WriteFile(config.TrackContainersPath,data,0777)
|
err = ioutil.WriteFile(config.TrackContainersPath, data, 0777)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// ViewTrackedContainers View Containers currently tracked
|
// ViewTrackedContainers View Containers currently tracked
|
||||||
func ViewTrackedContainers() (error,*TrackContainers) {
|
func ViewTrackedContainers() (error, *TrackContainers) {
|
||||||
config,err := config.ConfigInit()
|
config, err := config.ConfigInit(nil, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err,nil
|
return err, nil
|
||||||
}
|
}
|
||||||
trackedContianers, err := ReadTrackContainers(config.TrackContainersPath)
|
trackedContianers, err := ReadTrackContainers(config.TrackContainersPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err,nil
|
return err, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil,trackedContianers
|
return nil, trackedContianers
|
||||||
}
|
}
|
||||||
|
|
||||||
// ReadTrackContainers Reads containers which are currently tracked
|
// ReadTrackContainers Reads containers which are currently tracked
|
||||||
func ReadTrackContainers(filename string) (*TrackContainers, error) {
|
func ReadTrackContainers(filename string) (*TrackContainers, error) {
|
||||||
buf, err := ioutil.ReadFile(filename)
|
buf, err := ioutil.ReadFile(filename)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
c := &TrackContainers{}
|
c := &TrackContainers{}
|
||||||
err = json.Unmarshal(buf, c)
|
err = json.Unmarshal(buf, c)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("in file %q: %v", filename, err)
|
return nil, fmt.Errorf("in file %q: %v", filename, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return c, nil
|
return c, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
//func ModifyTrackContainers()
|
//func ModifyTrackContainers()
|
||||||
@@ -151,70 +151,70 @@ func ReadTrackContainers(filename string) (*TrackContainers, error) {
|
|||||||
// GetContainerInformation gets information about container based on
|
// GetContainerInformation gets information about container based on
|
||||||
// container ID provided
|
// container ID provided
|
||||||
func GetContainerInformation(ID string) (*TrackContainer, error) {
|
func GetContainerInformation(ID string) (*TrackContainer, error) {
|
||||||
// Getting the current containers
|
// Getting the current containers
|
||||||
err, CurrentContainers := ViewTrackedContainers()
|
err, CurrentContainers := ViewTrackedContainers()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
// Iterating through all tracked containers to get the container information
|
// Iterating through all tracked containers to get the container information
|
||||||
// of the ID passed through the function parameter
|
// of the ID passed through the function parameter
|
||||||
for _, container := range CurrentContainers.TrackContainerList {
|
for _, container := range CurrentContainers.TrackContainerList {
|
||||||
if container.Container.ID == ID {
|
if container.Container.ID == ID {
|
||||||
return &container, nil
|
return &container, nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil, errors.New("Container not found. ")
|
return nil, errors.New("Container not found. ")
|
||||||
}
|
}
|
||||||
|
|
||||||
// ModifyContainerInformation Modifies information inside the container
|
// ModifyContainerInformation Modifies information inside the container
|
||||||
func (TC *TrackContainer)ModifyContainerInformation() error {
|
func (TC *TrackContainer) ModifyContainerInformation() error {
|
||||||
// Gets all the information of tracker containers
|
// Gets all the information of tracker containers
|
||||||
err, t := ViewTrackedContainers()
|
err, t := ViewTrackedContainers()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
// Find the element where the containers match and
|
// Find the element where the containers match and
|
||||||
// change them
|
// change them
|
||||||
for i, container := range t.TrackContainerList {
|
for i, container := range t.TrackContainerList {
|
||||||
if TC.Id == container.Id {
|
if TC.Id == container.Id {
|
||||||
t.TrackContainerList[i] = *TC
|
t.TrackContainerList[i] = *TC
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Write the modified information to the file
|
// Write the modified information to the file
|
||||||
// write modified information to the tracked json file
|
// write modified information to the tracked json file
|
||||||
err = t.WriteContainers()
|
err = t.WriteContainers()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// WriteContainers Write information back to the config file
|
// WriteContainers Write information back to the config file
|
||||||
func (TC *TrackContainers)WriteContainers() error {
|
func (TC *TrackContainers) WriteContainers() error {
|
||||||
// Initialize config file
|
// Initialize config file
|
||||||
config,err := config.ConfigInit()
|
config, err := config.ConfigInit(nil, nil)
|
||||||
// write modified information to the tracked json file
|
// write modified information to the tracked json file
|
||||||
data,err := json.MarshalIndent(TC, "", "\t")
|
data, err := json.MarshalIndent(TC, "", "\t")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
err = ioutil.WriteFile(config.TrackContainersPath,data,0777)
|
err = ioutil.WriteFile(config.TrackContainersPath, data, 0777)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// CheckID Checks if the ID belongs to a group or a single container
|
// CheckID Checks if the ID belongs to a group or a single container
|
||||||
func CheckID(ID string) (string,error) {
|
func CheckID(ID string) (string, error) {
|
||||||
// For group checks if the 1st characters is "grp"
|
// For group checks if the 1st characters is "grp"
|
||||||
if ID[0:3] == "grp" {
|
if ID[0:3] == "grp" {
|
||||||
return "group", nil
|
return "group", nil
|
||||||
} else {
|
} else {
|
||||||
return "container", nil
|
return "container", nil
|
||||||
}
|
}
|
||||||
return "",nil
|
return "", nil
|
||||||
}
|
}
|
||||||
@@ -2,20 +2,20 @@ 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"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Tests a scenario where the container are getting tracked
|
// Tests a scenario where the container are getting tracked
|
||||||
func TestAddTrackContainer(t *testing.T) {
|
func TestAddTrackContainer(t *testing.T) {
|
||||||
// Create docker container and get SSH port
|
// Create docker container and get SSH port
|
||||||
container1 ,err := docker.BuildRunContainer(0,"false","")
|
container1, err := docker.BuildRunContainer(0, "false", "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
t.Fail()
|
t.Fail()
|
||||||
}
|
}
|
||||||
// Testing the AddTrackContainer Function
|
// Testing the AddTrackContainer Function
|
||||||
err = AddTrackContainer(container1,"0.0.0.0")
|
err = AddTrackContainer(container1, "0.0.0.0")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// Killing docker container created
|
// Killing docker container created
|
||||||
err = docker.StopAndRemoveContainer(container1.ID)
|
err = docker.StopAndRemoveContainer(container1.ID)
|
||||||
@@ -26,7 +26,7 @@ func TestAddTrackContainer(t *testing.T) {
|
|||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
t.Fail()
|
t.Fail()
|
||||||
}
|
}
|
||||||
// Killing docker container created
|
// Killing docker container created
|
||||||
err = docker.StopAndRemoveContainer(container1.ID)
|
err = docker.StopAndRemoveContainer(container1.ID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
@@ -38,20 +38,20 @@ func TestAddTrackContainer(t *testing.T) {
|
|||||||
// NOTE: This test can also be considered as a whole flow on the process of
|
// NOTE: This test can also be considered as a whole flow on the process of
|
||||||
// tracked containers
|
// tracked containers
|
||||||
func TestRemoveTrackedContainer(t *testing.T) {
|
func TestRemoveTrackedContainer(t *testing.T) {
|
||||||
container1 ,err := docker.BuildRunContainer(0,"false","")
|
container1, err := docker.BuildRunContainer(0, "false", "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
t.Fail()
|
t.Fail()
|
||||||
}
|
}
|
||||||
|
|
||||||
container2 ,err := docker.BuildRunContainer(0,"false","")
|
container2, err := docker.BuildRunContainer(0, "false", "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
t.Fail()
|
t.Fail()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Testing the AddTrackContainer Function and adding the first container created
|
// Testing the AddTrackContainer Function and adding the first container created
|
||||||
err = AddTrackContainer(container1,"0.0.0.0")
|
err = AddTrackContainer(container1, "0.0.0.0")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// Killing docker container created
|
// Killing docker container created
|
||||||
err = docker.StopAndRemoveContainer(container1.ID)
|
err = docker.StopAndRemoveContainer(container1.ID)
|
||||||
@@ -70,7 +70,7 @@ func TestRemoveTrackedContainer(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Testing the AddTrackContainer Function and the adding the second container created
|
// Testing the AddTrackContainer Function and the adding the second container created
|
||||||
err = AddTrackContainer(container2,"0.0.0.0")
|
err = AddTrackContainer(container2, "0.0.0.0")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// Killing docker container created
|
// Killing docker container created
|
||||||
err = docker.StopAndRemoveContainer(container2.ID)
|
err = docker.StopAndRemoveContainer(container2.ID)
|
||||||
@@ -106,7 +106,7 @@ func TestRemoveTrackedContainer(t *testing.T) {
|
|||||||
// Test function that checks if the ID belongs to
|
// Test function that checks if the ID belongs to
|
||||||
// a group or container running
|
// a group or container running
|
||||||
func TestCheckID(t *testing.T) {
|
func TestCheckID(t *testing.T) {
|
||||||
id := "grp123"
|
id := "grp123"
|
||||||
checkID, err := CheckID(id)
|
checkID, err := CheckID(id)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
|
|||||||
40
client/clientIPTable/AddCustomInformationToIPTable.go
Normal file
40
client/clientIPTable/AddCustomInformationToIPTable.go
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
package clientIPTable
|
||||||
|
|
||||||
|
import (
|
||||||
|
"errors"
|
||||||
|
"github.com/Akilan1999/p2p-rendering-computation/config"
|
||||||
|
"github.com/Akilan1999/p2p-rendering-computation/p2p"
|
||||||
|
)
|
||||||
|
|
||||||
|
func AddCustomInformationToIPTable(text string) error {
|
||||||
|
// Get config information
|
||||||
|
Config, err := config.ConfigInit(nil, nil)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get IPTable information
|
||||||
|
table, err := p2p.ReadIpTable()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
found := false
|
||||||
|
|
||||||
|
for i, _ := range table.IpAddress {
|
||||||
|
if table.IpAddress[i].Name == Config.MachineName {
|
||||||
|
table.IpAddress[i].CustomInformation = text
|
||||||
|
found = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if found {
|
||||||
|
table.WriteIpTable()
|
||||||
|
// update IPTable after modified entry
|
||||||
|
go UpdateIpTableListClient()
|
||||||
|
} else {
|
||||||
|
return errors.New("start server with p2prc -s as the server is currently not running")
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
@@ -1,16 +1,16 @@
|
|||||||
package clientIPTable
|
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"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"sync"
|
"sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
var mu sync.Mutex
|
var mu sync.Mutex
|
||||||
@@ -18,136 +18,146 @@ var mu sync.Mutex
|
|||||||
// UpdateIpTable Does the following to update it's IP table
|
// UpdateIpTable Does the following to update it's IP table
|
||||||
func UpdateIpTable(IpAddress string, serverPort string, wg *sync.WaitGroup) error {
|
func UpdateIpTable(IpAddress string, serverPort string, wg *sync.WaitGroup) error {
|
||||||
|
|
||||||
config, err := config.ConfigInit()
|
config, err := config.ConfigInit(nil, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
client := http.Client{}
|
client := http.Client{}
|
||||||
|
|
||||||
var resp []byte
|
var resp []byte
|
||||||
|
|
||||||
version := p2p.Ip4or6(IpAddress)
|
version := p2p.Ip4or6(IpAddress)
|
||||||
if version == "version 6" {
|
if version == "version 6" {
|
||||||
resp, err = UploadMultipartFile(client, "http://["+IpAddress+"]:"+serverPort+"/IpTable", "json", config.IPTable)
|
resp, err = UploadMultipartFile(client, "http://["+IpAddress+"]:"+serverPort+"/IpTable", "json", config.IPTable)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
resp, err = UploadMultipartFile(client, "http://"+IpAddress+":"+serverPort+"/IpTable", "json", config.IPTable)
|
resp, err = UploadMultipartFile(client, "http://"+IpAddress+":"+serverPort+"/IpTable", "json", config.IPTable)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if resp == nil {
|
if resp == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
//resp, err := SendPostRequest("http://"+IpAddress+":8088/IpTable",
|
//resp, err := SendPostRequest("http://"+IpAddress+":8088/IpTable",
|
||||||
// config.IPTable,
|
// config.IPTable,
|
||||||
// "json")
|
// "json")
|
||||||
//
|
//
|
||||||
//if err != nil {
|
//if err != nil {
|
||||||
// return err
|
// return err
|
||||||
//}
|
//}
|
||||||
|
|
||||||
var ipStruct p2p.IpAddresses
|
var ipStruct p2p.IpAddresses
|
||||||
json.Unmarshal(resp, &ipStruct)
|
json.Unmarshal(resp, &ipStruct)
|
||||||
|
|
||||||
// Updates IP table based on information provided
|
// Updates IP table based on information provided
|
||||||
// by the server
|
// by the server
|
||||||
if len(ipStruct.IpAddress) > 0 {
|
if len(ipStruct.IpAddress) > 0 {
|
||||||
err = ipStruct.SpeedTestUpdatedIPTable()
|
err = ipStruct.SpeedTestUpdatedIPTable()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
err = ipStruct.WriteIpTable()
|
// Not required to update IP table as speed test updates the IP Table
|
||||||
if err != nil {
|
//err = ipStruct.WriteIpTable()
|
||||||
return err
|
//if err != nil {
|
||||||
}
|
// return err
|
||||||
|
//}
|
||||||
|
|
||||||
wg.Done()
|
wg.Done()
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// UpdateIpTableListClient updates IP tables (Default 3 hops) based on server information available
|
// UpdateIpTableListClient updates IP tables (Default 3 hops) based on server information available
|
||||||
// on the ip tables
|
// on the ip tables
|
||||||
func UpdateIpTableListClient() error {
|
func UpdateIpTableListClient() error {
|
||||||
// Get config information
|
// Get config information
|
||||||
Config, err := config.ConfigInit()
|
Config, err := config.ConfigInit(nil, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure that the IP Table has Node pingable
|
// Ensure that the IP Table has Node pingable
|
||||||
err = p2p.LocalSpeedTestIpTable()
|
err = p2p.LocalSpeedTestIpTable()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// IP addresses to not append to struct due to
|
// IP addresses to not append to struct due to
|
||||||
// duplication
|
// duplication
|
||||||
|
|
||||||
Addresses, err := p2p.ReadIpTable()
|
Addresses, err := p2p.ReadIpTable()
|
||||||
var DoNotRead p2p.IpAddresses
|
var DoNotRead p2p.IpAddresses
|
||||||
|
|
||||||
currentIPV4, err := p2p.CurrentPublicIP()
|
currentIPV4, err := p2p.CurrentPublicIP()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
var w sync.WaitGroup
|
var w sync.WaitGroup
|
||||||
|
|
||||||
// Run loop 2 times
|
// Run loop 2 times
|
||||||
for i := 0; i < 2; i++ {
|
for i := 0; i < 2; i++ {
|
||||||
// Gets information from IP table
|
// Gets information from IP table
|
||||||
Addresses, err = p2p.ReadIpTable()
|
Addresses, err = p2p.ReadIpTable()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
//DoNotRead.IpAddress = append(DoNotRead.IpAddress, PublicIP)
|
//DoNotRead.IpAddress = append(DoNotRead.IpAddress, PublicIP)
|
||||||
|
|
||||||
// Updates IP table based on server IP table
|
// Updates IP table based on server IP table
|
||||||
for j := range Addresses.IpAddress {
|
for j := range Addresses.IpAddress {
|
||||||
|
|
||||||
Exists := false
|
Exists := false
|
||||||
// If the address is local then add to the local list
|
// If the address is local then add to the local list
|
||||||
if currentIPV4 == Addresses.IpAddress[j].Ipv4 && Addresses.IpAddress[j].ServerPort == Config.ServerPort {
|
if currentIPV4 == Addresses.IpAddress[j].Ipv4 && Addresses.IpAddress[j].ServerPort == Config.ServerPort {
|
||||||
Exists = true
|
Exists = true
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if IP addresses is there in the struct DoNotRead
|
// Check if IP addresses is there in the struct DoNotRead
|
||||||
for k := range DoNotRead.IpAddress {
|
for k := range DoNotRead.IpAddress {
|
||||||
if (DoNotRead.IpAddress[k].Ipv4 == Addresses.IpAddress[j].Ipv4 && DoNotRead.IpAddress[k].ServerPort == Addresses.IpAddress[j].ServerPort) || (DoNotRead.IpAddress[k].Ipv6 != "" && Addresses.IpAddress[j].Ipv6 == DoNotRead.IpAddress[k].Ipv6) {
|
if (DoNotRead.IpAddress[k].Ipv4 == Addresses.IpAddress[j].Ipv4 && DoNotRead.IpAddress[k].ServerPort == Addresses.IpAddress[j].ServerPort) || (DoNotRead.IpAddress[k].Ipv6 != "" && Addresses.IpAddress[j].Ipv6 == DoNotRead.IpAddress[k].Ipv6) {
|
||||||
Exists = true
|
Exists = true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the struct exists then continues
|
// If the struct exists then continues
|
||||||
if Exists {
|
if Exists {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
w.Add(1)
|
w.Add(1)
|
||||||
if Addresses.IpAddress[j].Ipv6 != "" {
|
if Addresses.IpAddress[j].Ipv6 != "" {
|
||||||
go UpdateIpTable(Addresses.IpAddress[j].Ipv6, Addresses.IpAddress[j].ServerPort, &w)
|
go UpdateIpTable(Addresses.IpAddress[j].Ipv6, Addresses.IpAddress[j].ServerPort, &w)
|
||||||
} else if Addresses.IpAddress[j].Ipv4 != currentIPV4 {
|
} else if Addresses.IpAddress[j].Ipv4 != currentIPV4 {
|
||||||
go UpdateIpTable(Addresses.IpAddress[j].Ipv4, Addresses.IpAddress[j].ServerPort, &w)
|
go UpdateIpTable(Addresses.IpAddress[j].Ipv4, Addresses.IpAddress[j].ServerPort, &w)
|
||||||
}
|
}
|
||||||
w.Wait()
|
w.Wait()
|
||||||
|
|
||||||
//Appends server1 IP address to variable DoNotRead
|
//Appends server1 IP address to variable DoNotRead
|
||||||
DoNotRead.IpAddress = append(DoNotRead.IpAddress, Addresses.IpAddress[j])
|
DoNotRead.IpAddress = append(DoNotRead.IpAddress, Addresses.IpAddress[j])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func RemoveOfflineNodes() error {
|
||||||
|
// Ensure that the IP Table has Node pingable
|
||||||
|
err := p2p.LocalSpeedTestIpTable()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// SendPostRequest Sends a file as a
|
// SendPostRequest Sends a file as a
|
||||||
@@ -197,58 +207,58 @@ func UpdateIpTableListClient() error {
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
func UploadMultipartFile(client http.Client, uri, key, path string) ([]byte, error) {
|
func UploadMultipartFile(client http.Client, uri, key, path string) ([]byte, error) {
|
||||||
body, writer := io.Pipe()
|
body, writer := io.Pipe()
|
||||||
|
|
||||||
req, err := http.NewRequest(http.MethodPost, uri, body)
|
req, err := http.NewRequest(http.MethodPost, uri, body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
mwriter := multipart.NewWriter(writer)
|
mwriter := multipart.NewWriter(writer)
|
||||||
req.Header.Add("Content-Type", mwriter.FormDataContentType())
|
req.Header.Add("Content-Type", mwriter.FormDataContentType())
|
||||||
|
|
||||||
errchan := make(chan error)
|
errchan := make(chan error)
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
defer close(errchan)
|
defer close(errchan)
|
||||||
defer writer.Close()
|
defer writer.Close()
|
||||||
defer mwriter.Close()
|
defer mwriter.Close()
|
||||||
|
|
||||||
w, err := mwriter.CreateFormFile(key, path)
|
w, err := mwriter.CreateFormFile(key, path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errchan <- err
|
errchan <- err
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
in, err := os.Open(path)
|
in, err := os.Open(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errchan <- err
|
errchan <- err
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
defer in.Close()
|
defer in.Close()
|
||||||
|
|
||||||
if written, err := io.Copy(w, in); err != nil {
|
if written, err := io.Copy(w, in); err != nil {
|
||||||
errchan <- fmt.Errorf("error copying %s (%d bytes written): %v", path, written, err)
|
errchan <- fmt.Errorf("error copying %s (%d bytes written): %v", path, written, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := mwriter.Close(); err != nil {
|
if err := mwriter.Close(); err != nil {
|
||||||
errchan <- err
|
errchan <- err
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
resp, err := client.Do(req)
|
resp, err := client.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
content, err := ioutil.ReadAll(resp.Body)
|
content, err := ioutil.ReadAll(resp.Body)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
return content, nil
|
return content, nil
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
package client
|
package client
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
b64 "encoding/base64"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.sr.ht/~akilan1999/p2p-rendering-computation/p2p"
|
"github.com/Akilan1999/p2p-rendering-computation/config"
|
||||||
"git.sr.ht/~akilan1999/p2p-rendering-computation/server/docker"
|
"github.com/Akilan1999/p2p-rendering-computation/p2p"
|
||||||
|
"github.com/Akilan1999/p2p-rendering-computation/server/docker"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
@@ -19,7 +21,7 @@ var (
|
|||||||
// From the selected server IP address
|
// From the selected server IP address
|
||||||
// TODO: Test cases for this function
|
// TODO: Test cases for this function
|
||||||
// Calls URL ex: http://0.0.0.0:8088/startcontainer?ports=0&GPU=false&ContainerName=docker-ubuntu-sshd
|
// Calls URL ex: http://0.0.0.0:8088/startcontainer?ports=0&GPU=false&ContainerName=docker-ubuntu-sshd
|
||||||
func StartContainer(IP string, NumPorts int, GPU bool, ContainerName string) (*docker.DockerVM, error) {
|
func StartContainer(IP string, NumPorts int, GPU bool, ContainerName string, baseImage string) (*docker.DockerVM, error) {
|
||||||
// Passes URL with number of TCP ports to allocated and to give GPU access to the docker container
|
// Passes URL with number of TCP ports to allocated and to give GPU access to the docker container
|
||||||
var URL string
|
var URL string
|
||||||
//version := p2p.Ip4or6(IP)
|
//version := p2p.Ip4or6(IP)
|
||||||
@@ -33,9 +35,22 @@ func StartContainer(IP string, NumPorts int, GPU bool, ContainerName string) (*d
|
|||||||
//if version == "version 6" {
|
//if version == "version 6" {
|
||||||
// URL = "http://[" + IP + "]:" + serverPort + "/startcontainer?ports=" + fmt.Sprint(NumPorts) + "&GPU=" + strconv.FormatBool(GPU) + "&ContainerName=" + ContainerName
|
// URL = "http://[" + IP + "]:" + serverPort + "/startcontainer?ports=" + fmt.Sprint(NumPorts) + "&GPU=" + strconv.FormatBool(GPU) + "&ContainerName=" + ContainerName
|
||||||
//} else {
|
//} else {
|
||||||
URL = "http://" + IP + "/startcontainer?ports=" + fmt.Sprint(NumPorts) + "&GPU=" + strconv.FormatBool(GPU) + "&ContainerName=" + ContainerName
|
// Get config information
|
||||||
//}
|
Config, err := config.ConfigInit(nil, nil)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get public key
|
||||||
|
PublicKey, err := Config.GetPublicKey()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Used in URL to pass public key -> b64.StdEncoding.EncodeToString([]byte(PublicKey))
|
||||||
|
URL = `http://` + IP + `/startcontainer?ports=` + fmt.Sprint(NumPorts) + `&GPU=` + strconv.FormatBool(GPU) + `&ContainerName=` + ContainerName + `&BaseImage=` + baseImage + `&PublicKey=` + b64.StdEncoding.EncodeToString([]byte(PublicKey))
|
||||||
|
|
||||||
|
// Encode URL due to public key passed.
|
||||||
resp, err := http.Get(URL)
|
resp, err := http.Get(URL)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
@@ -2,23 +2,25 @@ 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/generate"
|
||||||
"git.sr.ht/~akilan1999/p2p-rendering-computation/generate"
|
"github.com/Akilan1999/p2p-rendering-computation/p2p"
|
||||||
"git.sr.ht/~akilan1999/p2p-rendering-computation/p2p"
|
"github.com/Akilan1999/p2p-rendering-computation/plugin"
|
||||||
"git.sr.ht/~akilan1999/p2p-rendering-computation/plugin"
|
"github.com/Akilan1999/p2p-rendering-computation/server"
|
||||||
"git.sr.ht/~akilan1999/p2p-rendering-computation/server"
|
|
||||||
"github.com/urfave/cli/v2"
|
"github.com/urfave/cli/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
var CliAction = func(ctx *cli.Context) error {
|
var CliAction = func(ctx *cli.Context) error {
|
||||||
if Server {
|
if Server {
|
||||||
err := server.Server()
|
_, err := server.Server()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Print(err)
|
fmt.Print(err)
|
||||||
}
|
}
|
||||||
//server.Rpc()
|
//server.Rpc()
|
||||||
|
for {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Listing servers and also updates IP tables (Default 3 hops)
|
//Listing servers and also updates IP tables (Default 3 hops)
|
||||||
@@ -93,10 +95,14 @@ var CliAction = func(ctx *cli.Context) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Function called to stop and remove server from Docker
|
// Function called to stop and remove server from Docker
|
||||||
if RemoveVM != "" && ID != "" {
|
if RemoveVM != "" {
|
||||||
err := client.RemoveContianer(RemoveVM, ID)
|
if ID == "" {
|
||||||
if err != nil {
|
fmt.Println("provide container ID via --ID or --id")
|
||||||
fmt.Print(err)
|
} else {
|
||||||
|
err := client.RemoveContianer(RemoveVM, ID)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Print(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,7 +117,7 @@ var CliAction = func(ctx *cli.Context) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Calls function to do Api call to start the container on the server side
|
// Calls function to do Api call to start the container on the server side
|
||||||
imageRes, err := client.StartContainer(CreateVM, PortsInt, GPU, ContainerName)
|
imageRes, err := client.StartContainer(CreateVM, PortsInt, GPU, ContainerName, BaseImage)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Print(err)
|
fmt.Print(err)
|
||||||
@@ -132,7 +138,7 @@ var CliAction = func(ctx *cli.Context) error {
|
|||||||
|
|
||||||
//Sets default paths to the config file
|
//Sets default paths to the config file
|
||||||
if SetDefaultConfig {
|
if SetDefaultConfig {
|
||||||
err := config.SetDefaults()
|
_, err := generate.SetDefaults("P2PRC", false, nil, false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Print(err)
|
fmt.Print(err)
|
||||||
}
|
}
|
||||||
@@ -179,7 +185,7 @@ var CliAction = func(ctx *cli.Context) error {
|
|||||||
fmt.Println("Success")
|
fmt.Println("Success")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
fmt.Println("provide container ID")
|
fmt.Println("provide container ID via --ID or --id")
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -247,39 +253,6 @@ var CliAction = func(ctx *cli.Context) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Starts server as a reverse proxy so that
|
|
||||||
// nodes can connect to each other behind NAT
|
|
||||||
//if FRPProxy {
|
|
||||||
// err := frp.StartFRPProxyFromRandom()
|
|
||||||
// if err != nil {
|
|
||||||
// fmt.Println(err)
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
// -- REMOVE ON REGULAR RELEASE --
|
|
||||||
// when flag --gen is called an extension
|
|
||||||
// of the project is created to repurpose
|
|
||||||
// the project for custom purpose
|
|
||||||
if Generate != "" {
|
|
||||||
var err error
|
|
||||||
// If the module name is provided
|
|
||||||
if Modulename != "" {
|
|
||||||
err = generate.GenerateNewProject(Generate, Modulename)
|
|
||||||
} else {
|
|
||||||
err = generate.GenerateNewProject(Generate, Generate)
|
|
||||||
}
|
|
||||||
if err != nil {
|
|
||||||
fmt.Println(err)
|
|
||||||
} else {
|
|
||||||
fmt.Println("Created new folder: " + Generate)
|
|
||||||
fmt.Println("1. Enter inside " + Generate + " directory")
|
|
||||||
fmt.Println("2. git remote add " + Generate + " <PATH to the github repo>")
|
|
||||||
fmt.Println("3. git push " + Generate + " <PATH to the github repo>")
|
|
||||||
fmt.Println("4. go mod tidy")
|
|
||||||
fmt.Println("5. sh install.sh " + Generate)
|
|
||||||
fmt.Println("6. ./" + Generate + " -h (This is to test if the binary is working)")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//--------------------------------
|
//--------------------------------
|
||||||
|
|
||||||
if PullPlugin != "" {
|
if PullPlugin != "" {
|
||||||
@@ -300,5 +273,26 @@ var CliAction = func(ctx *cli.Context) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if AddMetaData != "" {
|
||||||
|
err := clientIPTable.AddCustomInformationToIPTable(AddMetaData)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println(err)
|
||||||
|
} else {
|
||||||
|
fmt.Println("Success")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if MAPPort != "" {
|
||||||
|
address, err := client.MAPPort(MAPPort, DomainName)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println(err)
|
||||||
|
} else {
|
||||||
|
client.PrettyPrint(address)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
36
cmd/flags.go
36
cmd/flags.go
@@ -10,6 +10,7 @@ var (
|
|||||||
ViewImages string
|
ViewImages string
|
||||||
CreateVM string
|
CreateVM string
|
||||||
ContainerName string
|
ContainerName string
|
||||||
|
BaseImage string
|
||||||
Ports string
|
Ports string
|
||||||
Server bool
|
Server bool
|
||||||
RemoveVM string
|
RemoveVM string
|
||||||
@@ -28,6 +29,8 @@ var (
|
|||||||
Groups bool
|
Groups bool
|
||||||
RemoveContainerGroup bool
|
RemoveContainerGroup bool
|
||||||
RemoveGroup string
|
RemoveGroup string
|
||||||
|
MAPPort string
|
||||||
|
DomainName string
|
||||||
//FRPProxy bool
|
//FRPProxy bool
|
||||||
// Generate only allowed in dev release
|
// Generate only allowed in dev release
|
||||||
// -- REMOVE ON REGULAR RELEASE --
|
// -- REMOVE ON REGULAR RELEASE --
|
||||||
@@ -36,6 +39,7 @@ var (
|
|||||||
//--------------------------------
|
//--------------------------------
|
||||||
PullPlugin string
|
PullPlugin string
|
||||||
RemovePlugin string
|
RemovePlugin string
|
||||||
|
AddMetaData string
|
||||||
)
|
)
|
||||||
|
|
||||||
var AppConfigFlags = []cli.Flag{
|
var AppConfigFlags = []cli.Flag{
|
||||||
@@ -89,10 +93,17 @@ var AppConfigFlags = []cli.Flag{
|
|||||||
EnvVars: []string{"CONTAINER_NAME"},
|
EnvVars: []string{"CONTAINER_NAME"},
|
||||||
Destination: &ContainerName,
|
Destination: &ContainerName,
|
||||||
},
|
},
|
||||||
|
&cli.StringFlag{
|
||||||
|
Name: "BaseImage",
|
||||||
|
Aliases: []string{"bi"},
|
||||||
|
Usage: "Specifying the docker base image to template the dockerfile",
|
||||||
|
EnvVars: []string{"CONTAINER_NAME"},
|
||||||
|
Destination: &BaseImage,
|
||||||
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "RemoveVM",
|
Name: "RemoveVM",
|
||||||
Aliases: []string{"rm"},
|
Aliases: []string{"rm"},
|
||||||
Usage: "Stop and Remove Docker container",
|
Usage: "Stop and Remove Docker container (IP:port) accompanied by container ID via --ID or --id",
|
||||||
EnvVars: []string{"REMOVE_VM"},
|
EnvVars: []string{"REMOVE_VM"},
|
||||||
Destination: &RemoveVM,
|
Destination: &RemoveVM,
|
||||||
},
|
},
|
||||||
@@ -148,7 +159,7 @@ var AppConfigFlags = []cli.Flag{
|
|||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "TrackedContainers",
|
Name: "TrackedContainers",
|
||||||
Aliases: []string{"tc"},
|
Aliases: []string{"tc"},
|
||||||
Usage: "View containers which have " +
|
Usage: "View (currently running) containers which have " +
|
||||||
"been created from the client side ",
|
"been created from the client side ",
|
||||||
EnvVars: []string{"TRACKED_CONTAINERS"},
|
EnvVars: []string{"TRACKED_CONTAINERS"},
|
||||||
Destination: &TrackedContainers,
|
Destination: &TrackedContainers,
|
||||||
@@ -195,6 +206,20 @@ var AppConfigFlags = []cli.Flag{
|
|||||||
EnvVars: []string{"REMOVE_GROUP"},
|
EnvVars: []string{"REMOVE_GROUP"},
|
||||||
Destination: &RemoveGroup,
|
Destination: &RemoveGroup,
|
||||||
},
|
},
|
||||||
|
&cli.StringFlag{
|
||||||
|
Name: "MAPPort",
|
||||||
|
Aliases: []string{"mp"},
|
||||||
|
Usage: "Maps port for a specific port provided as the parameter",
|
||||||
|
EnvVars: []string{"MAPPORT"},
|
||||||
|
Destination: &MAPPort,
|
||||||
|
},
|
||||||
|
&cli.StringFlag{
|
||||||
|
Name: "DomainName",
|
||||||
|
Aliases: []string{"dn"},
|
||||||
|
Usage: "While mapping ports allows to set a domain name to create a mapping in the proxy server",
|
||||||
|
EnvVars: []string{"DOMAINNAME"},
|
||||||
|
Destination: &DomainName,
|
||||||
|
},
|
||||||
// Generate only allowed in dev release
|
// Generate only allowed in dev release
|
||||||
// -- REMOVE ON REGULAR RELEASE --
|
// -- REMOVE ON REGULAR RELEASE --
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
@@ -233,4 +258,11 @@ var AppConfigFlags = []cli.Flag{
|
|||||||
EnvVars: []string{"REMOVEPLUGIN"},
|
EnvVars: []string{"REMOVEPLUGIN"},
|
||||||
Destination: &RemovePlugin,
|
Destination: &RemovePlugin,
|
||||||
},
|
},
|
||||||
|
&cli.StringFlag{
|
||||||
|
Name: "AddMetaData",
|
||||||
|
Aliases: []string{"amd"},
|
||||||
|
Usage: "Adds metadata about the current node in the p2p network which is then propagated through the network",
|
||||||
|
EnvVars: []string{"ADDMETADATA"},
|
||||||
|
Destination: &AddMetaData,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
247
config/config.go
247
config/config.go
@@ -1,13 +1,13 @@
|
|||||||
package config
|
package config
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/spf13/viper"
|
"encoding/json"
|
||||||
"io"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
defaultPath string
|
//defaultPath string
|
||||||
defaults = map[string]interface{}{}
|
defaults = map[string]interface{}{}
|
||||||
configName = "config"
|
configName = "config"
|
||||||
configType = "json"
|
configType = "json"
|
||||||
@@ -21,54 +21,49 @@ type Config struct {
|
|||||||
IPTable string
|
IPTable string
|
||||||
DockerContainers string
|
DockerContainers string
|
||||||
DefaultDockerFile string
|
DefaultDockerFile string
|
||||||
|
DockerRunLogs string
|
||||||
SpeedTestFile string
|
SpeedTestFile string
|
||||||
IPV6Address string
|
IPV6Address string
|
||||||
PluginPath string
|
PluginPath string
|
||||||
TrackContainersPath string
|
TrackContainersPath string
|
||||||
ServerPort string
|
ServerPort string
|
||||||
|
ProxyPort string
|
||||||
GroupTrackContainersPath string
|
GroupTrackContainersPath string
|
||||||
FRPServerPort string
|
FRPServerPort string
|
||||||
BehindNAT string
|
BehindNAT string
|
||||||
|
IPTableKey string
|
||||||
|
PublicKeyFile string
|
||||||
|
PrivateKeyFile string
|
||||||
|
PemFile string
|
||||||
|
KeyFile string
|
||||||
|
BareMetal bool
|
||||||
|
UnsafeMode bool
|
||||||
|
CustomConfig interface{}
|
||||||
//NetworkInterface string
|
//NetworkInterface string
|
||||||
//NetworkInterfaceIPV6Index int
|
//NetworkInterfaceIPV6Index int
|
||||||
}
|
}
|
||||||
|
|
||||||
// Exists reports whether the named file or directory exists.
|
// GetCurrentPath Getting P2PRC Directory from environment variable
|
||||||
func fileExists(name string) bool {
|
func GetCurrentPath() (string, error) {
|
||||||
if _, err := os.Stat(name); err != nil {
|
curDir := os.Getenv("PWD")
|
||||||
if os.IsNotExist(err) {
|
return curDir + "/", nil
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// Copy the src file to dst. Any existing file will be overwritten and will not
|
|
||||||
// copy file attributes.
|
|
||||||
// Source: https://stackoverflow.com/questions/21060945/simple-way-to-copy-a-file
|
|
||||||
func Copy(src, dst string) error {
|
|
||||||
in, err := os.Open(src)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
defer in.Close()
|
|
||||||
|
|
||||||
out, err := os.Create(dst)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
defer out.Close()
|
|
||||||
|
|
||||||
_, err = io.Copy(out, in)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return out.Close()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetPathP2PRC Getting P2PRC Directory from environment variable
|
// GetPathP2PRC Getting P2PRC Directory from environment variable
|
||||||
func GetPathP2PRC() (string, error) {
|
func GetPathP2PRC(Envname string) (string, error) {
|
||||||
|
if Envname != "" {
|
||||||
|
err := SetEnvName(Envname)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
}
|
||||||
curDir := os.Getenv(defaultEnvName)
|
curDir := os.Getenv(defaultEnvName)
|
||||||
|
if curDir == "" {
|
||||||
|
// if the OS env path is not found then you use
|
||||||
|
// the current directory path.
|
||||||
|
currentPath, _ := GetCurrentPath()
|
||||||
|
return currentPath, nil
|
||||||
|
}
|
||||||
return curDir + "/", nil
|
return curDir + "/", nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,115 +77,109 @@ func SetEnvName(EnvName string) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetCurrentPath Getting P2PRC Directory from environment variable
|
func GetEnvName() string {
|
||||||
func GetCurrentPath() (string, error) {
|
return defaultEnvName
|
||||||
curDir := os.Getenv("PWD")
|
|
||||||
return curDir + "/", nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetDefaults This function to be called only during a
|
// ConfigInit Pass environment name as an optional parameter
|
||||||
// make install
|
func ConfigInit(defaultsParameter map[string]interface{}, CustomConfig interface{}, envNameOptional ...string) (*Config, error) {
|
||||||
func SetDefaults() error {
|
if len(envNameOptional) > 0 {
|
||||||
//Setting current directory to default path
|
defaultEnvName = envNameOptional[0]
|
||||||
defaultPath, err := GetPathP2PRC()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
|
//
|
||||||
|
////Setting current directory to default path
|
||||||
|
//defaultPath, err := GetPathP2PRC(defaultEnvName)
|
||||||
|
//if err != nil {
|
||||||
|
// return nil, err
|
||||||
|
//}
|
||||||
|
////Paths to search for config file
|
||||||
|
//configPaths = append(configPaths, defaultPath)
|
||||||
|
//
|
||||||
|
////Add all possible configurations paths
|
||||||
|
//for _, v := range configPaths {
|
||||||
|
// viper.AddConfigPath(v)
|
||||||
|
//}
|
||||||
|
//
|
||||||
|
////Read config file
|
||||||
|
//if err := viper.ReadInConfig(); err != nil {
|
||||||
|
// // If the error thrown is config file not found
|
||||||
|
// //Sets default configuration to viper
|
||||||
|
// for k, v := range defaults {
|
||||||
|
// viper.SetDefault(k, v)
|
||||||
|
// }
|
||||||
|
// viper.SetConfigName(configName)
|
||||||
|
// viper.SetConfigFile(configFile)
|
||||||
|
// viper.SetConfigType(configType)
|
||||||
|
//
|
||||||
|
// if err = viper.WriteConfig(); err != nil {
|
||||||
|
// return nil, err
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
//
|
||||||
|
//// Adds configuration to the struct
|
||||||
|
//var config Config
|
||||||
|
//if err := viper.Unmarshal(&config); err != nil {
|
||||||
|
// return nil, err
|
||||||
|
//}
|
||||||
|
//
|
||||||
|
//return &config, nil
|
||||||
|
|
||||||
//Creates ip_table.json in the json directory
|
defaultPath, err := GetPathP2PRC(defaultEnvName)
|
||||||
err = Copy("p2p/ip_table.json", "p2p/iptable/ip_table.json")
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
//Creates a copy of trackcontainers.json in the appropriate directory
|
|
||||||
err = Copy("client/trackcontainers.json", "client/trackcontainers/trackcontainers.json")
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
//Creates a copy of trackcontainers.json in the appropriate directory
|
|
||||||
err = Copy("client/grouptrackcontainers.json", "client/trackcontainers/grouptrackcontainers.json")
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
//Setting default paths for the config file
|
|
||||||
defaults["IPTable"] = defaultPath + "p2p/iptable/ip_table.json"
|
|
||||||
defaults["DefaultDockerFile"] = defaultPath + "server/docker/containers/docker-ubuntu-sshd/"
|
|
||||||
defaults["DockerContainers"] = defaultPath + "server/docker/containers/"
|
|
||||||
defaults["SpeedTestFile"] = defaultPath + "p2p/50.bin"
|
|
||||||
defaults["IPV6Address"] = ""
|
|
||||||
defaults["PluginPath"] = defaultPath + "plugin/deploy"
|
|
||||||
defaults["TrackContainersPath"] = defaultPath + "client/trackcontainers/trackcontainers.json"
|
|
||||||
defaults["GroupTrackContainersPath"] = defaultPath + "client/trackcontainers/grouptrackcontainers.json"
|
|
||||||
defaults["ServerPort"] = "8088"
|
|
||||||
defaults["FRPServerPort"] = "0"
|
|
||||||
defaults["BehindNAT"] = "True"
|
|
||||||
// Random name generator
|
|
||||||
hostname, err := os.Hostname()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
defaults["MachineName"] = hostname
|
|
||||||
//defaults["NetworkInterface"] = "wlp0s20f3"
|
|
||||||
//defaults["NetworkInterfaceIPV6Index"] = "2"
|
|
||||||
|
|
||||||
//Paths to search for config file
|
|
||||||
configPaths = append(configPaths, defaultPath)
|
|
||||||
|
|
||||||
if fileExists(defaultPath + "config.json") {
|
|
||||||
err := os.Remove(defaultPath + "config.json")
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Calling configuration file
|
|
||||||
_, err = ConfigInit()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func ConfigInit() (*Config, error) {
|
|
||||||
|
|
||||||
//Setting current directory to default path
|
|
||||||
defaultPath, err := GetPathP2PRC()
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
//Paths to search for config file
|
|
||||||
configPaths = append(configPaths, defaultPath)
|
|
||||||
|
|
||||||
//Add all possible configurations paths
|
// Open our jsonFile
|
||||||
for _, v := range configPaths {
|
jsonFile, err := os.Open(defaultPath + configFile)
|
||||||
viper.AddConfigPath(v)
|
// if we os.Open returns an error then handle it
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
//Read config file
|
// defer the closing of our jsonFile so that we can parse it later on
|
||||||
if err := viper.ReadInConfig(); err != nil {
|
defer jsonFile.Close()
|
||||||
// If the error thrown is config file not found
|
|
||||||
//Sets default configuration to viper
|
|
||||||
for k, v := range defaults {
|
|
||||||
viper.SetDefault(k, v)
|
|
||||||
}
|
|
||||||
viper.SetConfigName(configName)
|
|
||||||
viper.SetConfigFile(configFile)
|
|
||||||
viper.SetConfigType(configType)
|
|
||||||
|
|
||||||
if err = viper.WriteConfig(); err != nil {
|
byteValue, _ := ioutil.ReadAll(jsonFile)
|
||||||
|
|
||||||
|
var config Config
|
||||||
|
json.Unmarshal(byteValue, &config)
|
||||||
|
|
||||||
|
if CustomConfig != nil {
|
||||||
|
// Convert Custom Config to byte
|
||||||
|
customConfigByte, err := json.Marshal(config.CustomConfig)
|
||||||
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Adds configuration to the struct
|
// Again map the byte to the CustomConfig interface
|
||||||
var config Config
|
json.Unmarshal(customConfigByte, &CustomConfig)
|
||||||
if err := viper.Unmarshal(&config); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return &config, nil
|
return &config, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *Config) WriteConfig() error {
|
||||||
|
//Getting Current Directory from environment variable
|
||||||
|
//curDir := os.Getenv("REMOTEGAMING")
|
||||||
|
|
||||||
|
defaultPath, err := GetPathP2PRC(defaultEnvName)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
file, _ := json.MarshalIndent(c, "", " ")
|
||||||
|
|
||||||
|
_ = ioutil.WriteFile(defaultPath+"config.json", file, 0644)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetPublicKey Gets public key of the current machine
|
||||||
|
// based on the path provided on the
|
||||||
|
// config file
|
||||||
|
func (c *Config) GetPublicKey() (string, error) {
|
||||||
|
publicKey, err := ioutil.ReadFile(c.PublicKeyFile) // just pass the file name
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
return string(publicKey), nil
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,63 +0,0 @@
|
|||||||
package config
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"os"
|
|
||||||
"testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestConfigInit(t *testing.T) {
|
|
||||||
_,err := ConfigInit()
|
|
||||||
if err != nil {
|
|
||||||
t.Error(err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestSetDefaults(t *testing.T) {
|
|
||||||
err := SetDefaults()
|
|
||||||
if err != nil {
|
|
||||||
t.Error(err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestGetCurrentPath(t *testing.T) {
|
|
||||||
path, err := GetCurrentPath()
|
|
||||||
if err != nil {
|
|
||||||
fmt.Println(err)
|
|
||||||
t.Error(err)
|
|
||||||
}
|
|
||||||
fmt.Println(path)
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestGetPathP2PRC(t *testing.T) {
|
|
||||||
path, err := GetPathP2PRC()
|
|
||||||
if err != nil {
|
|
||||||
fmt.Println(err)
|
|
||||||
t.Error(err)
|
|
||||||
}
|
|
||||||
fmt.Println(path)
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestSetEnvName(t *testing.T) {
|
|
||||||
// Create an Env variable TEST with the value "lol"
|
|
||||||
err := os.Setenv("TEST", "lol")
|
|
||||||
if err != nil {
|
|
||||||
fmt.Println(err)
|
|
||||||
t.Error(err)
|
|
||||||
}
|
|
||||||
// Sets the environment variable as the default to read
|
|
||||||
// for P2PRC
|
|
||||||
err = SetEnvName("TEST")
|
|
||||||
if err != nil {
|
|
||||||
fmt.Println(err)
|
|
||||||
t.Error(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Checks if the output for the default read is "lol"
|
|
||||||
path, err := GetPathP2PRC()
|
|
||||||
if err != nil {
|
|
||||||
fmt.Println(err)
|
|
||||||
t.Error(err)
|
|
||||||
}
|
|
||||||
fmt.Println(path)
|
|
||||||
}
|
|
||||||
64
config/generate/config_test.go
Normal file
64
config/generate/config_test.go
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
package generate
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"github.com/Akilan1999/p2p-rendering-computation/config"
|
||||||
|
"os"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
// func TestConfigInit(t *testing.T) {
|
||||||
|
// _, err := config.ConfigInit(nil)
|
||||||
|
// if err != nil {
|
||||||
|
// t.Error(err)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// func TestSetDefaults(t *testing.T) {
|
||||||
|
// _, err := SetDefaults("", false)
|
||||||
|
// if err != nil {
|
||||||
|
// t.Error(err)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
func TestGetCurrentPath(t *testing.T) {
|
||||||
|
path, err := GetCurrentPath()
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println(err)
|
||||||
|
t.Error(err)
|
||||||
|
}
|
||||||
|
fmt.Println(path)
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestGetPathP2PRC(t *testing.T) {
|
||||||
|
path, err := config.GetPathP2PRC("")
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println(err)
|
||||||
|
t.Error(err)
|
||||||
|
}
|
||||||
|
fmt.Println(path)
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestSetEnvName(t *testing.T) {
|
||||||
|
// Create an Env variable TEST with the value "lol"
|
||||||
|
err := os.Setenv("TEST", "lol")
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println(err)
|
||||||
|
t.Error(err)
|
||||||
|
}
|
||||||
|
// Sets the environment variable as the default to read
|
||||||
|
// for P2PRC
|
||||||
|
err = config.SetEnvName("TEST")
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println(err)
|
||||||
|
t.Error(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Checks if the output for the default read is "lol"
|
||||||
|
path, err := config.GetPathP2PRC("")
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println(err)
|
||||||
|
t.Error(err)
|
||||||
|
}
|
||||||
|
fmt.Println(path)
|
||||||
|
}
|
||||||
178
config/generate/generate.go
Normal file
178
config/generate/generate.go
Normal file
@@ -0,0 +1,178 @@
|
|||||||
|
package generate
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/Akilan1999/p2p-rendering-computation/config"
|
||||||
|
"math/rand"
|
||||||
|
"os"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
defaults = map[string]interface{}{}
|
||||||
|
configPaths []string
|
||||||
|
defaultEnvName = "P2PRC"
|
||||||
|
)
|
||||||
|
|
||||||
|
// GetPathP2PRC Getting P2PRC Directory from environment variable
|
||||||
|
func GetPathP2PRC() (string, error) {
|
||||||
|
curDir := os.Getenv(defaultEnvName)
|
||||||
|
return curDir + "/", nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetEnvName Sets the environment name
|
||||||
|
// This is to ensure that the Path of your project is detected from
|
||||||
|
// your environment variable
|
||||||
|
// This is useful when extending the use case of P2PRC
|
||||||
|
func SetEnvName(EnvName string) error {
|
||||||
|
if EnvName != "" {
|
||||||
|
defaultEnvName = EnvName
|
||||||
|
}
|
||||||
|
// Handling error to be implemented only if needed
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetDefaults This function to be called only during a
|
||||||
|
// make install
|
||||||
|
func SetDefaults(envName string, forceDefault bool, CustomConfig interface{}, NoBoilerPlate bool, ConfigUpdate ...*config.Config) (*config.Config, error) {
|
||||||
|
//Setting current directory to default path
|
||||||
|
defaultPath, err := config.GetCurrentPath()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set Env name
|
||||||
|
err = config.SetEnvName(envName)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
////Creates ip_table.json in the json directory
|
||||||
|
//err = Copy("p2p/ip_table.json", "p2p/iptable/ip_table.json")
|
||||||
|
//if err != nil {
|
||||||
|
// return err
|
||||||
|
//}
|
||||||
|
//
|
||||||
|
////Creates a copy of trackcontainers.json in the appropriate directory
|
||||||
|
//err = Copy("client/trackcontainers.json", "client/trackcontainers/trackcontainers.json")
|
||||||
|
//if err != nil {
|
||||||
|
// return err
|
||||||
|
//}
|
||||||
|
//
|
||||||
|
////Creates a copy of trackcontainers.json in the appropriate directory
|
||||||
|
//err = Copy("client/grouptrackcontainers.json", "client/trackcontainers/grouptrackcontainers.json")
|
||||||
|
//if err != nil {
|
||||||
|
// return err
|
||||||
|
//}
|
||||||
|
|
||||||
|
var Defaults config.Config
|
||||||
|
|
||||||
|
if len(ConfigUpdate) == 0 {
|
||||||
|
//Setting default paths for the config file
|
||||||
|
Defaults.IPTable = defaultPath + "p2p/iptable/ip_table.json"
|
||||||
|
Defaults.DefaultDockerFile = defaultPath + "server/docker/containers/docker-ubuntu-sshd/"
|
||||||
|
Defaults.DockerContainers = defaultPath + "server/docker/containers/"
|
||||||
|
Defaults.SpeedTestFile = defaultPath + "p2p/50.bin"
|
||||||
|
Defaults.IPV6Address = ""
|
||||||
|
Defaults.PluginPath = defaultPath + "plugin/deploy"
|
||||||
|
Defaults.TrackContainersPath = defaultPath + "client/trackcontainers/trackcontainers.json"
|
||||||
|
Defaults.GroupTrackContainersPath = defaultPath + "client/trackcontainers/grouptrackcontainers.json"
|
||||||
|
Defaults.ServerPort = "8088"
|
||||||
|
Defaults.ProxyPort = ""
|
||||||
|
Defaults.FRPServerPort = "True"
|
||||||
|
Defaults.CustomConfig = CustomConfig
|
||||||
|
Defaults.BehindNAT = "True"
|
||||||
|
Defaults.DockerRunLogs = "/tmp/"
|
||||||
|
// Generate a random key to be added to IPTable
|
||||||
|
Defaults.IPTableKey = String(12)
|
||||||
|
// Random name generator
|
||||||
|
hostname, err := os.Hostname()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Generate Public and private keys and set path
|
||||||
|
Defaults.PublicKeyFile = defaultPath + "p2prc.publicKey"
|
||||||
|
Defaults.PrivateKeyFile = defaultPath + "p2prc.privateKey"
|
||||||
|
Defaults.BareMetal = false
|
||||||
|
Defaults.UnsafeMode = false
|
||||||
|
|
||||||
|
// Generate certificate files for SSL
|
||||||
|
err = GenerateCertificate()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
Defaults.PemFile = defaultPath + "cert.pem"
|
||||||
|
Defaults.KeyFile = defaultPath + "key.pem"
|
||||||
|
|
||||||
|
PrivateKeyExists, err := FileExists(Defaults.PrivateKeyFile)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if !PrivateKeyExists {
|
||||||
|
// Generate SSH keys
|
||||||
|
err = MakeSSHKeyPair(Defaults.PublicKeyFile, Defaults.PrivateKeyFile)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Defaults.MachineName = hostname + "-" + String(7)
|
||||||
|
} else {
|
||||||
|
Defaults = *ConfigUpdate[0]
|
||||||
|
}
|
||||||
|
|
||||||
|
//defaults["NetworkInterface"] = "wlp0s20f3"
|
||||||
|
//defaults["NetworkInterfaceIPV6Index"] = "2"
|
||||||
|
|
||||||
|
//Paths to search for config file
|
||||||
|
configPaths = append(configPaths, defaultPath)
|
||||||
|
|
||||||
|
if fileExists(defaultPath+"config.json") && forceDefault {
|
||||||
|
err := os.Remove(defaultPath + "config.json")
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// write defaults to the config file
|
||||||
|
err = Defaults.WriteConfig()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
//Calling configuration file
|
||||||
|
Config, err := config.ConfigInit(defaults, nil, envName)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if !NoBoilerPlate {
|
||||||
|
err = GenerateFiles()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return Config, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Generating a random string
|
||||||
|
const charset = "abcdefghijklmnopqrstuvwxyz" +
|
||||||
|
"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
|
||||||
|
|
||||||
|
var seededRand *rand.Rand = rand.New(
|
||||||
|
rand.NewSource(time.Now().UnixNano()))
|
||||||
|
|
||||||
|
func StringWithCharset(length int, charset string) string {
|
||||||
|
b := make([]byte, length)
|
||||||
|
for i := range b {
|
||||||
|
b[i] = charset[seededRand.Intn(len(charset))]
|
||||||
|
}
|
||||||
|
return string(b)
|
||||||
|
}
|
||||||
|
|
||||||
|
func String(length int) string {
|
||||||
|
return StringWithCharset(length, charset)
|
||||||
|
}
|
||||||
177
config/generate/generateCertificate.go
Normal file
177
config/generate/generateCertificate.go
Normal file
@@ -0,0 +1,177 @@
|
|||||||
|
// Copyright 2009 The Go Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style
|
||||||
|
// license that can be found in the LICENSE file.x
|
||||||
|
|
||||||
|
// Generate a self-signed X.509 certificate for a TLS server. Outputs to
|
||||||
|
// 'cert.pem' and 'key.pem' and will overwrite existing files.
|
||||||
|
|
||||||
|
package generate
|
||||||
|
|
||||||
|
import (
|
||||||
|
"crypto/ecdsa"
|
||||||
|
"crypto/ed25519"
|
||||||
|
"crypto/elliptic"
|
||||||
|
"crypto/rand"
|
||||||
|
"crypto/rsa"
|
||||||
|
"crypto/x509"
|
||||||
|
"crypto/x509/pkix"
|
||||||
|
"encoding/pem"
|
||||||
|
"github.com/Akilan1999/p2p-rendering-computation/p2p"
|
||||||
|
"log"
|
||||||
|
"math/big"
|
||||||
|
"net"
|
||||||
|
"os"
|
||||||
|
"strings"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
host = ""
|
||||||
|
validFrom = ""
|
||||||
|
validFor = 365 * 24 * time.Hour
|
||||||
|
isCA = false
|
||||||
|
rsaBits = 2048
|
||||||
|
ecdsaCurve = ""
|
||||||
|
ed25519Key = false
|
||||||
|
)
|
||||||
|
|
||||||
|
func publicKey(priv any) any {
|
||||||
|
switch k := priv.(type) {
|
||||||
|
case *rsa.PrivateKey:
|
||||||
|
return &k.PublicKey
|
||||||
|
case *ecdsa.PrivateKey:
|
||||||
|
return &k.PublicKey
|
||||||
|
case ed25519.PrivateKey:
|
||||||
|
return k.Public().(ed25519.PublicKey)
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func GenerateCertificate() error {
|
||||||
|
var priv any
|
||||||
|
var err error
|
||||||
|
|
||||||
|
//flag.Parse()
|
||||||
|
|
||||||
|
host, err = p2p.CurrentPublicIP()
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(host) == 0 {
|
||||||
|
log.Fatalf("Missing required --host parameter")
|
||||||
|
}
|
||||||
|
switch ecdsaCurve {
|
||||||
|
case "":
|
||||||
|
if ed25519Key {
|
||||||
|
_, priv, err = ed25519.GenerateKey(rand.Reader)
|
||||||
|
} else {
|
||||||
|
priv, err = rsa.GenerateKey(rand.Reader, rsaBits)
|
||||||
|
}
|
||||||
|
case "P224":
|
||||||
|
priv, err = ecdsa.GenerateKey(elliptic.P224(), rand.Reader)
|
||||||
|
case "P256":
|
||||||
|
priv, err = ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
|
||||||
|
case "P384":
|
||||||
|
priv, err = ecdsa.GenerateKey(elliptic.P384(), rand.Reader)
|
||||||
|
case "P521":
|
||||||
|
priv, err = ecdsa.GenerateKey(elliptic.P521(), rand.Reader)
|
||||||
|
default:
|
||||||
|
log.Fatalf("Unrecognized elliptic curve: %q", ecdsaCurve)
|
||||||
|
}
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalf("Failed to generate private key: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ECDSA, ED25519 and RSA subject keys should have the DigitalSignature
|
||||||
|
// KeyUsage bits set in the x509.Certificate template
|
||||||
|
keyUsage := x509.KeyUsageDigitalSignature
|
||||||
|
// Only RSA subject keys should have the KeyEncipherment KeyUsage bits set. In
|
||||||
|
// the context of TLS this KeyUsage is particular to RSA key exchange and
|
||||||
|
// authentication.
|
||||||
|
if _, isRSA := priv.(*rsa.PrivateKey); isRSA {
|
||||||
|
keyUsage |= x509.KeyUsageKeyEncipherment
|
||||||
|
}
|
||||||
|
|
||||||
|
var notBefore time.Time
|
||||||
|
if len(validFrom) == 0 {
|
||||||
|
notBefore = time.Now()
|
||||||
|
} else {
|
||||||
|
notBefore, err = time.Parse("Jan 2 15:04:05 2006", validFrom)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalf("Failed to parse creation date: %v", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
notAfter := notBefore.Add(validFor)
|
||||||
|
|
||||||
|
serialNumberLimit := new(big.Int).Lsh(big.NewInt(1), 128)
|
||||||
|
serialNumber, err := rand.Int(rand.Reader, serialNumberLimit)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalf("Failed to generate serial number: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
template := x509.Certificate{
|
||||||
|
SerialNumber: serialNumber,
|
||||||
|
Subject: pkix.Name{
|
||||||
|
Organization: []string{"Acme Co"},
|
||||||
|
},
|
||||||
|
NotBefore: notBefore,
|
||||||
|
NotAfter: notAfter,
|
||||||
|
|
||||||
|
KeyUsage: keyUsage,
|
||||||
|
ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth},
|
||||||
|
BasicConstraintsValid: true,
|
||||||
|
}
|
||||||
|
|
||||||
|
hosts := strings.Split(host, ",")
|
||||||
|
for _, h := range hosts {
|
||||||
|
if ip := net.ParseIP(h); ip != nil {
|
||||||
|
template.IPAddresses = append(template.IPAddresses, ip)
|
||||||
|
} else {
|
||||||
|
template.DNSNames = append(template.DNSNames, h)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if isCA {
|
||||||
|
template.IsCA = true
|
||||||
|
template.KeyUsage |= x509.KeyUsageCertSign
|
||||||
|
}
|
||||||
|
|
||||||
|
derBytes, err := x509.CreateCertificate(rand.Reader, &template, &template, publicKey(priv), priv)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalf("Failed to create certificate: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
certOut, err := os.Create("cert.pem")
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalf("Failed to open cert.pem for writing: %v", err)
|
||||||
|
}
|
||||||
|
if err := pem.Encode(certOut, &pem.Block{Type: "CERTIFICATE", Bytes: derBytes}); err != nil {
|
||||||
|
log.Fatalf("Failed to write data to cert.pem: %v", err)
|
||||||
|
}
|
||||||
|
if err := certOut.Close(); err != nil {
|
||||||
|
log.Fatalf("Error closing cert.pem: %v", err)
|
||||||
|
}
|
||||||
|
log.Print("wrote cert.pem\n")
|
||||||
|
|
||||||
|
keyOut, err := os.OpenFile("key.pem", os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalf("Failed to open key.pem for writing: %v", err)
|
||||||
|
}
|
||||||
|
privBytes, err := x509.MarshalPKCS8PrivateKey(priv)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalf("Unable to marshal private key: %v", err)
|
||||||
|
}
|
||||||
|
if err := pem.Encode(keyOut, &pem.Block{Type: "PRIVATE KEY", Bytes: privBytes}); err != nil {
|
||||||
|
log.Fatalf("Failed to write data to key.pem: %v", err)
|
||||||
|
}
|
||||||
|
if err := keyOut.Close(); err != nil {
|
||||||
|
log.Fatalf("Error closing key.pem: %v", err)
|
||||||
|
}
|
||||||
|
log.Print("wrote key.pem\n")
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
291
config/generate/generateFiles.go
Normal file
291
config/generate/generateFiles.go
Normal file
@@ -0,0 +1,291 @@
|
|||||||
|
package generate
|
||||||
|
|
||||||
|
import (
|
||||||
|
"crypto/rand"
|
||||||
|
"crypto/rsa"
|
||||||
|
"crypto/x509"
|
||||||
|
"encoding/pem"
|
||||||
|
"github.com/Akilan1999/p2p-rendering-computation/config"
|
||||||
|
"github.com/Akilan1999/p2p-rendering-computation/p2p"
|
||||||
|
"github.com/go-git/go-git/v5"
|
||||||
|
"golang.org/x/crypto/ssh"
|
||||||
|
"io/ioutil"
|
||||||
|
"os"
|
||||||
|
)
|
||||||
|
|
||||||
|
// GenerateFiles Generates all the files needed to setup P2PRC
|
||||||
|
func GenerateFiles(rootNodes ...p2p.IpAddress) (err error) {
|
||||||
|
err = GenerateIPTableFile(rootNodes)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
err = GenerateDockerFiles()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
err = GeneratePluginDirectory()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
err = GenerateClientTrackContainers()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GenerateIPTableFile Generates the IPTable file with the appropirate root node
|
||||||
|
func GenerateIPTableFile(rootNodes []p2p.IpAddress) (err error) {
|
||||||
|
var rootnodes p2p.IpAddresses
|
||||||
|
var rootnode p2p.IpAddress
|
||||||
|
|
||||||
|
err = CreateIPTableFolderStructure()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// If root node addresses are not provided as optional parameters
|
||||||
|
if len(rootNodes) <= 0 {
|
||||||
|
rootnode.Name = "Node1"
|
||||||
|
rootnode.ServerPort = "8078"
|
||||||
|
rootnode.NAT = "False"
|
||||||
|
rootnode.Ipv4 = "217.76.63.222"
|
||||||
|
rootnode.ProxyServer = "True"
|
||||||
|
|
||||||
|
rootnodes.IpAddress = append(rootnodes.IpAddress, rootnode)
|
||||||
|
} else {
|
||||||
|
// if root nodes are provided then override them as the optional parameter
|
||||||
|
for i := range rootNodes {
|
||||||
|
rootnodes.IpAddress = append(rootnodes.IpAddress, rootNodes[i])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
err = rootnodes.WriteIpTable()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// CreateIPTableFolderStructure Create folder structure for IPTable
|
||||||
|
func CreateIPTableFolderStructure() (err error) {
|
||||||
|
path, err := config.GetCurrentPath()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if _, err = os.Stat(path + "p2p"); os.IsNotExist(err) {
|
||||||
|
if err = os.Mkdir(path+"p2p", os.ModePerm); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if _, err = os.Stat(path + "p2p/iptable"); os.IsNotExist(err) {
|
||||||
|
if err = os.Mkdir(path+"p2p/iptable", os.ModePerm); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if _, err = os.Stat(path + "p2p/iptable/ip_table.json"); os.IsNotExist(err) {
|
||||||
|
_, err = os.Create(path + "p2p/iptable/ip_table.json")
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GenerateDockerFiles Generate default docker files
|
||||||
|
func GenerateDockerFiles() (err error) {
|
||||||
|
path, err := config.GetCurrentPath()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if _, err = os.Stat(path + "server"); os.IsNotExist(err) {
|
||||||
|
if err = os.Mkdir(path+"server", os.ModePerm); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if _, err = os.Stat(path + "server/docker"); os.IsNotExist(err) {
|
||||||
|
if err = os.Mkdir(path+"server/docker", os.ModePerm); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if _, err = os.Stat(path + "server/docker/containers"); os.IsNotExist(err) {
|
||||||
|
if err = os.Mkdir(path+"server/docker/containers", os.ModePerm); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if _, err = os.Stat(path + "server/docker/containers"); os.IsNotExist(err) {
|
||||||
|
if err = os.Mkdir(path+"server/docker/containers", os.ModePerm); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if _, err = os.Stat(path + "server/docker/containers/docker-ubuntu-sshd"); os.IsNotExist(err) {
|
||||||
|
if err = os.Mkdir(path+"server/docker/containers/docker-ubuntu-sshd", os.ModePerm); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clone base docker image
|
||||||
|
_, err = git.PlainClone(path+"server/docker/containers/docker-ubuntu-sshd", false, &git.CloneOptions{
|
||||||
|
URL: "https://github.com/Akilan1999/docker-ubuntu-sshd",
|
||||||
|
Progress: os.Stdout,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GeneratePluginDirectory Generates plugin directory structure
|
||||||
|
func GeneratePluginDirectory() (err error) {
|
||||||
|
path, err := config.GetCurrentPath()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if _, err = os.Stat(path + "plugin"); os.IsNotExist(err) {
|
||||||
|
if err = os.Mkdir(path+"plugin", os.ModePerm); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if _, err = os.Stat(path + "plugin/deploy"); os.IsNotExist(err) {
|
||||||
|
if err = os.Mkdir(path+"plugin/deploy", os.ModePerm); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func GenerateClientTrackContainers() (err error) {
|
||||||
|
path, err := config.GetCurrentPath()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if _, err = os.Stat(path + "client"); os.IsNotExist(err) {
|
||||||
|
if err = os.Mkdir(path+"client", os.ModePerm); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err = os.Mkdir(path+"client/trackcontainers", os.ModePerm); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
if _, err = os.Stat(path + "client/trackcontainers/trackcontainers.json"); os.IsNotExist(err) {
|
||||||
|
_, err = os.Create(path + "client/trackcontainers/trackcontainers.json")
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
_, err = os.Create(path + "client/trackcontainers/grouptrackcontainers.json")
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// MakeSSHKeyPair make a pair of public and private keys for SSH access.
|
||||||
|
// Public key is encoded in the format for inclusion in an OpenSSH authorized_keys file.
|
||||||
|
// Private Key generated is PEM encoded
|
||||||
|
// source: https://gist.github.com/goliatone/e9c13e5f046e34cef6e150d06f20a34c
|
||||||
|
func MakeSSHKeyPair(pubKeyPath, privateKeyPath string) error {
|
||||||
|
privateKey, err := rsa.GenerateKey(rand.Reader, 1024)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
// generate and write private key as PEM
|
||||||
|
privateKeyFile, err := os.Create(privateKeyPath)
|
||||||
|
defer privateKeyFile.Close()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set permission to private key to SSH into docker machine
|
||||||
|
err = os.Chmod(privateKeyPath, 600)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
privateKeyPEM := &pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(privateKey)}
|
||||||
|
if err := pem.Encode(privateKeyFile, privateKeyPEM); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
// generate and write public key
|
||||||
|
pub, err := ssh.NewPublicKey(&privateKey.PublicKey)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return ioutil.WriteFile(pubKeyPath, ssh.MarshalAuthorizedKey(pub), 0655)
|
||||||
|
}
|
||||||
|
|
||||||
|
// FileExists exists returns whether the given file or directory exists
|
||||||
|
// source: https://stackoverflow.com/questions/10510691/how-to-check-whether-a-file-or-directory-exists
|
||||||
|
func FileExists(path string) (bool, error) {
|
||||||
|
_, err := os.Stat(path)
|
||||||
|
if err == nil {
|
||||||
|
return true, nil
|
||||||
|
}
|
||||||
|
if os.IsNotExist(err) {
|
||||||
|
return false, nil
|
||||||
|
}
|
||||||
|
return false, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// AuthorizedKey struct represents the structure of an authorized key
|
||||||
|
type AuthorizedKey struct {
|
||||||
|
Username string
|
||||||
|
Key string
|
||||||
|
}
|
||||||
|
|
||||||
|
// AddPublicKeyBareMetal Adds the parameter public key to the auth list
|
||||||
|
// Generated by ChatGPT
|
||||||
|
// Prompts:
|
||||||
|
// - Generate a go program to read authorised key and map it to a struct and write it back to the same location.
|
||||||
|
// - Can you follow the original format
|
||||||
|
// (TURNED OUT TO BE PRETTY SHITTY GENERATED CODE)
|
||||||
|
//func AddPublicKeyBareMetal(PublicKey string) error {
|
||||||
|
// // Specify the path to the authorized_keys file
|
||||||
|
// dirname, err := os.UserHomeDir()
|
||||||
|
// if err != nil {
|
||||||
|
// return err
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// authorizedKeysPath := dirname + "/.ssh/" + "authorized_keys"
|
||||||
|
//
|
||||||
|
// // Read the contents of the authorized_keys file
|
||||||
|
// file, err := os.Open(authorizedKeysPath)
|
||||||
|
// if err != nil {
|
||||||
|
// return err
|
||||||
|
// }
|
||||||
|
// defer file.Close()
|
||||||
|
//
|
||||||
|
// // Create a slice to store AuthorizedKey structs
|
||||||
|
// var authorizedKeys []AuthorizedKey
|
||||||
|
//
|
||||||
|
// // Read each line of the file and parse the data
|
||||||
|
// scanner := bufio.NewScanner(file)
|
||||||
|
// for scanner.Scan() {
|
||||||
|
// line := scanner.Text()
|
||||||
|
// parts := strings.Fields(line)
|
||||||
|
// if len(parts) >= 2 {
|
||||||
|
// authorizedKey := AuthorizedKey{
|
||||||
|
// Username: parts[0],
|
||||||
|
// Key: parts[1],
|
||||||
|
// }
|
||||||
|
// authorizedKeys = append(authorizedKeys, authorizedKey)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// if err := scanner.Err(); err != nil {
|
||||||
|
// return err
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// // Modify the slice of structs if needed
|
||||||
|
// // authorizedKeys[0].Username = "newUsername"
|
||||||
|
// // authorizedKeys[0].Key = "newKey"
|
||||||
|
// authorizedKeys = append(authorizedKeys, AuthorizedKey{Username: "", Key: PublicKey})
|
||||||
|
//
|
||||||
|
// // Write the modified data back to the authorized_keys file
|
||||||
|
// newFile, err := os.Create(authorizedKeysPath)
|
||||||
|
// if err != nil {
|
||||||
|
// return err
|
||||||
|
// }
|
||||||
|
// defer newFile.Close()
|
||||||
|
//
|
||||||
|
// return nil
|
||||||
|
//}
|
||||||
40
config/generate/gernerate_test.go
Normal file
40
config/generate/gernerate_test.go
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
package generate
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"github.com/Akilan1999/p2p-rendering-computation/config"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
type CustomConfig struct {
|
||||||
|
Test string
|
||||||
|
}
|
||||||
|
|
||||||
|
// Test case to generate defaults with custom data-structure
|
||||||
|
func TestSetDefaults(t *testing.T) {
|
||||||
|
setDefaults, err := SetDefaults("", true, &CustomConfig{Test: "lol"}, true)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println(err)
|
||||||
|
t.Fail()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
fmt.Println(setDefaults)
|
||||||
|
|
||||||
|
var c CustomConfig
|
||||||
|
|
||||||
|
_, err = config.ConfigInit(nil, &c)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println(err)
|
||||||
|
t.Fail()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
fmt.Println(c)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Test case to generate public and private keys
|
||||||
|
func TestGeneratePublicAndPrivateKeys(t *testing.T) {
|
||||||
|
MakeSSHKeyPair("test.pub", "test.prv")
|
||||||
|
}
|
||||||
39
config/generate/helperFunctions.go
Normal file
39
config/generate/helperFunctions.go
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
package generate
|
||||||
|
|
||||||
|
import (
|
||||||
|
"io"
|
||||||
|
"os"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Exists reports whether the named file or directory exists.
|
||||||
|
func fileExists(name string) bool {
|
||||||
|
if _, err := os.Stat(name); err != nil {
|
||||||
|
if os.IsNotExist(err) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// Copy the src file to dst. Any existing file will be overwritten and will not
|
||||||
|
// copy file attributes.
|
||||||
|
// Source: https://stackoverflow.com/questions/21060945/simple-way-to-copy-a-file
|
||||||
|
func Copy(src, dst string) error {
|
||||||
|
in, err := os.Open(src)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
defer in.Close()
|
||||||
|
|
||||||
|
out, err := os.Create(dst)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
defer out.Close()
|
||||||
|
|
||||||
|
_, err = io.Copy(out, in)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return out.Close()
|
||||||
|
}
|
||||||
22
default.nix
Normal file
22
default.nix
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{ nixpkgs ? import <nixpkgs> { } }:
|
||||||
|
|
||||||
|
let
|
||||||
|
pkgs = [
|
||||||
|
nixpkgs.go
|
||||||
|
nixpkgs.tmux
|
||||||
|
nixpkgs.docker
|
||||||
|
nixpkgs.vim
|
||||||
|
];
|
||||||
|
|
||||||
|
in
|
||||||
|
nixpkgs.stdenv.mkDerivation {
|
||||||
|
name = "env";
|
||||||
|
buildInputs = pkgs;
|
||||||
|
pure-eval = true;
|
||||||
|
shellHook =
|
||||||
|
''
|
||||||
|
make
|
||||||
|
export P2PRC=$PWD
|
||||||
|
export PATH=$PWD:$PATH
|
||||||
|
'';
|
||||||
|
}
|
||||||
@@ -1,386 +0,0 @@
|
|||||||
// Package generate The purpose of this package is to ensure that we can extend the use-case of P2PRC.
|
|
||||||
// We will create a project directory with the template to extend the use-case of P2PRC
|
|
||||||
package generate
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"git.sr.ht/~akilan1999/p2p-rendering-computation/config"
|
|
||||||
"github.com/otiai10/copy"
|
|
||||||
"go/ast"
|
|
||||||
"go/token"
|
|
||||||
modfile "golang.org/x/mod/modfile"
|
|
||||||
"io/ioutil"
|
|
||||||
"os"
|
|
||||||
"os/exec"
|
|
||||||
"strings"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewProject Struct information required when creating a new project
|
|
||||||
type NewProject struct {
|
|
||||||
Name string
|
|
||||||
Module string
|
|
||||||
NewDir string
|
|
||||||
P2PRCPath string
|
|
||||||
CurrentModule string
|
|
||||||
Option *copy.Options
|
|
||||||
Token *token.FileSet
|
|
||||||
AST *ast.File
|
|
||||||
FileNameAST string
|
|
||||||
}
|
|
||||||
|
|
||||||
// GenerateNewProject creates a new copy of the P2PRC
|
|
||||||
// project for custom modification
|
|
||||||
func GenerateNewProject(name string, module string) error {
|
|
||||||
// Create new variable of type NewProject
|
|
||||||
var newProject NewProject
|
|
||||||
//Setting module name to the new project
|
|
||||||
newProject.Module = module
|
|
||||||
// Get path of the current directory
|
|
||||||
curDir, err := config.GetCurrentPath()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
// Folder name of the new generated project
|
|
||||||
newProject.NewDir = curDir + name + "/"
|
|
||||||
// Create a new folder based on name entered
|
|
||||||
err = CreateFolder(name, curDir)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
// get path of P2PRC
|
|
||||||
P2PRCPATH, err := config.GetPathP2PRC()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
// Assign P2PRC path to the newly generated project
|
|
||||||
newProject.P2PRCPath = P2PRCPATH
|
|
||||||
// Steps:
|
|
||||||
// - copy all files from P2PRC
|
|
||||||
// - remove go.mod and go.sum and create new ones
|
|
||||||
|
|
||||||
// Files we require to skip
|
|
||||||
|
|
||||||
var Options copy.Options
|
|
||||||
|
|
||||||
// IF YOU ARE RELEASING AN EXTENSION OF P2PRC
|
|
||||||
// MODIFY HERE (AN EXTENSION FROM YOUR EXTENSION :P)
|
|
||||||
// Skip or have the appropriate files and directories not needed
|
|
||||||
//----------------------------------------------------------------
|
|
||||||
// Action performed:
|
|
||||||
// - Ensuring main.go file exists
|
|
||||||
// - Ensuring generate.go file exists
|
|
||||||
// - Ensuring modifyGenerate.go file exists
|
|
||||||
// - Ensuring generate_test.go file exists
|
|
||||||
// - Ensuring server/server.go file exists
|
|
||||||
// - Ensuring server/gopsutil.go file exists
|
|
||||||
// - Ensuring server/gpu.go file exists
|
|
||||||
// - Ensuring cmd/action.go file exists
|
|
||||||
// - Ensuring cmd/flags.go file exists
|
|
||||||
// - Skipping all .go files apart from the ones listed above
|
|
||||||
// - Skipping go.mod file
|
|
||||||
// - Skipping go.sum file
|
|
||||||
// - Skipping .idea/ directory
|
|
||||||
// - Skipping Makefile file
|
|
||||||
// - Skipping <Project Name>/ directory
|
|
||||||
//----------------------------------------------------------------
|
|
||||||
Options.Skip = func(src string) (bool, error) {
|
|
||||||
switch {
|
|
||||||
case strings.HasSuffix(src, "main.go"):
|
|
||||||
return false, nil
|
|
||||||
case strings.HasSuffix(src, "generate.go"):
|
|
||||||
return false, nil
|
|
||||||
case strings.HasSuffix(src, "modifyGenerate.go"):
|
|
||||||
return false, nil
|
|
||||||
case strings.HasSuffix(src, "generate_test.go"):
|
|
||||||
return false, nil
|
|
||||||
case strings.HasSuffix(src, "server/server.go"):
|
|
||||||
return false, nil
|
|
||||||
case strings.HasSuffix(src, "server/gopsutil.go"):
|
|
||||||
return false, nil
|
|
||||||
case strings.HasSuffix(src, "server/gpu.go"):
|
|
||||||
return false, nil
|
|
||||||
case strings.HasSuffix(src, "cmd/action.go"):
|
|
||||||
return false, nil
|
|
||||||
case strings.HasSuffix(src, "cmd/flags.go"):
|
|
||||||
return false, nil
|
|
||||||
case strings.HasSuffix(src, "config/config.go"):
|
|
||||||
return false, nil
|
|
||||||
case strings.HasSuffix(src, "config/config_test.go"):
|
|
||||||
return false, nil
|
|
||||||
case strings.HasSuffix(src, ".go"):
|
|
||||||
return true, nil
|
|
||||||
case strings.HasSuffix(src, "go.mod"):
|
|
||||||
return true, nil
|
|
||||||
case strings.HasSuffix(src, "go.sum"):
|
|
||||||
return true, nil
|
|
||||||
case strings.HasSuffix(src, ".idea"):
|
|
||||||
return true, nil
|
|
||||||
case strings.HasSuffix(src, "Makefile"):
|
|
||||||
return true, nil
|
|
||||||
case strings.HasSuffix(src, name):
|
|
||||||
return true, nil
|
|
||||||
default:
|
|
||||||
return false, nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Storing type option in the struct new project
|
|
||||||
newProject.Option = &Options
|
|
||||||
|
|
||||||
// Copies all files from P2PRC to the new project created
|
|
||||||
err = copy.Copy(newProject.P2PRCPath, newProject.NewDir, *newProject.Option)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Creating a new go.mod file in the appropriate directory
|
|
||||||
err = newProject.CreateGoMod()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get current project mod name
|
|
||||||
err = newProject.GetCurrentGoModule()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Change the appropriate imports
|
|
||||||
err = newProject.ChangeImportFiles()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add changes inside the new project
|
|
||||||
err = newProject.GitAdd()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// commit changes inside the new project
|
|
||||||
err = newProject.GitCommit()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
// Creates go.sum file
|
|
||||||
//err = newProject.CreateGoModTidy()
|
|
||||||
//if err != nil {
|
|
||||||
// return err
|
|
||||||
//}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// CreateFolder Creates a new folder based on the name and path provided
|
|
||||||
func CreateFolder(name string, path string) error {
|
|
||||||
//Create a folder/directory at a full qualified path
|
|
||||||
err := os.Mkdir(path+name, 0755)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// CreateGoMod Creates a new go module for the new project created
|
|
||||||
func (a *NewProject) CreateGoMod() error {
|
|
||||||
// Create new go.mod in the appropriate directory
|
|
||||||
cmd := exec.Command("go", "mod", "init", a.Module)
|
|
||||||
cmd.Dir = a.NewDir
|
|
||||||
if err := cmd.Run(); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (a *NewProject) CreateGoModTidy() error {
|
|
||||||
// Installs all the appropriate dependencies and creates go.sum
|
|
||||||
cmd := exec.Command("go", "mod", "tidy")
|
|
||||||
cmd.Dir = a.NewDir
|
|
||||||
if err := cmd.Run(); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ChangeImportFiles Changes Appropriate imports in the appropriate file
|
|
||||||
func (a *NewProject) ChangeImportFiles() error {
|
|
||||||
// IF YOU ARE RELEASING AN EXTENSION OF P2PRC
|
|
||||||
// MODIFY HERE (AN EXTENSION FROM YOUR EXTENSION :P)
|
|
||||||
//----------------------------------------------------------------
|
|
||||||
// Action performed:
|
|
||||||
// Files we would need to modify the imports in
|
|
||||||
// - generate/generate.go -> config module
|
|
||||||
// - generate/generate_test.go -> config module
|
|
||||||
// - cmd/action.go -> config module, server module, generate module
|
|
||||||
// - cmd/flags.go -> config module, server module, generate module
|
|
||||||
// - server/server.go -> config module
|
|
||||||
// - main.go -> cmd module
|
|
||||||
//-----------------------------------------------------------------
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------
|
|
||||||
// 1.0 - generate/generate.go -> config module
|
|
||||||
a.FileNameAST = a.NewDir + "generate/generate.go"
|
|
||||||
// Get AST information of the file
|
|
||||||
err := a.GetASTGoFile()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
// Change the appropriate Go file
|
|
||||||
err = a.ChangeImports(a.CurrentModule+"/config", a.Module+"/config")
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
// Writes the change to the appropriate file
|
|
||||||
err = a.WriteGoAst()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
//-----------------------------------------------------------------
|
|
||||||
// 1.1 - generate/generate_test.go -> config module
|
|
||||||
a.FileNameAST = a.NewDir + "generate/generate_test.go"
|
|
||||||
// Get AST information of the file
|
|
||||||
err = a.GetASTGoFile()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
// Change the appropriate Go file
|
|
||||||
err = a.ChangeImports(a.CurrentModule+"/config", a.Module+"/config")
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
// Writes the change to the appropriate file
|
|
||||||
err = a.WriteGoAst()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------
|
|
||||||
//-----------------------------------------------------------------
|
|
||||||
// 2.0 - cmd/action.go -> config module, server module, generate module
|
|
||||||
a.FileNameAST = a.NewDir + "cmd/action.go"
|
|
||||||
// Get AST information of the file
|
|
||||||
err = a.GetASTGoFile()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
// Change the appropriate Go file
|
|
||||||
err = a.ChangeImports(a.CurrentModule+"/config", a.Module+"/config")
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
err = a.ChangeImports(a.CurrentModule+"/server", a.Module+"/server")
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
err = a.ChangeImports(a.CurrentModule+"/generate", a.Module+"/generate")
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
// Writes the change to the appropriate file
|
|
||||||
err = a.WriteGoAst()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
//-----------------------------------------------------------------
|
|
||||||
// 2.1 - cmd/flags.go -> config module, server module, generate module
|
|
||||||
a.FileNameAST = a.NewDir + "cmd/flags.go"
|
|
||||||
// Get AST information of the file
|
|
||||||
err = a.GetASTGoFile()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
// Change the appropriate Go file
|
|
||||||
err = a.ChangeImports(a.CurrentModule+"/config", a.Module+"/config")
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
err = a.ChangeImports(a.CurrentModule+"/server", a.Module+"/server")
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
err = a.ChangeImports(a.CurrentModule+"/generate", a.Module+"/generate")
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
// Writes the change to the appropriate file
|
|
||||||
err = a.WriteGoAst()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
//-----------------------------------------------------------------
|
|
||||||
//-----------------------------------------------------------------
|
|
||||||
// 3.0 - server/server.go -> config module
|
|
||||||
a.FileNameAST = a.NewDir + "server/server.go"
|
|
||||||
// Get AST information of the file
|
|
||||||
err = a.GetASTGoFile()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
// Change the appropriate Go file
|
|
||||||
err = a.ChangeImports(a.CurrentModule+"/config", a.Module+"/config")
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
// Writes the change to the appropriate file
|
|
||||||
err = a.WriteGoAst()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
//-----------------------------------------------------------------
|
|
||||||
//-----------------------------------------------------------------
|
|
||||||
// 4.0 - server/server.go -> config module
|
|
||||||
a.FileNameAST = a.NewDir + "main.go"
|
|
||||||
// Get AST information of the file
|
|
||||||
err = a.GetASTGoFile()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
// Change the appropriate Go file
|
|
||||||
err = a.ChangeImports(a.CurrentModule+"/cmd", a.Module+"/cmd")
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
// Writes the change to the appropriate file
|
|
||||||
err = a.WriteGoAst()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
//-----------------------------------------------------------------
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetCurrentGoModule Gets the current go module name
|
|
||||||
func (a *NewProject) GetCurrentGoModule() error {
|
|
||||||
goModBytes, err := ioutil.ReadFile(a.P2PRCPath + "go.mod")
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
modName := modfile.ModulePath(goModBytes)
|
|
||||||
fmt.Fprintf(os.Stdout, "modName=%+v\n", modName)
|
|
||||||
|
|
||||||
// Set current module to struct of file NewProject
|
|
||||||
a.CurrentModule = modName
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (a *NewProject) GitAdd() error {
|
|
||||||
// Installs all the appropriate dependencies and creates go.sum
|
|
||||||
cmd := exec.Command("git", "add", ".")
|
|
||||||
cmd.Dir = a.NewDir
|
|
||||||
if err := cmd.Run(); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (a *NewProject) GitCommit() error {
|
|
||||||
// Installs all the appropriate dependencies and creates go.sum
|
|
||||||
cmd := exec.Command("git", "commit", "-m=removed appropriate go files")
|
|
||||||
cmd.Dir = a.NewDir
|
|
||||||
if err := cmd.Run(); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
@@ -1,112 +0,0 @@
|
|||||||
package generate
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"git.sr.ht/~akilan1999/p2p-rendering-computation/config"
|
|
||||||
"testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Tests the create folder function creates a folder
|
|
||||||
// This test will create a folder in the temporary
|
|
||||||
// directory
|
|
||||||
func TestCreateFolder(t *testing.T) {
|
|
||||||
err := CreateFolder("test", "/tmp/")
|
|
||||||
if err != nil {
|
|
||||||
t.Error(err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Testing if a new project is created successfully
|
|
||||||
func TestGenerateNewProject(t *testing.T) {
|
|
||||||
// Checking if a new project is created successfully
|
|
||||||
err := GenerateNewProject("p2prctest","p2prctest")
|
|
||||||
if err != nil {
|
|
||||||
fmt.Println(err)
|
|
||||||
t.Error(err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Testing AST function to ensure imports are
|
|
||||||
// working as intended
|
|
||||||
func TestChangingImportAST(t *testing.T) {
|
|
||||||
// Create a new variable of type NewProject
|
|
||||||
var np NewProject
|
|
||||||
// Get current directory
|
|
||||||
path, err := config.GetCurrentPath()
|
|
||||||
if err != nil {
|
|
||||||
fmt.Println(err)
|
|
||||||
t.Error(err)
|
|
||||||
}
|
|
||||||
// Create testcase scenario
|
|
||||||
err = config.Copy(path + "testcaseAST.go", path + "/Test/testcaseAST.go")
|
|
||||||
if err != nil {
|
|
||||||
fmt.Println(err)
|
|
||||||
t.Error(err)
|
|
||||||
}
|
|
||||||
// Sets new directory to the folder test
|
|
||||||
np.NewDir = path + "Test/"
|
|
||||||
// Sets file name to be opened and modified in the AST
|
|
||||||
np.FileNameAST = path + "Test/" + "testcaseAST.go"
|
|
||||||
// Call the Read AST function
|
|
||||||
err = np.GetASTGoFile()
|
|
||||||
if err != nil {
|
|
||||||
fmt.Println(err)
|
|
||||||
t.Error(err)
|
|
||||||
}
|
|
||||||
// Change an import
|
|
||||||
err = np.ChangeImports("fmt", "lolol")
|
|
||||||
if err != nil {
|
|
||||||
fmt.Println(err)
|
|
||||||
t.Error(err)
|
|
||||||
}
|
|
||||||
// Write those saved changes
|
|
||||||
err = np.WriteGoAst()
|
|
||||||
if err != nil {
|
|
||||||
fmt.Println(err)
|
|
||||||
t.Error(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Testing the if Go Mod is created
|
|
||||||
func TestNewProject_CreateGoMod(t *testing.T) {
|
|
||||||
// Create a new variable of type NewProject
|
|
||||||
var np NewProject
|
|
||||||
path, err := config.GetCurrentPath()
|
|
||||||
if err != nil {
|
|
||||||
fmt.Println(err)
|
|
||||||
t.Error(err)
|
|
||||||
}
|
|
||||||
// Set new project name as Test
|
|
||||||
np.Name = "Test"
|
|
||||||
// Set new project module as github.com/Test
|
|
||||||
np.Module = "github.com/Test"
|
|
||||||
// Set Path of the new project
|
|
||||||
np.NewDir = path + "Test/"
|
|
||||||
// Creating a go.mod file
|
|
||||||
err = np.CreateGoMod()
|
|
||||||
if err != nil {
|
|
||||||
fmt.Println(err)
|
|
||||||
t.Error(err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Testing if the current go module is returned
|
|
||||||
func TestNewProject_GetCurrentGoModule(t *testing.T) {
|
|
||||||
// Create a new variable of type NewProject
|
|
||||||
var np NewProject
|
|
||||||
path, err := config.GetPathP2PRC()
|
|
||||||
if err != nil {
|
|
||||||
fmt.Println(err)
|
|
||||||
t.Error(err)
|
|
||||||
}
|
|
||||||
// Set Current project path
|
|
||||||
np.P2PRCPath = path
|
|
||||||
// Get module name
|
|
||||||
err = np.GetCurrentGoModule()
|
|
||||||
if err != nil {
|
|
||||||
fmt.Println(err)
|
|
||||||
t.Error(err)
|
|
||||||
}
|
|
||||||
fmt.Println(np.CurrentModule)
|
|
||||||
}
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
package generate
|
|
||||||
|
|
||||||
import (
|
|
||||||
"go/parser"
|
|
||||||
"go/printer"
|
|
||||||
"go/token"
|
|
||||||
"os"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
// GetASTGoFile Gets AST of the Go file provided
|
|
||||||
func (np *NewProject)GetASTGoFile() error{
|
|
||||||
fset := token.NewFileSet()
|
|
||||||
node, err := parser.ParseFile(fset, np.FileNameAST, nil, parser.ParseComments)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
//Write Token information to the struct
|
|
||||||
np.Token = fset
|
|
||||||
// Write AST information the struct
|
|
||||||
np.AST = node
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ChangeImports Changes import of the AST
|
|
||||||
func (np *NewProject)ChangeImports(CurrentImport string,ChangedImport string) error {
|
|
||||||
// Iterating through the loop and changing the appropriate import
|
|
||||||
for i, spec := range np.AST.Imports {
|
|
||||||
// If the current import is found then change it
|
|
||||||
if spec.Path.Value == "\"" + CurrentImport + "\"" {
|
|
||||||
np.AST.Imports[i].Path.Value = "\"" + ChangedImport + "\""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteGoAst Write changed imports back to the AST
|
|
||||||
func (np *NewProject)WriteGoAst() error {
|
|
||||||
// write new AST to file
|
|
||||||
f, err := os.Create(np.FileNameAST)
|
|
||||||
if err != nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
defer f.Close()
|
|
||||||
if err := printer.Fprint(f, np.Token, np.AST); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
package generate
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestCaseAST() {
|
|
||||||
fmt.Println("lol")
|
|
||||||
}
|
|
||||||
99
go.mod
99
go.mod
@@ -1,30 +1,105 @@
|
|||||||
module git.sr.ht/~akilan1999/p2p-rendering-computation
|
module github.com/Akilan1999/p2p-rendering-computation
|
||||||
|
|
||||||
go 1.15
|
go 1.18
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/Microsoft/hcsshim v0.8.15 // indirect
|
|
||||||
github.com/apenella/go-ansible v1.1.0
|
github.com/apenella/go-ansible v1.1.0
|
||||||
github.com/containerd/continuity v0.0.0-20210315143101-93e15499afd5 // indirect
|
|
||||||
github.com/docker/docker v20.10.0-beta1.0.20201113105859-b6bfff2a628f+incompatible
|
github.com/docker/docker v20.10.0-beta1.0.20201113105859-b6bfff2a628f+incompatible
|
||||||
github.com/docker/go-connections v0.4.0
|
|
||||||
github.com/fatedier/frp v0.45.0
|
github.com/fatedier/frp v0.45.0
|
||||||
github.com/gin-gonic/gin v1.6.3
|
github.com/gin-gonic/gin v1.6.3
|
||||||
github.com/go-git/go-git/v5 v5.4.2
|
github.com/go-git/go-git/v5 v5.4.2
|
||||||
github.com/google/uuid v1.3.0
|
github.com/google/uuid v1.3.0
|
||||||
github.com/goombaio/namegenerator v0.0.0-20181006234301-989e774b106e
|
|
||||||
github.com/lithammer/shortuuid v3.0.0+incompatible
|
github.com/lithammer/shortuuid v3.0.0+incompatible
|
||||||
github.com/moby/sys/mount v0.2.0 // indirect
|
|
||||||
github.com/moby/term v0.0.0-20201110203204-bea5bbe245bf // indirect
|
|
||||||
github.com/morikuni/aec v1.0.0 // indirect
|
|
||||||
github.com/otiai10/copy v1.6.0
|
github.com/otiai10/copy v1.6.0
|
||||||
github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2
|
github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2
|
||||||
github.com/shirou/gopsutil/v3 v3.22.10
|
github.com/shirou/gopsutil/v3 v3.22.10
|
||||||
github.com/spf13/viper v1.7.0
|
|
||||||
github.com/urfave/cli/v2 v2.3.0
|
github.com/urfave/cli/v2 v2.3.0
|
||||||
gitlab.com/NebulousLabs/fastrand v0.0.0-20181126182046-603482d69e40 // indirect
|
|
||||||
gitlab.com/NebulousLabs/go-upnp v0.0.0-20181011194642-3a71999ed0d3
|
gitlab.com/NebulousLabs/go-upnp v0.0.0-20181011194642-3a71999ed0d3
|
||||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4
|
golang.org/x/crypto v0.16.0
|
||||||
gopkg.in/yaml.v2 v2.4.0
|
gopkg.in/yaml.v2 v2.4.0
|
||||||
|
)
|
||||||
|
|
||||||
|
require (
|
||||||
|
github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c // indirect
|
||||||
|
github.com/Microsoft/go-winio v0.4.17-0.20210211115548-6eac466e5fa3 // indirect
|
||||||
|
github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 // indirect
|
||||||
|
github.com/acomagu/bufpipe v1.0.3 // indirect
|
||||||
|
github.com/apenella/go-common-utils v0.1.1 // indirect
|
||||||
|
github.com/apenella/go-common-utils/error v0.0.0-20200917063805-34b0ed3c4ce1 // indirect
|
||||||
|
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 // indirect
|
||||||
|
github.com/beorn7/perks v1.0.1 // indirect
|
||||||
|
github.com/cespare/xxhash/v2 v2.1.2 // indirect
|
||||||
|
github.com/containerd/containerd v1.5.0-beta.1 // indirect
|
||||||
|
github.com/coreos/go-oidc v2.2.1+incompatible // indirect
|
||||||
|
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
|
||||||
|
github.com/docker/distribution v2.7.1+incompatible // indirect
|
||||||
|
github.com/docker/go-connections v0.4.0 // indirect
|
||||||
|
github.com/docker/go-units v0.4.0 // indirect
|
||||||
|
github.com/emirpasic/gods v1.12.0 // indirect
|
||||||
|
github.com/fatedier/beego v0.0.0-20171024143340-6c6a4f5bd5eb // indirect
|
||||||
|
github.com/fatedier/golib v0.1.1-0.20220321042308-c306138b83ac // indirect
|
||||||
|
github.com/fatedier/kcp-go v2.0.4-0.20190803094908-fe8645b0a904+incompatible // indirect
|
||||||
|
github.com/gin-contrib/sse v0.1.0 // indirect
|
||||||
|
github.com/go-git/gcfg v1.5.0 // indirect
|
||||||
|
github.com/go-git/go-billy/v5 v5.3.1 // indirect
|
||||||
|
github.com/go-ole/go-ole v1.2.6 // indirect
|
||||||
|
github.com/go-playground/locales v0.14.0 // indirect
|
||||||
|
github.com/go-playground/universal-translator v0.18.0 // indirect
|
||||||
|
github.com/go-playground/validator/v10 v10.11.0 // indirect
|
||||||
|
github.com/gogo/protobuf v1.3.2 // indirect
|
||||||
|
github.com/golang/protobuf v1.5.2 // indirect
|
||||||
|
github.com/golang/snappy v0.0.1 // indirect
|
||||||
|
github.com/gorilla/mux v1.8.0 // indirect
|
||||||
|
github.com/hashicorp/yamux v0.1.1 // indirect
|
||||||
|
github.com/imdario/mergo v0.3.12 // indirect
|
||||||
|
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
|
||||||
|
github.com/json-iterator/go v1.1.12 // indirect
|
||||||
|
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect
|
||||||
|
github.com/klauspost/cpuid/v2 v2.0.6 // indirect
|
||||||
|
github.com/klauspost/reedsolomon v1.9.15 // indirect
|
||||||
|
github.com/leodido/go-urn v1.2.1 // indirect
|
||||||
|
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
|
||||||
|
github.com/mattn/go-isatty v0.0.12 // indirect
|
||||||
|
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
|
||||||
|
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
||||||
|
github.com/moby/term v0.0.0-20201110203204-bea5bbe245bf // indirect
|
||||||
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||||
|
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||||
|
github.com/morikuni/aec v1.0.0 // indirect
|
||||||
|
github.com/opencontainers/go-digest v1.0.0 // indirect
|
||||||
|
github.com/opencontainers/image-spec v1.0.1 // indirect
|
||||||
|
github.com/pires/go-proxyproto v0.6.2 // indirect
|
||||||
|
github.com/pkg/errors v0.9.1 // indirect
|
||||||
|
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
|
||||||
|
github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 // indirect
|
||||||
|
github.com/prometheus/client_golang v1.13.0 // indirect
|
||||||
|
github.com/prometheus/client_model v0.2.0 // indirect
|
||||||
|
github.com/prometheus/common v0.37.0 // indirect
|
||||||
|
github.com/prometheus/procfs v0.8.0 // indirect
|
||||||
|
github.com/russross/blackfriday/v2 v2.0.1 // indirect
|
||||||
|
github.com/sergi/go-diff v1.1.0 // indirect
|
||||||
|
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
|
||||||
|
github.com/sirupsen/logrus v1.7.0 // indirect
|
||||||
|
github.com/templexxx/cpufeat v0.0.0-20180724012125-cef66df7f161 // indirect
|
||||||
|
github.com/templexxx/xor v0.0.0-20191217153810-f85b25db303b // indirect
|
||||||
|
github.com/tjfoc/gmsm v1.4.1 // indirect
|
||||||
|
github.com/tklauser/go-sysconf v0.3.10 // indirect
|
||||||
|
github.com/tklauser/numcpus v0.4.0 // indirect
|
||||||
|
github.com/ugorji/go/codec v1.1.7 // indirect
|
||||||
|
github.com/xanzy/ssh-agent v0.3.0 // indirect
|
||||||
|
github.com/yusufpapurcu/wmi v1.2.2 // indirect
|
||||||
|
gitlab.com/NebulousLabs/fastrand v0.0.0-20181126182046-603482d69e40 // indirect
|
||||||
|
golang.org/x/net v0.10.0 // indirect
|
||||||
|
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect
|
||||||
|
golang.org/x/sys v0.15.0 // indirect
|
||||||
|
golang.org/x/text v0.14.0 // indirect
|
||||||
|
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
|
||||||
|
google.golang.org/appengine v1.6.7 // indirect
|
||||||
|
google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a // indirect
|
||||||
|
google.golang.org/grpc v1.31.0 // indirect
|
||||||
|
google.golang.org/protobuf v1.28.1 // indirect
|
||||||
|
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||||
|
gopkg.in/square/go-jose.v2 v2.4.1 // indirect
|
||||||
|
gopkg.in/warnings.v0 v0.1.2 // indirect
|
||||||
gotest.tools/v3 v3.0.3 // indirect
|
gotest.tools/v3 v3.0.3 // indirect
|
||||||
)
|
)
|
||||||
|
|||||||
322
go.sum
322
go.sum
@@ -14,18 +14,6 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV
|
|||||||
cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=
|
cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=
|
||||||
cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=
|
cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=
|
||||||
cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=
|
cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=
|
||||||
cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI=
|
|
||||||
cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk=
|
|
||||||
cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg=
|
|
||||||
cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8=
|
|
||||||
cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0=
|
|
||||||
cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY=
|
|
||||||
cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM=
|
|
||||||
cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY=
|
|
||||||
cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ=
|
|
||||||
cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI=
|
|
||||||
cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4=
|
|
||||||
cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc=
|
|
||||||
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
|
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
|
||||||
cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
|
cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
|
||||||
cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
|
cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
|
||||||
@@ -34,7 +22,6 @@ cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4g
|
|||||||
cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
|
cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
|
||||||
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
|
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
|
||||||
cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
|
cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
|
||||||
cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk=
|
|
||||||
cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
|
cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
|
||||||
cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
|
cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
|
||||||
cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
|
cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
|
||||||
@@ -51,21 +38,15 @@ github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX
|
|||||||
github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
|
github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
|
||||||
github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
|
github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
|
||||||
github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw=
|
github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw=
|
||||||
github.com/Azure/go-autorest/autorest v0.11.27/go.mod h1:7l8ybrIdUmGqZMTD0sRtAr8NvbHjfofbf8RSP2q7w7U=
|
|
||||||
github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg=
|
github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg=
|
||||||
github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A=
|
github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A=
|
||||||
github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ=
|
|
||||||
github.com/Azure/go-autorest/autorest/adal v0.9.20/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ=
|
|
||||||
github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74=
|
github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74=
|
||||||
github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=
|
github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=
|
||||||
github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=
|
github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=
|
||||||
github.com/Azure/go-autorest/autorest/mocks v0.4.2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU=
|
|
||||||
github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8=
|
github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8=
|
||||||
github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8=
|
|
||||||
github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU=
|
github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU=
|
||||||
github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c h1:/IBSNwUN8+eKzUzbJPqhK839ygXJ82sde8x3ogr6R28=
|
github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c h1:/IBSNwUN8+eKzUzbJPqhK839ygXJ82sde8x3ogr6R28=
|
||||||
github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU=
|
github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU=
|
||||||
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
|
|
||||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||||
github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA=
|
github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA=
|
||||||
@@ -80,8 +61,6 @@ github.com/Microsoft/hcsshim v0.8.7-0.20190325164909-8abdbb8205e4/go.mod h1:Op3h
|
|||||||
github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ=
|
github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ=
|
||||||
github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8=
|
github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8=
|
||||||
github.com/Microsoft/hcsshim v0.8.14/go.mod h1:NtVKoYxQuTLx6gEq0L96c9Ju4JbRJ4nY2ow3VK6a9Lg=
|
github.com/Microsoft/hcsshim v0.8.14/go.mod h1:NtVKoYxQuTLx6gEq0L96c9Ju4JbRJ4nY2ow3VK6a9Lg=
|
||||||
github.com/Microsoft/hcsshim v0.8.15 h1:Aof83YILRs2Vx3GhHqlvvfyx1asRJKMFIMeVlHsZKtI=
|
|
||||||
github.com/Microsoft/hcsshim v0.8.15/go.mod h1:x38A4YbHbdxJtc0sF6oIz+RG0npwSCAvn69iY6URG00=
|
|
||||||
github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5hlzMzRKMLyo42nCZ9oml8AdTlq/0cvIaBv6tK1RehU=
|
github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5hlzMzRKMLyo42nCZ9oml8AdTlq/0cvIaBv6tK1RehU=
|
||||||
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
|
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
|
||||||
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
|
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
|
||||||
@@ -100,17 +79,13 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk5
|
|||||||
github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0=
|
github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0=
|
||||||
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA=
|
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA=
|
||||||
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=
|
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=
|
||||||
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
|
|
||||||
github.com/apenella/go-ansible v1.1.0 h1:wWqaZBvoDxPjvtwXc2fXbDj546uBj/Kv2PL7PW82EfY=
|
github.com/apenella/go-ansible v1.1.0 h1:wWqaZBvoDxPjvtwXc2fXbDj546uBj/Kv2PL7PW82EfY=
|
||||||
github.com/apenella/go-ansible v1.1.0/go.mod h1:tHqFBSwWXF9k2hkLQWfq6oxMQZHslySQqttkA2siyqE=
|
github.com/apenella/go-ansible v1.1.0/go.mod h1:tHqFBSwWXF9k2hkLQWfq6oxMQZHslySQqttkA2siyqE=
|
||||||
github.com/apenella/go-common-utils v0.1.1 h1:dJA2tY22z6mYB5a+EogfiS7NxZsR/Ld3TWnZcS3JPa0=
|
github.com/apenella/go-common-utils v0.1.1 h1:dJA2tY22z6mYB5a+EogfiS7NxZsR/Ld3TWnZcS3JPa0=
|
||||||
github.com/apenella/go-common-utils v0.1.1/go.mod h1:E7RUbl9B1vdLkTIapoTE2W6pIgW7dTSJOxL3pf4gV6g=
|
github.com/apenella/go-common-utils v0.1.1/go.mod h1:E7RUbl9B1vdLkTIapoTE2W6pIgW7dTSJOxL3pf4gV6g=
|
||||||
github.com/apenella/go-common-utils/error v0.0.0-20200917063805-34b0ed3c4ce1 h1:lw/fwF65AaJVxyUTJShtBiZfaiafKde3QkR4im1glzQ=
|
github.com/apenella/go-common-utils/error v0.0.0-20200917063805-34b0ed3c4ce1 h1:lw/fwF65AaJVxyUTJShtBiZfaiafKde3QkR4im1glzQ=
|
||||||
github.com/apenella/go-common-utils/error v0.0.0-20200917063805-34b0ed3c4ce1/go.mod h1:Hj3S/BcSHKfv9VDMcrY7lsm9hGnb7cd70alSkl/Sv+4=
|
github.com/apenella/go-common-utils/error v0.0.0-20200917063805-34b0ed3c4ce1/go.mod h1:Hj3S/BcSHKfv9VDMcrY7lsm9hGnb7cd70alSkl/Sv+4=
|
||||||
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
|
|
||||||
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
|
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
|
||||||
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
|
|
||||||
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
|
|
||||||
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
|
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
|
||||||
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
|
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
|
||||||
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
|
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
|
||||||
@@ -122,7 +97,6 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
|||||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
||||||
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
|
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
|
||||||
github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA=
|
github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA=
|
||||||
github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84=
|
|
||||||
github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
|
github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
|
||||||
github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
|
github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
|
||||||
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4=
|
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4=
|
||||||
@@ -132,7 +106,6 @@ github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8n
|
|||||||
github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50=
|
github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50=
|
||||||
github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE=
|
github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE=
|
||||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||||
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
|
|
||||||
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
|
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
|
||||||
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||||
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
|
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
|
||||||
@@ -146,9 +119,6 @@ github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLI
|
|||||||
github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs=
|
github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs=
|
||||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||||
github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
|
||||||
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
|
||||||
github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
|
||||||
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
|
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
|
||||||
github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE=
|
github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE=
|
||||||
github.com/containerd/btrfs v0.0.0-20201111183144-404b9149801e/go.mod h1:jg2QkJcsabfHugurUvvPhS3E08Oxiuh5W/g1ybB4e0E=
|
github.com/containerd/btrfs v0.0.0-20201111183144-404b9149801e/go.mod h1:jg2QkJcsabfHugurUvvPhS3E08Oxiuh5W/g1ybB4e0E=
|
||||||
@@ -156,7 +126,6 @@ github.com/containerd/cgroups v0.0.0-20190717030353-c4b9ac5c7601/go.mod h1:X9rLE
|
|||||||
github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko=
|
github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko=
|
||||||
github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59/go.mod h1:pA0z1pT8KYB3TCXK/ocprsh7MAkoW8bZVzPdih9snmM=
|
github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59/go.mod h1:pA0z1pT8KYB3TCXK/ocprsh7MAkoW8bZVzPdih9snmM=
|
||||||
github.com/containerd/cgroups v0.0.0-20200710171044-318312a37340/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo=
|
github.com/containerd/cgroups v0.0.0-20200710171044-318312a37340/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo=
|
||||||
github.com/containerd/cgroups v0.0.0-20200824123100-0b889c03f102 h1:Qf4HiqfvmB7zS6scsmNgTLmByHbq8n9RTF39v+TzP7A=
|
|
||||||
github.com/containerd/cgroups v0.0.0-20200824123100-0b889c03f102/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo=
|
github.com/containerd/cgroups v0.0.0-20200824123100-0b889c03f102/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo=
|
||||||
github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw=
|
github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw=
|
||||||
github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw=
|
github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw=
|
||||||
@@ -175,8 +144,6 @@ github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL
|
|||||||
github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
|
github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
|
||||||
github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe/go.mod h1:cECdGN1O8G9bgKTlLhuPJimka6Xb/Gg7vYzCTNVxhvo=
|
github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe/go.mod h1:cECdGN1O8G9bgKTlLhuPJimka6Xb/Gg7vYzCTNVxhvo=
|
||||||
github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7/go.mod h1:kR3BEg7bDFaEddKm54WSmrol1fKWDU1nKYkgrcgZT7Y=
|
github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7/go.mod h1:kR3BEg7bDFaEddKm54WSmrol1fKWDU1nKYkgrcgZT7Y=
|
||||||
github.com/containerd/continuity v0.0.0-20210315143101-93e15499afd5 h1:k6Dn7shF+i1q4utvCyW4+o9REsCMAeRyORM5IhXMCnw=
|
|
||||||
github.com/containerd/continuity v0.0.0-20210315143101-93e15499afd5/go.mod h1:ICJu0PwR54nI0yPEnJ6jcS+J7CZAUXrLh8lPo2knzsM=
|
|
||||||
github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI=
|
github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI=
|
||||||
github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI=
|
github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI=
|
||||||
github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0=
|
github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0=
|
||||||
@@ -202,7 +169,6 @@ github.com/containernetworking/plugins v0.8.6/go.mod h1:qnw5mN19D8fIwkqW7oHHYDHV
|
|||||||
github.com/containers/ocicrypt v1.0.1/go.mod h1:MeJDzk1RJHv89LjsH0Sp5KTY3ZYkjXO/C+bKAeWFIrc=
|
github.com/containers/ocicrypt v1.0.1/go.mod h1:MeJDzk1RJHv89LjsH0Sp5KTY3ZYkjXO/C+bKAeWFIrc=
|
||||||
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
|
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
|
||||||
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||||
github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
|
||||||
github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU=
|
github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU=
|
||||||
github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc=
|
github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc=
|
||||||
github.com/coreos/go-oidc v2.2.1+incompatible h1:mh48q/BqXqgjVHpy2ZY7WnWAbenxRjsz9N1i1YxjHAk=
|
github.com/coreos/go-oidc v2.2.1+incompatible h1:mh48q/BqXqgjVHpy2ZY7WnWAbenxRjsz9N1i1YxjHAk=
|
||||||
@@ -221,7 +187,6 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng
|
|||||||
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
||||||
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
|
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
|
||||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||||
github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw=
|
|
||||||
github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||||
github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4=
|
github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4=
|
||||||
github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ=
|
github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ=
|
||||||
@@ -258,19 +223,13 @@ github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25Kn
|
|||||||
github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
|
github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
|
||||||
github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
|
github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
|
||||||
github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
|
github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
|
||||||
github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
|
|
||||||
github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg=
|
github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg=
|
||||||
github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o=
|
github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o=
|
||||||
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||||
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
||||||
github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=
|
|
||||||
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
|
|
||||||
github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
|
|
||||||
github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ=
|
|
||||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||||
github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
|
github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
|
||||||
github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
|
|
||||||
github.com/fatedier/beego v0.0.0-20171024143340-6c6a4f5bd5eb h1:wCrNShQidLmvVWn/0PikGmpdP0vtQmnvyRg3ZBEhczw=
|
github.com/fatedier/beego v0.0.0-20171024143340-6c6a4f5bd5eb h1:wCrNShQidLmvVWn/0PikGmpdP0vtQmnvyRg3ZBEhczw=
|
||||||
github.com/fatedier/beego v0.0.0-20171024143340-6c6a4f5bd5eb/go.mod h1:wx3gB6dbIfBRcucp94PI9Bt3I0F2c/MyNEWuhzpWiwk=
|
github.com/fatedier/beego v0.0.0-20171024143340-6c6a4f5bd5eb/go.mod h1:wx3gB6dbIfBRcucp94PI9Bt3I0F2c/MyNEWuhzpWiwk=
|
||||||
github.com/fatedier/frp v0.45.0 h1:QH3P4DFsHInsLWMT2vCiGZg5MrdJ5TDcVmarcol7u6A=
|
github.com/fatedier/frp v0.45.0 h1:QH3P4DFsHInsLWMT2vCiGZg5MrdJ5TDcVmarcol7u6A=
|
||||||
@@ -281,15 +240,12 @@ github.com/fatedier/kcp-go v2.0.4-0.20190803094908-fe8645b0a904+incompatible h1:
|
|||||||
github.com/fatedier/kcp-go v2.0.4-0.20190803094908-fe8645b0a904+incompatible/go.mod h1:YpCOaxj7vvMThhIQ9AfTOPW2sfztQR5WDfs7AflSy4s=
|
github.com/fatedier/kcp-go v2.0.4-0.20190803094908-fe8645b0a904+incompatible/go.mod h1:YpCOaxj7vvMThhIQ9AfTOPW2sfztQR5WDfs7AflSy4s=
|
||||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||||
github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
|
github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
|
||||||
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BHsljHzVlRcyQhjrss6TZTdY2VfCqZPbv5k3iBFa2ZQ=
|
|
||||||
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
|
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
|
||||||
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
|
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
|
||||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||||
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
|
|
||||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||||
github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA=
|
github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA=
|
||||||
github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY=
|
github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY=
|
||||||
github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg=
|
|
||||||
github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||||
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
|
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
|
||||||
@@ -321,20 +277,15 @@ github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG
|
|||||||
github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
|
github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
|
||||||
github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
|
github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
|
||||||
github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
|
github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
|
||||||
github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
|
||||||
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
|
||||||
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
|
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
|
||||||
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
|
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
|
||||||
github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg=
|
github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg=
|
||||||
github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
|
github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
|
||||||
github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
|
|
||||||
github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc=
|
github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc=
|
||||||
github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8=
|
github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8=
|
||||||
github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg=
|
|
||||||
github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo=
|
github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo=
|
||||||
github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
|
github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
|
||||||
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
|
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
|
||||||
github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ=
|
|
||||||
github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A=
|
github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A=
|
||||||
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
|
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
|
||||||
github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
|
github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
|
||||||
@@ -347,7 +298,6 @@ github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GO
|
|||||||
github.com/go-playground/validator/v10 v10.11.0 h1:0W+xRM511GY47Yy3bZUbJVitCNg2BOGlCyvTqsp/xIw=
|
github.com/go-playground/validator/v10 v10.11.0 h1:0W+xRM511GY47Yy3bZUbJVitCNg2BOGlCyvTqsp/xIw=
|
||||||
github.com/go-playground/validator/v10 v10.11.0/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU=
|
github.com/go-playground/validator/v10 v10.11.0/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU=
|
||||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
|
||||||
github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw=
|
github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw=
|
||||||
github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw=
|
github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw=
|
||||||
github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4=
|
github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4=
|
||||||
@@ -361,16 +311,12 @@ github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXP
|
|||||||
github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
|
github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
|
||||||
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
||||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
||||||
github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
|
|
||||||
github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
|
|
||||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||||
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||||
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||||
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||||
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||||
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
|
|
||||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
|
||||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||||
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||||
github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
|
github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
|
||||||
@@ -378,8 +324,6 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt
|
|||||||
github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
|
github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
|
||||||
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
|
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
|
||||||
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
|
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
|
||||||
github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=
|
|
||||||
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
|
|
||||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||||
@@ -395,16 +339,12 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD
|
|||||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||||
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||||
github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=
|
|
||||||
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
|
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
|
||||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||||
|
github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
|
||||||
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||||
github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA=
|
|
||||||
github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
|
||||||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||||
github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA=
|
|
||||||
github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ=
|
|
||||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||||
@@ -413,19 +353,15 @@ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
|
|||||||
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||||
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||||
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||||
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
|
||||||
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||||
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||||
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
|
||||||
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
||||||
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||||
github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||||
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
|
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
|
||||||
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
|
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
|
||||||
github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
|
|
||||||
github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk=
|
|
||||||
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||||
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||||
github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||||
@@ -433,14 +369,6 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf
|
|||||||
github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||||
github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||||
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||||
github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
|
||||||
github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
|
||||||
github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
|
||||||
github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
|
||||||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
|
||||||
github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
|
||||||
github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
|
||||||
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
|
||||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||||
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||||
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||||
@@ -449,10 +377,7 @@ github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
|||||||
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||||
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
||||||
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
||||||
github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0=
|
|
||||||
github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg=
|
github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg=
|
||||||
github.com/goombaio/namegenerator v0.0.0-20181006234301-989e774b106e h1:XmA6L9IPRdUr28a+SK/oMchGgQy159wvzXA5tJ7l+40=
|
|
||||||
github.com/goombaio/namegenerator v0.0.0-20181006234301-989e774b106e/go.mod h1:AFIo+02s+12CEg8Gzz9kzhCbmbq6JcKNrhHffCGA9z4=
|
|
||||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
||||||
github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ=
|
github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ=
|
||||||
github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
|
github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
|
||||||
@@ -461,44 +386,24 @@ github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB7
|
|||||||
github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
|
github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
|
||||||
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
|
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
|
||||||
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||||
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
|
||||||
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
|
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
|
||||||
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
|
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
|
||||||
github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
|
github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
|
||||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
|
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
|
||||||
github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
|
github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
|
||||||
github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
|
github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
|
||||||
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
|
|
||||||
github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q=
|
|
||||||
github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
|
|
||||||
github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||||
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
|
|
||||||
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
|
|
||||||
github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
|
|
||||||
github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I=
|
github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I=
|
||||||
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
|
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
|
||||||
github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=
|
|
||||||
github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
|
|
||||||
github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
|
|
||||||
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
|
||||||
github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
|
||||||
github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=
|
|
||||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||||
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
|
|
||||||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
||||||
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
|
|
||||||
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
|
|
||||||
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
|
|
||||||
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
|
|
||||||
github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE=
|
github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE=
|
||||||
github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ=
|
github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ=
|
||||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||||
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
|
||||||
github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
|
github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
|
||||||
github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
|
|
||||||
github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
|
github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
|
||||||
github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
|
github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
|
||||||
github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU=
|
github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU=
|
||||||
@@ -511,7 +416,6 @@ github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c
|
|||||||
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
|
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
|
||||||
github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
|
github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
|
||||||
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
|
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
|
||||||
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
|
|
||||||
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
|
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
|
||||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||||
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||||
@@ -558,44 +462,27 @@ github.com/lithammer/shortuuid v3.0.0+incompatible/go.mod h1:FR74pbAuElzOUuenUHT
|
|||||||
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=
|
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=
|
||||||
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
|
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
|
||||||
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
||||||
github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4=
|
|
||||||
github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
|
||||||
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||||
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||||
github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs=
|
github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs=
|
||||||
github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
|
|
||||||
github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho=
|
github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho=
|
||||||
github.com/matryer/is v1.2.0 h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A=
|
github.com/matryer/is v1.2.0 h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A=
|
||||||
github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA=
|
github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA=
|
||||||
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
||||||
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||||
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
|
||||||
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||||
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
|
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
|
||||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||||
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
||||||
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
|
||||||
github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o=
|
github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o=
|
||||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||||
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI=
|
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI=
|
||||||
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
|
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
|
||||||
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
|
||||||
github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4=
|
github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4=
|
||||||
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
|
|
||||||
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
|
||||||
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
|
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
|
||||||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||||
github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
|
|
||||||
github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
|
|
||||||
github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
|
|
||||||
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
|
||||||
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
|
|
||||||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||||
github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A=
|
github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A=
|
||||||
github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c=
|
|
||||||
github.com/moby/sys/mount v0.2.0 h1:WhCW5B355jtxndN5ovugJlMFJawbUODuW8fSnEH6SSM=
|
|
||||||
github.com/moby/sys/mount v0.2.0/go.mod h1:aAivFE2LB3W4bACsUXChRHQ0qKWsetY4Y9V7sxOougM=
|
|
||||||
github.com/moby/sys/mountinfo v0.4.0 h1:1KInV3Huv18akCu58V7lzNlt+jFmqlu1EaErnEHE/VM=
|
|
||||||
github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A=
|
github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A=
|
||||||
github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ=
|
github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ=
|
||||||
github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo=
|
github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo=
|
||||||
@@ -618,8 +505,6 @@ github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRW
|
|||||||
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
|
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
|
||||||
github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM=
|
github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM=
|
||||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
|
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
|
||||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
|
||||||
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
|
|
||||||
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
|
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
|
||||||
github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
|
github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
|
||||||
github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||||
@@ -628,20 +513,10 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W
|
|||||||
github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||||
github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||||
github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
|
||||||
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
|
|
||||||
github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
|
|
||||||
github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU=
|
|
||||||
github.com/onsi/ginkgo/v2 v2.1.6/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7AG4VIk=
|
|
||||||
github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
|
github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
|
||||||
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
|
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
|
||||||
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
|
||||||
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
|
|
||||||
github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro=
|
|
||||||
github.com/onsi/gomega v1.20.1/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo=
|
|
||||||
github.com/onsi/gomega v1.20.2/go.mod h1:iYAIXgPSaDHak0LCMA+AWBpIKBr8WZicMxnE8luStNc=
|
|
||||||
github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
|
github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
|
||||||
github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
|
github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
|
||||||
github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
|
github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
|
||||||
@@ -655,7 +530,6 @@ github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5X
|
|||||||
github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
|
github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
|
||||||
github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
|
github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
|
||||||
github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
|
github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
|
||||||
github.com/opencontainers/runc v1.0.0-rc93 h1:x2UMpOOVf3kQ8arv/EsDGwim8PTNqzL1/EYDr/+scOM=
|
|
||||||
github.com/opencontainers/runc v1.0.0-rc93/go.mod h1:3NOsor4w32B2tC0Zbl8Knk4Wg84SM2ImC1fxBuqJ/H0=
|
github.com/opencontainers/runc v1.0.0-rc93/go.mod h1:3NOsor4w32B2tC0Zbl8Knk4Wg84SM2ImC1fxBuqJ/H0=
|
||||||
github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
|
github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
|
||||||
github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
|
github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
|
||||||
@@ -668,13 +542,10 @@ github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3
|
|||||||
github.com/otiai10/copy v1.6.0 h1:IinKAryFFuPONZ7cm6T6E2QX/vcJwSnlaA5lfoaXIiQ=
|
github.com/otiai10/copy v1.6.0 h1:IinKAryFFuPONZ7cm6T6E2QX/vcJwSnlaA5lfoaXIiQ=
|
||||||
github.com/otiai10/copy v1.6.0/go.mod h1:XWfuS3CrI0R6IE0FbgHsEazaXO8G0LpMp9o8tos0x4E=
|
github.com/otiai10/copy v1.6.0/go.mod h1:XWfuS3CrI0R6IE0FbgHsEazaXO8G0LpMp9o8tos0x4E=
|
||||||
github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE=
|
github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE=
|
||||||
github.com/otiai10/curr v1.0.0 h1:TJIWdbX0B+kpNagQrjgq8bCMrbhiuX73M2XwgtDMoOI=
|
|
||||||
github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs=
|
github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs=
|
||||||
github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo=
|
github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo=
|
||||||
github.com/otiai10/mint v1.3.2 h1:VYWnrP5fXmz1MXvjuUvcBrXSjGE6xjON+axB/UrpO3E=
|
github.com/otiai10/mint v1.3.2 h1:VYWnrP5fXmz1MXvjuUvcBrXSjGE6xjON+axB/UrpO3E=
|
||||||
github.com/otiai10/mint v1.3.2/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc=
|
github.com/otiai10/mint v1.3.2/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc=
|
||||||
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
|
|
||||||
github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc=
|
|
||||||
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
|
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
|
||||||
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
|
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
|
||||||
github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2 h1:JhzVVoYvbOACxoUmOs6V/G4D5nPVUW73rKvXxP4XUJc=
|
github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2 h1:JhzVVoYvbOACxoUmOs6V/G4D5nPVUW73rKvXxP4XUJc=
|
||||||
@@ -689,7 +560,6 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
|||||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
|
|
||||||
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw=
|
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw=
|
||||||
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
|
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
|
||||||
github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA=
|
github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA=
|
||||||
@@ -736,19 +606,15 @@ github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1
|
|||||||
github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo=
|
github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo=
|
||||||
github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4=
|
github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4=
|
||||||
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
|
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
|
||||||
github.com/rodaine/table v1.0.1/go.mod h1:UVEtfBsflpeEcD56nF4F5AocNFta0ZuolpSVdPtlmP4=
|
|
||||||
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
|
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
|
||||||
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
|
|
||||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||||
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
||||||
github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8=
|
github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8=
|
||||||
github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE=
|
github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE=
|
||||||
github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
|
github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
|
||||||
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||||
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
|
||||||
github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4=
|
github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4=
|
||||||
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
||||||
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
|
|
||||||
github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo=
|
github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo=
|
||||||
github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
|
github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
|
||||||
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
|
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
|
||||||
@@ -766,30 +632,21 @@ github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM
|
|||||||
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
|
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
|
||||||
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
|
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
|
||||||
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
|
|
||||||
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
|
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
|
||||||
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
||||||
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
|
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
|
||||||
github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc=
|
|
||||||
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
|
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
|
||||||
github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8=
|
|
||||||
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
|
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
|
||||||
github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
|
github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
|
||||||
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
|
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
|
||||||
github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE=
|
github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE=
|
||||||
github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo=
|
|
||||||
github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk=
|
|
||||||
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
|
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
|
||||||
github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||||
github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||||
github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||||
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
|
||||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||||
github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE=
|
github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE=
|
||||||
github.com/spf13/viper v1.7.0 h1:xVKxvI7ouOI5I+U9s2eeiUfMaWBVoXA3AWskkrqK0VM=
|
|
||||||
github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
|
|
||||||
github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8=
|
|
||||||
github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
@@ -800,15 +657,12 @@ github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRci
|
|||||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
|
||||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||||
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
|
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
|
||||||
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||||
github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
|
|
||||||
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
|
|
||||||
github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
|
github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
|
||||||
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
|
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
|
||||||
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
|
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
|
||||||
@@ -826,14 +680,12 @@ github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hM
|
|||||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
|
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
|
||||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
|
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
|
||||||
github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
|
github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
|
||||||
github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo=
|
|
||||||
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
|
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
|
||||||
github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs=
|
github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs=
|
||||||
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
|
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
|
||||||
github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
|
github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
|
||||||
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
|
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
|
||||||
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
|
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
|
||||||
github.com/urfave/cli v1.22.2 h1:gsqYFH8bb9ekPA12kRo0hfjngWQjkJPlN9R0N78BoUo=
|
|
||||||
github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
|
github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
|
||||||
github.com/urfave/cli/v2 v2.3.0 h1:qph92Y649prgesehzOrQjdWyxFOp/QVM+6imKHad91M=
|
github.com/urfave/cli/v2 v2.3.0 h1:qph92Y649prgesehzOrQjdWyxFOp/QVM+6imKHad91M=
|
||||||
github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI=
|
github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI=
|
||||||
@@ -851,14 +703,10 @@ github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf
|
|||||||
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
|
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
|
||||||
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
|
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
|
||||||
github.com/xtaci/lossyconn v0.0.0-20200209145036-adba10fffc37 h1:EWU6Pktpas0n8lLQwDsRyZfmkPeRbdgPtW609es+/9E=
|
github.com/xtaci/lossyconn v0.0.0-20200209145036-adba10fffc37 h1:EWU6Pktpas0n8lLQwDsRyZfmkPeRbdgPtW609es+/9E=
|
||||||
github.com/xtaci/lossyconn v0.0.0-20200209145036-adba10fffc37/go.mod h1:HpMP7DB2CyokmAh4lp0EQnnWhmycP/TvwBGzvuie+H0=
|
|
||||||
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||||
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||||
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
|
||||||
github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
|
||||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
|
||||||
github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg=
|
github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg=
|
||||||
github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
|
github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
|
||||||
github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs=
|
github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs=
|
||||||
@@ -877,10 +725,6 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
|
|||||||
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||||
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||||
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||||
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
|
|
||||||
go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M=
|
|
||||||
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
|
|
||||||
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
|
|
||||||
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||||
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||||
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
|
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
|
||||||
@@ -888,7 +732,6 @@ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
|||||||
golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||||
golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||||
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
|
||||||
golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||||
@@ -901,10 +744,9 @@ golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPh
|
|||||||
golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||||
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
|
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
|
||||||
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
|
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
|
||||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
|
||||||
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||||
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd h1:XcWmESyNjXJMLahc3mqVQJcgSTDxFxhETVlfk9uGc38=
|
golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY=
|
||||||
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
|
||||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||||
@@ -927,8 +769,6 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl
|
|||||||
golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
|
golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
|
||||||
golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
||||||
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
||||||
golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
|
||||||
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
|
||||||
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
|
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
|
||||||
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
|
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
|
||||||
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
|
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
|
||||||
@@ -937,19 +777,11 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB
|
|||||||
golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
||||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||||
golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
|
||||||
golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
|
||||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
|
||||||
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY=
|
|
||||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s=
|
|
||||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
|
||||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
|
||||||
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
|
||||||
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
@@ -977,48 +809,28 @@ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/
|
|||||||
golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||||
golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||||
golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||||
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
|
||||||
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||||
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||||
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||||
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||||
golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||||
golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
|
||||||
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||||
golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
|
||||||
golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||||
golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
|
||||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||||
golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=
|
|
||||||
golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k=
|
golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k=
|
||||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
|
||||||
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
|
||||||
golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
|
||||||
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||||
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
|
||||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||||
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||||
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||||
golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M=
|
||||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0=
|
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
||||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
|
||||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
|
||||||
golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
|
||||||
golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
|
||||||
golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
|
||||||
golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
|
||||||
golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
|
||||||
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||||
golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
|
||||||
golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
|
||||||
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
|
||||||
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
|
||||||
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b h1:clP8eMhB30EHdc0bd2Twtq6kgU7yl5ub2cQLSdrv1Dg=
|
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b h1:clP8eMhB30EHdc0bd2Twtq6kgU7yl5ub2cQLSdrv1Dg=
|
||||||
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
|
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
|
||||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
@@ -1031,15 +843,9 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
|
|||||||
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw=
|
|
||||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
|
||||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
|
||||||
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
@@ -1059,7 +865,6 @@ golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7w
|
|||||||
golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20190812073006-9eafafc0a87e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190812073006-9eafafc0a87e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
@@ -1091,7 +896,6 @@ golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7w
|
|||||||
golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20200922070232-aee5d888a860/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20200922070232-aee5d888a860/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
@@ -1101,50 +905,33 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
|
|||||||
golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20201202213521-69691e467435/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20201202213521-69691e467435/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s=
|
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
|
||||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
|
|
||||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||||
|
golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4=
|
||||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
|
||||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
|
|
||||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||||
|
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
|
||||||
|
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||||
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
@@ -1172,7 +959,6 @@ golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgw
|
|||||||
golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
|
||||||
golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
@@ -1192,7 +978,6 @@ golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjs
|
|||||||
golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
|
golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
|
||||||
golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
|
golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
|
||||||
golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||||
golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
|
||||||
golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||||
golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||||
golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||||
@@ -1200,21 +985,7 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY
|
|||||||
golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||||
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||||
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||||
golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE=
|
|
||||||
golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
|
||||||
golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
|
||||||
golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
|
||||||
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
|
||||||
golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
|
||||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||||
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
|
|
||||||
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
|
||||||
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
|
||||||
golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
|
||||||
golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
|
||||||
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
|
||||||
golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E=
|
|
||||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
@@ -1236,18 +1007,6 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M
|
|||||||
google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
|
google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
|
||||||
google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=
|
google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=
|
||||||
google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=
|
google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=
|
||||||
google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg=
|
|
||||||
google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE=
|
|
||||||
google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8=
|
|
||||||
google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU=
|
|
||||||
google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94=
|
|
||||||
google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo=
|
|
||||||
google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4=
|
|
||||||
google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw=
|
|
||||||
google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU=
|
|
||||||
google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k=
|
|
||||||
google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE=
|
|
||||||
google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI=
|
|
||||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||||
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||||
@@ -1282,41 +1041,14 @@ google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfG
|
|||||||
google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||||
google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||||
google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||||
google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
|
||||||
google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=
|
google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=
|
||||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
||||||
google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
|
google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
|
||||||
google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||||
google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||||
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||||
google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a h1:pOwg4OoaRYScjmR4LlLgdtnyoHYTSAVhhqe5uPdpII8=
|
||||||
google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
|
||||||
google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
|
||||||
google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||||
google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
|
||||||
google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
|
||||||
google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
|
||||||
google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
|
||||||
google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
|
||||||
google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
|
||||||
google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
|
||||||
google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A=
|
|
||||||
google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A=
|
|
||||||
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
|
|
||||||
google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
|
|
||||||
google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
|
|
||||||
google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24=
|
|
||||||
google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k=
|
|
||||||
google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k=
|
|
||||||
google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48=
|
|
||||||
google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48=
|
|
||||||
google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w=
|
|
||||||
google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
|
|
||||||
google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
|
|
||||||
google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
|
|
||||||
google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
|
|
||||||
google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0 h1:5Tbluzus3QxoAJx4IefGt1W0HQZW4nuMrVk684jI74Q=
|
|
||||||
google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
|
|
||||||
google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
|
google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
|
||||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||||
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
|
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
|
||||||
@@ -1332,22 +1064,8 @@ google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8
|
|||||||
google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
|
google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
|
||||||
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
|
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
|
||||||
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
||||||
|
google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI=
|
||||||
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
||||||
google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
|
||||||
google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
|
|
||||||
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
|
|
||||||
google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8=
|
|
||||||
google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
|
||||||
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
|
||||||
google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
|
||||||
google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
|
|
||||||
google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
|
|
||||||
google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
|
|
||||||
google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=
|
|
||||||
google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=
|
|
||||||
google.golang.org/grpc v1.40.0 h1:AGJ0Ih4mHjSeibYkFGh1dD9KJ/eOtZ93I6hoHhukQ5Q=
|
|
||||||
google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
|
|
||||||
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
|
|
||||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||||
@@ -1360,8 +1078,6 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj
|
|||||||
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
||||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||||
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
|
||||||
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
|
||||||
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
|
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
|
||||||
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||||
gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
|
gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
|
||||||
@@ -1378,7 +1094,6 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
|||||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||||
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo=
|
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo=
|
||||||
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
||||||
gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
|
||||||
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
|
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
|
||||||
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
|
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
|
||||||
@@ -1401,11 +1116,9 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|||||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
|
||||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
|
|
||||||
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
|
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
|
||||||
gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk=
|
gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk=
|
||||||
gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0=
|
gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0=
|
||||||
@@ -1418,33 +1131,22 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt
|
|||||||
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||||
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||||
k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo=
|
k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo=
|
||||||
k8s.io/api v0.25.0/go.mod h1:ttceV1GyV1i1rnmvzT3BST08N6nGt+dudGrquzVQWPk=
|
|
||||||
k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU=
|
k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU=
|
||||||
k8s.io/apimachinery v0.25.0/go.mod h1:qMx9eAk0sZQGsXGu86fab8tZdffHbwUfsvzqKn4mfB0=
|
|
||||||
k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU=
|
k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU=
|
||||||
k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y=
|
k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y=
|
||||||
k8s.io/client-go v0.25.0/go.mod h1:lxykvypVfKilxhTklov0wz1FoaUZ8X4EwbhS6rpRfN8=
|
|
||||||
k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk=
|
k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk=
|
||||||
k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM=
|
k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM=
|
||||||
k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI=
|
k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI=
|
||||||
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
|
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
|
||||||
k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
|
|
||||||
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
|
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
|
||||||
k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
|
|
||||||
k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
|
k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
|
||||||
k8s.io/klog/v2 v2.70.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
|
|
||||||
k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM=
|
k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM=
|
||||||
k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1/go.mod h1:C/N6wCaBHeBHkHUesQOQy2/MZqGgMAFPqGsGQLdbZBU=
|
|
||||||
k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk=
|
k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk=
|
||||||
k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||||
k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
|
||||||
k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
|
||||||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
||||||
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
||||||
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
|
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
|
||||||
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg=
|
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg=
|
||||||
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
|
|
||||||
sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
|
sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
|
||||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E=
|
|
||||||
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
|
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
|
||||||
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
|
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
|
||||||
|
|||||||
4
install-binary.bat
Normal file
4
install-binary.bat
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
setx PATH "%PATH%;%cd%"
|
||||||
|
setx P2PRC "%cd%"
|
||||||
|
|
||||||
|
p2p-rendering-computation.exe --dc
|
||||||
8
install-binary.sh
Normal file
8
install-binary.sh
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# This script setups up the project P2PRC
|
||||||
|
echo '# Add the following paths to .bashrc or .zshrc based on the configuration you have set'
|
||||||
|
echo export P2PRC=$PWD
|
||||||
|
echo export PATH=$PWD:\${PATH}
|
||||||
|
export P2PRC=${PWD}
|
||||||
|
export PATH=${PWD}:${PATH}
|
||||||
|
|
||||||
|
./p2p-rendering-computation --dc
|
||||||
31
main.go
31
main.go
@@ -1,20 +1,43 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.sr.ht/~akilan1999/p2p-rendering-computation/cmd"
|
|
||||||
"github.com/urfave/cli/v2"
|
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
|
"os/signal"
|
||||||
|
"syscall"
|
||||||
|
|
||||||
|
"github.com/Akilan1999/p2p-rendering-computation/cmd"
|
||||||
|
"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
|
||||||
var OS, Pull_location ,Run_script string
|
var OS, Pull_location, Run_script string
|
||||||
var List_servers, Ip_table bool
|
var List_servers, Ip_table bool
|
||||||
|
|
||||||
|
// To be implemented later on
|
||||||
|
func getFireSignalsChannel() chan os.Signal {
|
||||||
|
|
||||||
|
c := make(chan os.Signal, 1)
|
||||||
|
signal.Notify(c,
|
||||||
|
// https://www.gnu.org/software/libc/manual/html_node/Termination-Signals.html
|
||||||
|
syscall.SIGTERM, // "the normal way to politely ask a program to terminate"
|
||||||
|
syscall.SIGINT, // Ctrl+C
|
||||||
|
syscall.SIGQUIT, // Ctrl-\
|
||||||
|
syscall.SIGKILL, // "always fatal", "SIGKILL and SIGSTOP may not be caught by a program"
|
||||||
|
syscall.SIGHUP, // "terminal is disconnected"
|
||||||
|
)
|
||||||
|
return c
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func exit() {
|
||||||
|
syscall.Kill(syscall.Getpid(), syscall.SIGTERM)
|
||||||
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
app := cli.NewApp()
|
app := cli.NewApp()
|
||||||
app.Name = "p2p-rendering-computation"
|
app.Name = "p2p-rendering-computation"
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"ip_address": []
|
|
||||||
}
|
|
||||||
@@ -1,165 +1,186 @@
|
|||||||
package frp
|
package frp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"github.com/Akilan1999/p2p-rendering-computation/server/docker"
|
||||||
"git.sr.ht/~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"
|
"math/rand"
|
||||||
"math/rand"
|
"strconv"
|
||||||
"strconv"
|
"time"
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Client This struct stores
|
// Client This struct stores
|
||||||
// client information with server
|
// client information with server
|
||||||
// proxy connected
|
// proxy connected
|
||||||
type Client struct {
|
type Client struct {
|
||||||
Name string
|
Name string
|
||||||
Server *Server
|
Server *Server
|
||||||
ClientMappings []ClientMapping
|
ClientMappings []ClientMapping
|
||||||
}
|
}
|
||||||
|
|
||||||
// ClientMapping Stores client mapping ports
|
// ClientMapping Stores client mapping ports
|
||||||
// to proxy server
|
// to proxy server
|
||||||
type ClientMapping struct {
|
type ClientMapping struct {
|
||||||
LocalIP string
|
LocalIP string
|
||||||
LocalPort int
|
LocalPort int
|
||||||
RemotePort int
|
RemotePort int
|
||||||
}
|
}
|
||||||
|
|
||||||
// StartFRPClientForServer Starts Server using FRP server
|
// StartFRPClientForServer Starts Server using FRP server
|
||||||
// returns back a port
|
// returns back a port
|
||||||
func StartFRPClientForServer(ipaddress string, port string, localport string) (string, error) {
|
// remote port is a custom external port a user would want
|
||||||
// Setup server information
|
// to open. This under the assumption the user knows the
|
||||||
var s Server
|
// exact port available in server doing the TURN connection.
|
||||||
s.address = ipaddress
|
func StartFRPClientForServer(ipaddress string, port string, localport string, remoteport string) (string, error) {
|
||||||
// convert port to int
|
// Setup server information
|
||||||
portInt, err := strconv.Atoi(port)
|
var s Server
|
||||||
if err != nil {
|
s.address = ipaddress
|
||||||
return "", err
|
// convert port to int
|
||||||
}
|
portInt, err := strconv.Atoi(port)
|
||||||
s.port = portInt
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
s.port = portInt
|
||||||
|
|
||||||
// Setup client information
|
// Setup client information
|
||||||
var c Client
|
var c Client
|
||||||
c.Name = "ServerPort"
|
c.Name = "ServerPort"
|
||||||
c.Server = &s
|
c.Server = &s
|
||||||
|
|
||||||
// converts localport to int
|
// converts localport to int
|
||||||
portInt, err = strconv.Atoi(localport)
|
portInt, err = strconv.Atoi(localport)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
//random port
|
var OpenPorts []int
|
||||||
//randPort := rangeIn(10000, 99999)
|
// if the remote port is
|
||||||
OpenPorts, err := freeport.GetFreePorts(1)
|
// not empty then set the remote port to that.
|
||||||
if err != nil {
|
if remoteport != "" {
|
||||||
return "", err
|
// converts localport to int
|
||||||
}
|
portIntRemote, err := strconv.Atoi(remoteport)
|
||||||
c.ClientMappings = []ClientMapping{
|
if err != nil {
|
||||||
{
|
return "", err
|
||||||
LocalIP: "localhost",
|
}
|
||||||
LocalPort: portInt,
|
OpenPorts = append(OpenPorts, portIntRemote)
|
||||||
RemotePort: OpenPorts[0],
|
} else {
|
||||||
},
|
//random port
|
||||||
}
|
//randPort := rangeIn(10000, 99999)
|
||||||
|
OpenPorts, err = freeport.GetFreePorts(1)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
c.ClientMappings = []ClientMapping{
|
||||||
|
{
|
||||||
|
LocalIP: "localhost",
|
||||||
|
LocalPort: portInt,
|
||||||
|
RemotePort: OpenPorts[0],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
// Start client server
|
// Start client server
|
||||||
go c.StartFRPClient()
|
go c.StartFRPClient()
|
||||||
|
|
||||||
return strconv.Itoa(OpenPorts[0]), nil
|
return strconv.Itoa(OpenPorts[0]), nil
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func StartFRPCDockerContainer(ipaddress string, port string, Docker *docker.DockerVM) (*docker.DockerVM, error) {
|
func StartFRPCDockerContainer(ipaddress string, port string, Docker *docker.DockerVM) (*docker.DockerVM, error) {
|
||||||
// setting new docker variable
|
// setting new docker variable
|
||||||
|
|
||||||
//var DockerFRP docker.DockerVM
|
//var DockerFRP docker.DockerVM
|
||||||
|
|
||||||
//DockerFRP = *Docker
|
//DockerFRP = *Docker
|
||||||
//DockerFRP.Ports.PortSet = []docker.Port{}
|
//DockerFRP.Ports.PortSet = []docker.Port{}
|
||||||
// Setup server information
|
// Setup server information
|
||||||
var s Server
|
var s Server
|
||||||
s.address = ipaddress
|
s.address = ipaddress
|
||||||
// convert port to int
|
// convert port to int
|
||||||
portInt, err := strconv.Atoi(port)
|
portInt, err := strconv.Atoi(port)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
s.port = portInt
|
s.port = portInt
|
||||||
|
|
||||||
// Setup client information
|
// Setup client information
|
||||||
var c Client
|
var c Client
|
||||||
c.Name = "ServerPort"
|
c.Name = "ServerPort"
|
||||||
c.Server = &s
|
c.Server = &s
|
||||||
|
|
||||||
// set client mapping
|
// set client mapping
|
||||||
//var clientMappings []ClientMapping
|
//var clientMappings []ClientMapping
|
||||||
fmt.Println(len(Docker.Ports.PortSet))
|
for i, _ := range Docker.Ports.PortSet {
|
||||||
for i, _ := range Docker.Ports.PortSet {
|
portMap := Docker.Ports.PortSet[i].ExternalPort
|
||||||
portMap := Docker.Ports.PortSet[i].ExternalPort
|
|
||||||
|
|
||||||
serverPort, err := GetFRPServerPort("http://" + ipaddress + ":" + port)
|
serverPort, err := GetFRPServerPort("http://" + ipaddress + ":" + port)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
//delay to allow the FRP server to start
|
//delay to allow the FRP server to start
|
||||||
time.Sleep(1 * time.Second)
|
time.Sleep(1 * time.Second)
|
||||||
|
|
||||||
proxyPort, err := StartFRPClientForServer(ipaddress, serverPort, strconv.Itoa(portMap))
|
proxyPort, err := StartFRPClientForServer(ipaddress, serverPort, strconv.Itoa(portMap), "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
portInt, err = strconv.Atoi(proxyPort)
|
portInt, err = strconv.Atoi(proxyPort)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
Docker.Ports.PortSet[i].ExternalPort = portInt
|
Docker.Ports.PortSet[i].ExternalPort = portInt
|
||||||
}
|
}
|
||||||
|
|
||||||
return Docker, nil
|
return Docker, nil
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// StartFRPClient Starts FRP client
|
// StartFRPClient Starts FRP client
|
||||||
func (c *Client) StartFRPClient() error {
|
func (c *Client) StartFRPClient() error {
|
||||||
|
|
||||||
cfg := config.GetDefaultClientConf()
|
cfg := config.GetDefaultClientConf()
|
||||||
|
|
||||||
var proxyConfs map[string]config.ProxyConf
|
//Config, err := defaultConfig.ConfigInit(nil, nil)
|
||||||
var visitorCfgs map[string]config.VisitorConf
|
//if err != nil {
|
||||||
|
// return err
|
||||||
|
//}
|
||||||
|
|
||||||
proxyConfs = make(map[string]config.ProxyConf)
|
var proxyConfs map[string]config.ProxyConf
|
||||||
|
var visitorCfgs map[string]config.VisitorConf
|
||||||
|
|
||||||
cfg.ServerAddr = c.Server.address
|
proxyConfs = make(map[string]config.ProxyConf)
|
||||||
cfg.ServerPort = c.Server.port
|
|
||||||
|
|
||||||
for i, _ := range c.ClientMappings {
|
cfg.ServerAddr = c.Server.address
|
||||||
var tcpcnf config.TCPProxyConf
|
cfg.ServerPort = c.Server.port
|
||||||
tcpcnf.LocalIP = c.ClientMappings[i].LocalIP
|
//cfg.TLSEnable = true
|
||||||
tcpcnf.LocalPort = c.ClientMappings[i].LocalPort
|
//cfg.TLSKeyFile = Config.KeyFile
|
||||||
tcpcnf.RemotePort = c.ClientMappings[i].RemotePort
|
//cfg.TLSCertFile = Config.PemFile
|
||||||
|
|
||||||
proxyConfs[tcpcnf.ProxyName] = &tcpcnf
|
for i, _ := range c.ClientMappings {
|
||||||
}
|
var tcpcnf config.TCPProxyConf
|
||||||
|
tcpcnf.LocalIP = c.ClientMappings[i].LocalIP
|
||||||
|
tcpcnf.LocalPort = c.ClientMappings[i].LocalPort
|
||||||
|
tcpcnf.RemotePort = c.ClientMappings[i].RemotePort
|
||||||
|
|
||||||
cli, err := client.NewService(cfg, proxyConfs, visitorCfgs, "")
|
proxyConfs[tcpcnf.ProxyName] = &tcpcnf
|
||||||
if err != nil {
|
}
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
cli.Run()
|
cli, err := client.NewService(cfg, proxyConfs, visitorCfgs, "")
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
cli.Run()
|
||||||
|
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// helper function to generate random
|
// helper function to generate random
|
||||||
// number in a certain range
|
// number in a certain range
|
||||||
func rangeIn(low, hi int) int {
|
func rangeIn(low, hi int) int {
|
||||||
return low + rand.Intn(hi-low)
|
return low + rand.Intn(hi-low)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,16 @@
|
|||||||
{
|
{
|
||||||
"ip_address": [
|
"ip_address": [
|
||||||
{
|
{
|
||||||
"Name": "Node1",
|
"Name": "Node1",
|
||||||
"IPV4": "64.227.168.102",
|
"IPV4": "139.59.162.154",
|
||||||
"IPV6": "",
|
"IPV6": "",
|
||||||
"Latency": 0,
|
"Latency": 0,
|
||||||
"ServerPort": "8088",
|
"Download": 0,
|
||||||
"NAT": "False",
|
"Upload": 0,
|
||||||
"EscapeImplementation": "None"
|
"ServerPort": "8078",
|
||||||
}
|
"NAT": "False",
|
||||||
]
|
"EscapeImplementation": "",
|
||||||
|
"CustomInformation": null
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
package p2p
|
package p2p
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
|
"crypto/sha256"
|
||||||
"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"
|
||||||
@@ -19,14 +21,21 @@ type IpAddresses struct {
|
|||||||
|
|
||||||
type IpAddress struct {
|
type IpAddress struct {
|
||||||
Name string `json:"Name"`
|
Name string `json:"Name"`
|
||||||
|
MachineUsername string `json:"MachineUsername"`
|
||||||
Ipv4 string `json:"IPV4"`
|
Ipv4 string `json:"IPV4"`
|
||||||
Ipv6 string `json:"IPV6"`
|
Ipv6 string `json:"IPV6"`
|
||||||
Latency time.Duration `json:"Latency"`
|
Latency time.Duration `json:"Latency"`
|
||||||
Download float64 `json:"Download"`
|
Download float64 `json:"Download"`
|
||||||
Upload float64 `json:"Upload"`
|
Upload float64 `json:"Upload"`
|
||||||
ServerPort string `json:"ServerPort"`
|
ServerPort string `json:"ServerPort"`
|
||||||
|
BareMetalSSHPort string `json:"BareMetalSSHPort"`
|
||||||
NAT string `json:"NAT"`
|
NAT string `json:"NAT"`
|
||||||
EscapeImplementation string `json:"EscapeImplementation"`
|
EscapeImplementation string `json:"EscapeImplementation"`
|
||||||
|
ProxyServer string `json:"ProxyServer"`
|
||||||
|
UnSafeMode bool `json:"UnSafeMode"`
|
||||||
|
PublicKey string `json:"PublicKey"`
|
||||||
|
CustomInformation string `json:"CustomInformation"`
|
||||||
|
//CustomInformationKey []byte `json:"CustomInformationKey"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type IP struct {
|
type IP struct {
|
||||||
@@ -36,7 +45,7 @@ type IP struct {
|
|||||||
// ReadIpTable Read data from Ip tables from json file
|
// ReadIpTable Read data from Ip tables from json file
|
||||||
func ReadIpTable() (*IpAddresses, error) {
|
func ReadIpTable() (*IpAddresses, error) {
|
||||||
// Get Path from config
|
// Get Path from config
|
||||||
config, err := config.ConfigInit()
|
config, err := config.ConfigInit(nil, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -101,7 +110,7 @@ func (i *IpAddresses) WriteIpTable() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get Path from config
|
// Get Path from config
|
||||||
config, err := config.ConfigInit()
|
config, err := config.ConfigInit(nil, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -117,17 +126,17 @@ func (i *IpAddresses) WriteIpTable() error {
|
|||||||
// PrintIpTable Print Ip table data for Cli
|
// PrintIpTable Print Ip table data for Cli
|
||||||
func PrintIpTable() error {
|
func PrintIpTable() error {
|
||||||
table, err := ReadIpTable()
|
table, err := ReadIpTable()
|
||||||
|
//
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
//
|
||||||
for i := 0; i < len(table.IpAddress); i++ {
|
//for i := 0; i < len(table.IpAddress); i++ {
|
||||||
fmt.Printf("\nMachine Name: %s\nIP Address: %s\nIPV6: %s\nLatency: %s\nServerPort: %s\nbehindNAT: %s\nEscapeImplementation: %s\n-----------"+
|
// fmt.Printf("\nMachine Name: %s\nIP Address: %s\nIPV6: %s\nLatency: %s\nServerPort: %s\nbehindNAT: %s\nEscapeImplementation: %s\n-----------"+
|
||||||
"-----------------\n", table.IpAddress[i].Name, table.IpAddress[i].Ipv4, table.IpAddress[i].Ipv6,
|
// "-----------------\n", table.IpAddress[i].Name, table.IpAddress[i].Ipv4, table.IpAddress[i].Ipv6,
|
||||||
table.IpAddress[i].Latency, table.IpAddress[i].ServerPort, table.IpAddress[i].NAT, table.IpAddress[i].EscapeImplementation)
|
// table.IpAddress[i].Latency, table.IpAddress[i].ServerPort, table.IpAddress[i].NAT, table.IpAddress[i].EscapeImplementation)
|
||||||
}
|
//}
|
||||||
//PrettyPrint(table)
|
PrettyPrint(table)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@@ -189,7 +198,7 @@ func CurrentPublicIP() (string, error) {
|
|||||||
// GetCurrentIPV6 gets the current IPV6 address based on the interface
|
// GetCurrentIPV6 gets the current IPV6 address based on the interface
|
||||||
// specified in the config file
|
// specified in the config file
|
||||||
func GetCurrentIPV6() (string, error) {
|
func GetCurrentIPV6() (string, error) {
|
||||||
Config, err := config.ConfigInit()
|
Config, err := config.ConfigInit(nil, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
@@ -254,13 +263,36 @@ func Ip4or6(s string) string {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//func PrettyPrint(data interface{}) {
|
func PrettyPrint(data interface{}) {
|
||||||
// var p []byte
|
var p []byte
|
||||||
// // var err := error
|
// var err := error
|
||||||
// p, err := json.MarshalIndent(data, "", "\t")
|
p, err := json.MarshalIndent(data, "", "\t")
|
||||||
// if err != nil {
|
if err != nil {
|
||||||
// fmt.Println(err)
|
fmt.Println(err)
|
||||||
// return
|
return
|
||||||
// }
|
}
|
||||||
// fmt.Printf("%s \n", p)
|
fmt.Printf("%s \n", p)
|
||||||
//}
|
}
|
||||||
|
|
||||||
|
func GenerateHashSHA256(text string) []byte {
|
||||||
|
h := sha256.New()
|
||||||
|
h.Write([]byte(text))
|
||||||
|
|
||||||
|
return h.Sum(nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ValidateHashSHA256 CustomInformationKey the text and check if the text and
|
||||||
|
// the hash are the same, if they are
|
||||||
|
// then return true
|
||||||
|
// SHA256 is the current hashing algorthm
|
||||||
|
// used.
|
||||||
|
func ValidateHashSHA256(text string, Hash []byte) bool {
|
||||||
|
h := sha256.New()
|
||||||
|
h.Write([]byte(text))
|
||||||
|
|
||||||
|
textHash := h.Sum(nil)
|
||||||
|
if bytes.Equal(textHash, Hash) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
package p2p
|
package p2p
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/Akilan1999/p2p-rendering-computation/config"
|
||||||
|
)
|
||||||
|
|
||||||
// SpeedTest Runs a speed test and does updates IP tables accordingly
|
// SpeedTest Runs a speed test and does updates IP tables accordingly
|
||||||
func (ip *IpAddresses) SpeedTest() error {
|
func (ip *IpAddresses) SpeedTest() error {
|
||||||
|
|
||||||
@@ -50,11 +54,26 @@ func (ip *IpAddresses) SpeedTest() error {
|
|||||||
|
|
||||||
// SpeedTestUpdatedIPTable Called when ip tables from httpclient/server is also passed on
|
// SpeedTestUpdatedIPTable Called when ip tables from httpclient/server is also passed on
|
||||||
func (ip *IpAddresses) SpeedTestUpdatedIPTable() error {
|
func (ip *IpAddresses) SpeedTestUpdatedIPTable() error {
|
||||||
|
|
||||||
|
Config, err := config.ConfigInit(nil, nil)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
targets, err := ReadIpTable()
|
targets, err := ReadIpTable()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Checks if baremetal mode and unsafe mode
|
||||||
|
// is enabled. If it is enabled it adds the
|
||||||
|
// the propagated public key to the list.
|
||||||
|
|
||||||
|
AddPublicKey := false
|
||||||
|
if Config.BareMetal && Config.UnsafeMode {
|
||||||
|
AddPublicKey = true
|
||||||
|
}
|
||||||
|
|
||||||
// To ensure struct has no duplicates IP addresses
|
// To ensure struct has no duplicates IP addresses
|
||||||
//DoNotRead := targets
|
//DoNotRead := targets
|
||||||
|
|
||||||
@@ -64,6 +83,16 @@ func (ip *IpAddresses) SpeedTestUpdatedIPTable() error {
|
|||||||
//To ensure that there are no duplicate IP addresses
|
//To ensure that there are no duplicate IP addresses
|
||||||
Exists := false
|
Exists := false
|
||||||
for k := range ip.IpAddress {
|
for k := range ip.IpAddress {
|
||||||
|
if AddPublicKey && ip.IpAddress[k].PublicKey != "" {
|
||||||
|
// This function call (AddAuthorisationKey) is inefficient but to be optimised later on.
|
||||||
|
// This is because when if the user is running on as unsafe mode the authorization file
|
||||||
|
// is opened from the SSH directory and then iterates through every single SSH entry
|
||||||
|
// to find out if the SSH entry exists or not. This will incur multiple CPU cycles
|
||||||
|
// for no reason. A better approach would be to have been to store the states on memory and only
|
||||||
|
// add when needed based on the memory location. This is something is to be discussed
|
||||||
|
// and look upon later on.
|
||||||
|
AddAuthorisationKey(ip.IpAddress[k].PublicKey)
|
||||||
|
}
|
||||||
// Checks if both the IPV4 addresses are the same or the IPV6 address is not
|
// Checks if both the IPV4 addresses are the same or the IPV6 address is not
|
||||||
// an empty string and IPV6 address are the same
|
// an empty string and IPV6 address are the same
|
||||||
if (ip.IpAddress[k].Ipv4 == targets.IpAddress[i].Ipv4 && targets.IpAddress[i].NAT == "True") || (targets.IpAddress[i].Ipv6 != "" && ip.IpAddress[k].Ipv6 == targets.IpAddress[i].Ipv6) {
|
if (ip.IpAddress[k].Ipv4 == targets.IpAddress[i].Ipv4 && targets.IpAddress[i].NAT == "True") || (targets.IpAddress[i].Ipv6 != "" && ip.IpAddress[k].Ipv6 == targets.IpAddress[i].Ipv6) {
|
||||||
|
|||||||
123
p2p/ssh_autorisation.go
Normal file
123
p2p/ssh_autorisation.go
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
// NOTE: Most of the code snippet was generated using ChatGPT
|
||||||
|
// Prompt used: "generate go program to read and populate ssh authorization file"
|
||||||
|
|
||||||
|
package p2p
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bufio"
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
|
// GetAuthorizedKeysPath returns the path to the authorized_keys file
|
||||||
|
func GetAuthorizedKeysPath() (string, error) {
|
||||||
|
homeDir, err := os.UserHomeDir()
|
||||||
|
if err != nil {
|
||||||
|
return "", fmt.Errorf("could not find home directory: %v", err)
|
||||||
|
}
|
||||||
|
return filepath.Join(homeDir, ".ssh", "authorized_keys"), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReadAuthorizedKeys reads and returns the current contents of the authorized_keys file as a map
|
||||||
|
func ReadAuthorizedKeys(path string) (map[string]bool, error) {
|
||||||
|
file, err := os.Open(path)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("could not open authorized_keys file: %v", err)
|
||||||
|
}
|
||||||
|
defer file.Close()
|
||||||
|
|
||||||
|
keys := make(map[string]bool)
|
||||||
|
scanner := bufio.NewScanner(file)
|
||||||
|
for scanner.Scan() {
|
||||||
|
line := strings.TrimSpace(scanner.Text())
|
||||||
|
// Skip empty lines and comments
|
||||||
|
if line != "" && !strings.HasPrefix(line, "#") {
|
||||||
|
keys[line] = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if err := scanner.Err(); err != nil {
|
||||||
|
return nil, fmt.Errorf("error reading authorized_keys file: %v", err)
|
||||||
|
}
|
||||||
|
return keys, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// AddKeyToAuthorizedKeys adds a new key to the authorized_keys file if it doesn’t already exist
|
||||||
|
func AddKeyToAuthorizedKeys(path, newKey string) error {
|
||||||
|
keys, err := ReadAuthorizedKeys(path)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if the key already exists in the map
|
||||||
|
if keys[newKey] {
|
||||||
|
return errors.New("key already exists in authorized_keys")
|
||||||
|
}
|
||||||
|
|
||||||
|
// Append the new key
|
||||||
|
file, err := os.OpenFile(path, os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0600)
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("could not open authorized_keys file for writing: %v", err)
|
||||||
|
}
|
||||||
|
defer file.Close()
|
||||||
|
|
||||||
|
if _, err := file.WriteString(newKey + "\n"); err != nil {
|
||||||
|
return fmt.Errorf("could not write to authorized_keys file: %v", err)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func RemoveKeyFromAuthorizedKeys(path, keyToRemove string) error {
|
||||||
|
keys, err := ReadAuthorizedKeys(path)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if the key exists in the map
|
||||||
|
if !keys[keyToRemove] {
|
||||||
|
return errors.New("key not found in authorized_keys")
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete the key from the map
|
||||||
|
delete(keys, keyToRemove)
|
||||||
|
|
||||||
|
// Write updated keys back to the authorized_keys file
|
||||||
|
file, err := os.OpenFile(path, os.O_TRUNC|os.O_WRONLY|os.O_CREATE, 0600)
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("could not open authorized_keys file for writing: %v", err)
|
||||||
|
}
|
||||||
|
defer file.Close()
|
||||||
|
|
||||||
|
for key := range keys {
|
||||||
|
if _, err := file.WriteString(key + "\n"); err != nil {
|
||||||
|
return fmt.Errorf("could not write to authorized_keys file: %v", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// AddAuthorisationKey Adds public key provided to the
|
||||||
|
// authorization file so that nodes can SSH into
|
||||||
|
// the
|
||||||
|
func AddAuthorisationKey(PublicKey string) error {
|
||||||
|
path, err := GetAuthorizedKeysPath()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Display existing keys
|
||||||
|
_, err = ReadAuthorizedKeys(path)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
err = AddKeyToAuthorizedKeys(path, PublicKey)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
@@ -1,16 +1,16 @@
|
|||||||
package p2p
|
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"
|
||||||
"mime/multipart"
|
"mime/multipart"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
// var dlSizes = [...]int{350, 500, 750, 1000, 1500, 2000, 2500, 3000, 3500, 4000}
|
// var dlSizes = [...]int{350, 500, 750, 1000, 1500, 2000, 2500, 3000, 3500, 4000}
|
||||||
@@ -80,100 +80,100 @@ var httpclient = http.Client{}
|
|||||||
|
|
||||||
// Download Speed
|
// Download Speed
|
||||||
func (s *IpAddress) DownloadSpeed() error {
|
func (s *IpAddress) DownloadSpeed() error {
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
resp, err := httpclient.Get("http://" + s.Ipv4 + ":8088/50")
|
resp, err := httpclient.Get("http://" + s.Ipv4 + ":8088/50")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
ioutil.ReadAll(resp.Body)
|
ioutil.ReadAll(resp.Body)
|
||||||
t := time.Since(start)
|
t := time.Since(start)
|
||||||
//fmt.Println(s.Seconds())
|
//fmt.Println(s.Seconds())
|
||||||
// size * time (seconds)
|
// size * time (seconds)
|
||||||
s.Download = (50 / t.Seconds()) * 8
|
s.Download = (50 / t.Seconds()) * 8
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *IpAddress) UploadSpeed() error {
|
func (s *IpAddress) UploadSpeed() error {
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
|
|
||||||
// Get upload file path from config file
|
// Get upload file path from config file
|
||||||
// Get Path from config
|
// Get Path from config
|
||||||
config, err := config.ConfigInit()
|
config, err := config.ConfigInit(nil, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
b, w := createMultipartFormData("file", config.SpeedTestFile)
|
b, w := createMultipartFormData("file", config.SpeedTestFile)
|
||||||
|
|
||||||
req, err := http.NewRequest("GET", "http://"+s.Ipv4+":"+s.ServerPort+"/upload", &b)
|
req, err := http.NewRequest("GET", "http://"+s.Ipv4+":"+s.ServerPort+"/upload", &b)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
// Don't forget to set the content type, this will contain the boundary.
|
// Don't forget to set the content type, this will contain the boundary.
|
||||||
req.Header.Set("Content-Type", w.FormDataContentType())
|
req.Header.Set("Content-Type", w.FormDataContentType())
|
||||||
defer req.Body.Close()
|
defer req.Body.Close()
|
||||||
ioutil.ReadAll(req.Body)
|
ioutil.ReadAll(req.Body)
|
||||||
t := time.Since(start)
|
t := time.Since(start)
|
||||||
//fmt.Println(s.Seconds())
|
//fmt.Println(s.Seconds())
|
||||||
// size * time (seconds)
|
// size * time (seconds)
|
||||||
s.Upload = (50 / t.Seconds()) * 8
|
s.Upload = (50 / t.Seconds()) * 8
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Upload helper function for uploading
|
// Upload helper function for uploading
|
||||||
// (https://stackoverflow.com/questions/20205796/post-data-using-the-content-type-multipart-form-data
|
// (https://stackoverflow.com/questions/20205796/post-data-using-the-content-type-multipart-form-data
|
||||||
func createMultipartFormData(fieldName, fileName string) (bytes.Buffer, *multipart.Writer) {
|
func createMultipartFormData(fieldName, fileName string) (bytes.Buffer, *multipart.Writer) {
|
||||||
var b bytes.Buffer
|
var b bytes.Buffer
|
||||||
var err error
|
var err error
|
||||||
w := multipart.NewWriter(&b)
|
w := multipart.NewWriter(&b)
|
||||||
var fw io.Writer
|
var fw io.Writer
|
||||||
file := mustOpen(fileName)
|
file := mustOpen(fileName)
|
||||||
if fw, err = w.CreateFormFile(fieldName, file.Name()); err != nil {
|
if fw, err = w.CreateFormFile(fieldName, file.Name()); err != nil {
|
||||||
log.Fatalf("Error creating writer: %v", err)
|
log.Fatalf("Error creating writer: %v", err)
|
||||||
}
|
}
|
||||||
if _, err = io.Copy(fw, file); err != nil {
|
if _, err = io.Copy(fw, file); err != nil {
|
||||||
log.Fatalf("Error with io.Copy: %v", err)
|
log.Fatalf("Error with io.Copy: %v", err)
|
||||||
//t.Errorf("Error with io.Copy: %v", err)
|
//t.Errorf("Error with io.Copy: %v", err)
|
||||||
}
|
}
|
||||||
w.Close()
|
w.Close()
|
||||||
return b, w
|
return b, w
|
||||||
}
|
}
|
||||||
|
|
||||||
func mustOpen(f string) *os.File {
|
func mustOpen(f string) *os.File {
|
||||||
r, err := os.Open(f)
|
r, err := os.Open(f)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("Error with mustOpen: %v", err)
|
log.Fatalf("Error with mustOpen: %v", err)
|
||||||
}
|
}
|
||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
|
|
||||||
// PingTest executes test to measure latency
|
// PingTest executes test to measure latency
|
||||||
func (s *IpAddress) PingTest() error {
|
func (s *IpAddress) PingTest() error {
|
||||||
//pingURL := strings.Split(s.URL, "/upload")[0] + "/latency.txt"
|
//pingURL := strings.Split(s.URL, "/upload")[0] + "/latency.txt"
|
||||||
var pingURL string
|
var pingURL string
|
||||||
if s.Ipv6 != "" {
|
if s.Ipv6 != "" {
|
||||||
pingURL = "http://[" + s.Ipv6 + "]:" + s.ServerPort + "/server_info"
|
pingURL = "http://[" + s.Ipv6 + "]:" + s.ServerPort + "/server_info"
|
||||||
s.Ipv4 = ""
|
s.Ipv4 = ""
|
||||||
} else {
|
} else {
|
||||||
pingURL = "http://" + s.Ipv4 + ":" + s.ServerPort + "/server_info"
|
pingURL = "http://" + s.Ipv4 + ":" + s.ServerPort + "/server_info"
|
||||||
}
|
}
|
||||||
|
|
||||||
l := time.Duration(100000000000) // 10sec
|
l := time.Duration(100000000000) // 10sec
|
||||||
for i := 0; i < 3; i++ {
|
for i := 0; i < 3; i++ {
|
||||||
sTime := time.Now()
|
sTime := time.Now()
|
||||||
resp, err := http.Get(pingURL)
|
resp, err := http.Get(pingURL)
|
||||||
fTime := time.Now()
|
fTime := time.Now()
|
||||||
if err != nil || resp.StatusCode != 200 {
|
if err != nil || resp.StatusCode != 200 {
|
||||||
return errors.New("Node not found")
|
return errors.New("Node not found")
|
||||||
}
|
}
|
||||||
if fTime.Sub(sTime) < l {
|
if fTime.Sub(sTime) < l {
|
||||||
l = fTime.Sub(sTime)
|
l = fTime.Sub(sTime)
|
||||||
}
|
}
|
||||||
resp.Body.Close()
|
resp.Body.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
s.Latency = time.Duration(int64(l.Nanoseconds() / 2))
|
s.Latency = time.Duration(int64(l.Nanoseconds() / 2))
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
package p2p
|
package p2p
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Tests if the current has UPNP support
|
// Tests if the current has UPNP support
|
||||||
func TestForwardUPNPPort(t *testing.T) {
|
func TestForwardUPNPPort(t *testing.T) {
|
||||||
err := ForwardPort(6586)
|
err := ForwardPort(6586)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
t.Fail()
|
t.Fail()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,65 +1,64 @@
|
|||||||
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"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DownloadPlugin This functions downloads package from
|
// DownloadPlugin This functions downloads package from
|
||||||
// a git repo.
|
// a git repo.
|
||||||
func DownloadPlugin(pluginurl string) error {
|
func DownloadPlugin(pluginurl string) error {
|
||||||
// paring plugin url
|
// paring plugin url
|
||||||
u, err := url.Parse(pluginurl)
|
u, err := url.Parse(pluginurl)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
path := u.Path
|
path := u.Path
|
||||||
// Trim first character of the string
|
// Trim first character of the string
|
||||||
path = path[1:]
|
path = path[1:]
|
||||||
// trim last element of the string
|
// trim last element of the string
|
||||||
path = path[:len(path)-1]
|
path = path[:len(path)-1]
|
||||||
// Replaces / with _
|
// Replaces / with _
|
||||||
folder := strings.Replace(path, "/", "_", -1)
|
folder := strings.Replace(path, "/", "_", -1)
|
||||||
// Reads plugin path from the config path
|
// Reads plugin path from the config path
|
||||||
config, err := config.ConfigInit()
|
config, err := config.ConfigInit(nil, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
// clones a repo and stores it at the plugin directory
|
// clones a repo and stores it at the plugin directory
|
||||||
_, err = git.PlainClone(config.PluginPath + "/" + folder, false, &git.CloneOptions{
|
_, err = git.PlainClone(config.PluginPath+"/"+folder, false, &git.CloneOptions{
|
||||||
URL: pluginurl,
|
URL: pluginurl,
|
||||||
Progress: os.Stdout,
|
Progress: os.Stdout,
|
||||||
})
|
})
|
||||||
// returns error if raised
|
// returns error if raised
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeletePlugin The following function deletes a plugin based on
|
// DeletePlugin The following function deletes a plugin based on
|
||||||
// the plugin name provided.
|
// the plugin name provided.
|
||||||
func DeletePlugin(pluginname string) error {
|
func DeletePlugin(pluginname string) error {
|
||||||
config, err := config.ConfigInit()
|
config, err := config.ConfigInit(nil, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
plugin, err := SearchPlugin(pluginname)
|
plugin, err := SearchPlugin(pluginname)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete the directory holding the plugin
|
// Delete the directory holding the plugin
|
||||||
err = os.RemoveAll(config.PluginPath + "/" + plugin.FolderName)
|
err = os.RemoveAll(config.PluginPath + "/" + plugin.FolderName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@@ -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"
|
||||||
@@ -67,7 +67,7 @@ type Host struct {
|
|||||||
|
|
||||||
// DetectPlugins Detects all the plugins available
|
// DetectPlugins Detects all the plugins available
|
||||||
func DetectPlugins() (*Plugins, error) {
|
func DetectPlugins() (*Plugins, error) {
|
||||||
config, err := config.ConfigInit()
|
config, err := config.ConfigInit(nil, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -141,7 +141,7 @@ func RunPlugin(pluginName string, IPAddresses []*ExecuteIP) (*Plugin, error) {
|
|||||||
plugindetected = plugin
|
plugindetected = plugin
|
||||||
plugindetected.Execute = IPAddresses
|
plugindetected.Execute = IPAddresses
|
||||||
// Get Execute plugin path from config file
|
// Get Execute plugin path from config file
|
||||||
config, err := config.ConfigInit()
|
config, err := config.ConfigInit(nil, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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"
|
||||||
@@ -74,7 +74,7 @@ func TestExecuteIP_ModifyHost(t *testing.T) {
|
|||||||
var testip ExecuteIP
|
var testip ExecuteIP
|
||||||
|
|
||||||
// Get plugin path from config file
|
// Get plugin path from config file
|
||||||
Config, err := config.ConfigInit()
|
Config, err := config.ConfigInit(nil, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
t.Fail()
|
t.Fail()
|
||||||
|
|||||||
BIN
server/.DS_Store
vendored
Normal file
BIN
server/.DS_Store
vendored
Normal file
Binary file not shown.
147
server/ReverseProxy.go
Normal file
147
server/ReverseProxy.go
Normal file
@@ -0,0 +1,147 @@
|
|||||||
|
// source:https://github.com/afoley587/go-rev-proxy/tree/main
|
||||||
|
package server
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"github.com/Akilan1999/p2p-rendering-computation/config"
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
"log"
|
||||||
|
"net/http"
|
||||||
|
"net/http/httputil"
|
||||||
|
"net/url"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
//RunPort = 2002 // The server port to run on
|
||||||
|
//ReverseServerAddr = fmt.Sprint("0.0.0.0:", RunPort) // this is our reverse server ip address
|
||||||
|
//InsideProxyHostname = fmt.Sprint("proxy:", RunPort) // Requests from private network
|
||||||
|
//OutsideProxyHostname = fmt.Sprint("registration.localhost:", RunPort) // Requests from public network
|
||||||
|
KnownAddresses = map[string]string{} // Known Addresses
|
||||||
|
)
|
||||||
|
|
||||||
|
type RegistrationRequest struct {
|
||||||
|
OutsideHost string // Outside host address. The hostname or IP on the public network. For example foo.bar.com or foo.localhost
|
||||||
|
InsideHost string // Inside host address. The hostname or IP on the internal network. For example 192.168.10.5
|
||||||
|
}
|
||||||
|
|
||||||
|
// This function checks if TLS was enabled on the request
|
||||||
|
// and translates it to the proper scheme (http or https)
|
||||||
|
func GetScheme(c *gin.Context) string {
|
||||||
|
if c.Request.TLS != nil {
|
||||||
|
return "https"
|
||||||
|
} else {
|
||||||
|
return "http"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsRegistrationRequest checks if an incoming request is meant to register
|
||||||
|
// a new inside/outside hostname pair by checking if the hostname and
|
||||||
|
// path match a specific combination.
|
||||||
|
// If the host is our registration.localhost or proxy hostname
|
||||||
|
// AND if the path is /register, we will register a new endpoint
|
||||||
|
//func IsRegistrationRequest(c *gin.Context) bool {
|
||||||
|
// isRR := ((c.Request.Host == InsideProxyHostname || c.Request.Host == OutsideProxyHostname) &&
|
||||||
|
// c.Request.URL.String() == "/register")
|
||||||
|
// return isRR
|
||||||
|
//}
|
||||||
|
//
|
||||||
|
//// SaveRegistrationRequest saves an inside/outside hostname pairing
|
||||||
|
//// to our KnownAddresses map so we can use it later. Effectively
|
||||||
|
//// registering a new endpoint for us
|
||||||
|
//func SaveRegistrationRequest(c *gin.Context) error {
|
||||||
|
// var rr RegistrationRequest
|
||||||
|
// log.Println(c.Request.Body)
|
||||||
|
// err := c.BindJSON(&rr)
|
||||||
|
//
|
||||||
|
// if err != nil {
|
||||||
|
// return err
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// log.Println("Registering", rr.OutsideHost, "to", rr.InsideHost)
|
||||||
|
// KnownAddresses[rr.OutsideHost] = rr.InsideHost
|
||||||
|
// return nil
|
||||||
|
//}
|
||||||
|
|
||||||
|
// SaveRegistration Creates registration of proxy node
|
||||||
|
func SaveRegistration(OutsideHost string, InsideHost string) error {
|
||||||
|
//_, ok := KnownAddresses[OutsideHost]
|
||||||
|
//if !ok {
|
||||||
|
// return errors.New("domain name provided already exists")
|
||||||
|
//}
|
||||||
|
KnownAddresses[OutsideHost] = InsideHost
|
||||||
|
|
||||||
|
fmt.Println(OutsideHost)
|
||||||
|
fmt.Println(InsideHost)
|
||||||
|
fmt.Println(KnownAddresses[OutsideHost])
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Proxy runs the actual proxy and will look at the
|
||||||
|
// hostnames requested from the received request. It will
|
||||||
|
// then translate that to the inside hostname and forward the
|
||||||
|
// request
|
||||||
|
func Proxy(c *gin.Context) {
|
||||||
|
|
||||||
|
// Get if HTTP or HTTPS
|
||||||
|
scheme := GetScheme(c)
|
||||||
|
|
||||||
|
log.Println(scheme, c.Request.Host, c.Request.URL.String())
|
||||||
|
|
||||||
|
// Translate the outside hostname to the inside hostname
|
||||||
|
forwardTo, ok := KnownAddresses[c.Request.Host]
|
||||||
|
|
||||||
|
if !ok {
|
||||||
|
log.Printf("Unkown Host: %v", c.Request.Host)
|
||||||
|
c.String(400, "Unkown Host")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
rUrl := fmt.Sprintf("%v://%v%v", "http", forwardTo, c.Request.URL)
|
||||||
|
|
||||||
|
remote, err := url.Parse(rUrl)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
log.Println(err)
|
||||||
|
c.String(500, "Error Proxying Host")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
log.Println("Forwarding request to", remote)
|
||||||
|
|
||||||
|
// Forward the request to the inside remote server
|
||||||
|
// https://pkg.go.dev/net/http/httputil#NewSingleHostReverseProxy
|
||||||
|
proxy := httputil.NewSingleHostReverseProxy(remote)
|
||||||
|
|
||||||
|
// Director is a function which modifies
|
||||||
|
// the request into a new request to be sent
|
||||||
|
// https://pkg.go.dev/net/http/httputil#ReverseProxy
|
||||||
|
proxy.Director = func(req *http.Request) {
|
||||||
|
req.Header = c.Request.Header
|
||||||
|
req.Host = remote.Host
|
||||||
|
req.URL.Scheme = remote.Scheme
|
||||||
|
req.URL.Host = remote.Host
|
||||||
|
req.URL.Path = c.Param("path")
|
||||||
|
}
|
||||||
|
|
||||||
|
proxy.ServeHTTP(c.Writer, c.Request)
|
||||||
|
}
|
||||||
|
|
||||||
|
func ProxyRun(port string) {
|
||||||
|
r := gin.Default()
|
||||||
|
|
||||||
|
KnownAddresses = make(map[string]string)
|
||||||
|
|
||||||
|
// Get config information
|
||||||
|
Config, err := config.ConfigInit(nil, nil)
|
||||||
|
if err != nil {
|
||||||
|
log.Printf("Error: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
// all paths should be handled by Proxy()
|
||||||
|
r.Any("/*path", Proxy)
|
||||||
|
|
||||||
|
if err := r.RunTLS(fmt.Sprint("0.0.0.0:", port), Config.PemFile, Config.KeyFile); err != nil {
|
||||||
|
log.Printf("Error: %v", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
server/docker/.DS_Store
vendored
Normal file
BIN
server/docker/.DS_Store
vendored
Normal file
Binary file not shown.
@@ -1,7 +0,0 @@
|
|||||||
Containers
|
|
||||||
===========
|
|
||||||
|
|
||||||
Structure
|
|
||||||
|_ Containers
|
|
||||||
|_ <name> (To ensure the name is the same as the tag name)
|
|
||||||
|_ DockerFile
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
from horovod/horovod-cpu
|
|
||||||
# Switch to root user to install additional software
|
|
||||||
USER 0
|
|
||||||
|
|
||||||
|
|
||||||
# Make sure we don't get notifications we can't answer during building.
|
|
||||||
env DEBIAN_FRONTEND noninteractive
|
|
||||||
|
|
||||||
run apt-get -q -y update; apt-get -q -y upgrade
|
|
||||||
run apt install net-tools
|
|
||||||
|
|
||||||
# Prepare scripts and configs
|
|
||||||
add ./scripts/start /start
|
|
||||||
|
|
||||||
|
|
||||||
# Set root password
|
|
||||||
run echo 'root:password' >> /root/passwdfile
|
|
||||||
|
|
||||||
|
|
||||||
# Create user and it's password
|
|
||||||
run useradd -m -G sudo master && \
|
|
||||||
echo 'master:password' >> /root/passwdfile
|
|
||||||
|
|
||||||
|
|
||||||
# Apply root password
|
|
||||||
run chpasswd -c SHA512 < /root/passwdfile && \
|
|
||||||
rm /root/passwdfile
|
|
||||||
|
|
||||||
|
|
||||||
# Port 22 is used for ssh
|
|
||||||
expose 22
|
|
||||||
|
|
||||||
|
|
||||||
# Assign /data as static volume.
|
|
||||||
volume ["/data"]
|
|
||||||
|
|
||||||
|
|
||||||
# Fix all permissions
|
|
||||||
run chmod +x /start
|
|
||||||
|
|
||||||
|
|
||||||
# Starting sshd
|
|
||||||
cmd ["/start"]
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Running official horovod dockerfile cpu version
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
# docker-ubuntu-sshd /start script
|
|
||||||
#
|
|
||||||
# Authors: Art567
|
|
||||||
# Updated: Sep 20th, 2015
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
# Run OpenSSH server in daemon mode
|
|
||||||
/usr/sbin/sshd -D
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
# -----------------------------------------------------------------------------
|
|
||||||
# This is base image of Ubuntu LTS with SSHD service.
|
|
||||||
#
|
|
||||||
# Authors: Art567
|
|
||||||
# Updated: Sep 20th, 2015
|
|
||||||
# Require: Docker (http://www.docker.io/)
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
# Base system is the latest LTS version of Ubuntu.
|
|
||||||
# from consol/ubuntu-xfce-vnc
|
|
||||||
|
|
||||||
# due to dependency issues vnc is still work in progress
|
|
||||||
from ubuntu:20.04
|
|
||||||
|
|
||||||
# Switch to root user to install additional software
|
|
||||||
USER 0
|
|
||||||
|
|
||||||
|
|
||||||
# Make sure we don't get notifications we can't answer during building.
|
|
||||||
env DEBIAN_FRONTEND noninteractive
|
|
||||||
|
|
||||||
|
|
||||||
# Prepare scripts and configs
|
|
||||||
add ./scripts/start /start
|
|
||||||
|
|
||||||
|
|
||||||
# Download and install everything from the repos.
|
|
||||||
run apt-get -q -y update; apt-get -q -y upgrade && \
|
|
||||||
apt-get -q -y install sudo openssh-server && \
|
|
||||||
mkdir /var/run/sshd
|
|
||||||
|
|
||||||
|
|
||||||
# Set root password
|
|
||||||
run echo 'root:password' >> /root/passwdfile
|
|
||||||
|
|
||||||
|
|
||||||
# Create user and it's password
|
|
||||||
run useradd -m -G sudo master && \
|
|
||||||
echo 'master:password' >> /root/passwdfile
|
|
||||||
|
|
||||||
|
|
||||||
# Apply root password
|
|
||||||
run chpasswd -c SHA512 < /root/passwdfile && \
|
|
||||||
rm /root/passwdfile
|
|
||||||
|
|
||||||
|
|
||||||
# Port 22 is used for ssh
|
|
||||||
expose 22
|
|
||||||
|
|
||||||
|
|
||||||
# Assign /data as static volume.
|
|
||||||
volume ["/data"]
|
|
||||||
|
|
||||||
|
|
||||||
# Fix all permissions
|
|
||||||
run chmod +x /start
|
|
||||||
|
|
||||||
|
|
||||||
# Starting sshd
|
|
||||||
cmd ["/start"]
|
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
Ubuntu LTS with SSH (Docker)
|
|
||||||
=========
|
|
||||||
|
|
||||||
A Docker file to build a [docker.io] base container with Ubuntu LTS and a sshd service
|
|
||||||
[docker.io]: http://docker.io
|
|
||||||
Nice and easy way to get any server up and running using docker
|
|
||||||
|
|
||||||
|
|
||||||
Instructions
|
|
||||||
-----------
|
|
||||||
- Install Docker first.
|
|
||||||
Read [installation instructions] (http://docs.docker.io/en/latest/installation/).
|
|
||||||
|
|
||||||
|
|
||||||
- Clone this repository:
|
|
||||||
|
|
||||||
`$ git clone https://github.com/art567/docker-ubuntu-sshd.git`
|
|
||||||
|
|
||||||
|
|
||||||
- Enter local directory:
|
|
||||||
|
|
||||||
`$ cd docker-ubuntu-sshd`
|
|
||||||
|
|
||||||
- Change passwords in Dockerfile:
|
|
||||||
|
|
||||||
`$ vi Dockerfile`
|
|
||||||
|
|
||||||
- Build the container:
|
|
||||||
|
|
||||||
`$ sudo docker build -t art567/ubuntu .`
|
|
||||||
|
|
||||||
|
|
||||||
- Run the container:
|
|
||||||
|
|
||||||
`$ sudo docker run -d=true --name=ubuntu --restart=always -p=2222:22 -v=/opt/data:/data art567/ubuntu /start`
|
|
||||||
|
|
||||||
|
|
||||||
- Your container will start and bind ssh to 2222 port.
|
|
||||||
|
|
||||||
|
|
||||||
- Find your local IP Address:
|
|
||||||
|
|
||||||
`$ ifconfig`
|
|
||||||
|
|
||||||
|
|
||||||
- Connect to the SSH server:
|
|
||||||
|
|
||||||
`$ ssh root@<ip-address> -p 2222`
|
|
||||||
|
|
||||||
|
|
||||||
- If you don't want to deal with root:
|
|
||||||
|
|
||||||
`$ ssh master@<ip-address> -p 2222`
|
|
||||||
|
|
||||||
|
|
||||||
**VERY IMPORTANT!!!**
|
|
||||||
-----------
|
|
||||||
|
|
||||||
**Don't forget to change passwords in Dockerfile before building image!**
|
|
||||||
|
|
||||||
|
|
||||||
Versions
|
|
||||||
-----------
|
|
||||||
Some branches represents Ubuntu versions.
|
|
||||||
|
|
||||||
Branch `master` is always represented by latest Ubuntu LTS
|
|
||||||
|
|
||||||
For example:
|
|
||||||
- 12.04 - Ubuntu 12.04 LTS
|
|
||||||
- 14.04 - Ubuntu 14.04 LTS
|
|
||||||
- 16.04 - Ubuntu 16.04 LTS
|
|
||||||
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Simple Ubuntu 20.04 image
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
{
|
|
||||||
"Port": [
|
|
||||||
{
|
|
||||||
"PortName": "SSH",
|
|
||||||
"InternalPort": 22,
|
|
||||||
"Type": "tcp",
|
|
||||||
"Description": "SSH Port"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"PortName": "VNC",
|
|
||||||
"InternalPort": 5900,
|
|
||||||
"Type": "tcp",
|
|
||||||
"Description": "VNC port"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
# docker-ubuntu-sshd /start script
|
|
||||||
#
|
|
||||||
# Authors: Art567
|
|
||||||
# Updated: Sep 20th, 2015
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
# Run OpenSSH server in daemon mode
|
|
||||||
/usr/sbin/sshd -D
|
|
||||||
|
|
||||||
# Running x11 server with password
|
|
||||||
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
# -----------------------------------------------------------------------------
|
|
||||||
# This is base image of Ubuntu LTS with SSHD service.
|
|
||||||
#
|
|
||||||
# Authors: Art567
|
|
||||||
# Updated: Sep 20th, 2015
|
|
||||||
# Require: Docker (http://www.docker.io/)
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
# Base system is the latest LTS version of Ubuntu.
|
|
||||||
# from consol/ubuntu-xfce-vnc
|
|
||||||
|
|
||||||
# due to dependency issues vnc is still work in progress
|
|
||||||
from ubuntu:20.04
|
|
||||||
|
|
||||||
# Switch to root user to install additional software
|
|
||||||
USER 0
|
|
||||||
|
|
||||||
|
|
||||||
# Make sure we don't get notifications we can't answer during building.
|
|
||||||
env DEBIAN_FRONTEND noninteractive
|
|
||||||
|
|
||||||
|
|
||||||
# Prepare scripts and configs
|
|
||||||
add ./scripts/start /start
|
|
||||||
|
|
||||||
|
|
||||||
# Download and install everything from the repos.
|
|
||||||
run apt-get -q -y update; apt-get -q -y upgrade && \
|
|
||||||
apt-get -q -y install sudo openssh-server && \
|
|
||||||
mkdir /var/run/sshd
|
|
||||||
|
|
||||||
|
|
||||||
# Set root password
|
|
||||||
run echo 'root:password' >> /root/passwdfile
|
|
||||||
|
|
||||||
|
|
||||||
# Create user and it's password
|
|
||||||
run useradd -m -G sudo master && \
|
|
||||||
echo 'master:password' >> /root/passwdfile
|
|
||||||
|
|
||||||
|
|
||||||
# Apply root password
|
|
||||||
run chpasswd -c SHA512 < /root/passwdfile && \
|
|
||||||
rm /root/passwdfile
|
|
||||||
|
|
||||||
|
|
||||||
# Port 22 is used for ssh
|
|
||||||
expose 22
|
|
||||||
|
|
||||||
|
|
||||||
# Assign /data as static volume.
|
|
||||||
volume ["/data"]
|
|
||||||
|
|
||||||
|
|
||||||
# Fix all permissions
|
|
||||||
run chmod +x /start
|
|
||||||
|
|
||||||
|
|
||||||
# Starting sshd
|
|
||||||
cmd ["/start"]
|
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
Ubuntu LTS with SSH (Docker)
|
|
||||||
=========
|
|
||||||
|
|
||||||
A Docker file to build a [docker.io] base container with Ubuntu LTS and a sshd service
|
|
||||||
[docker.io]: http://docker.io
|
|
||||||
Nice and easy way to get any server up and running using docker
|
|
||||||
|
|
||||||
|
|
||||||
Instructions
|
|
||||||
-----------
|
|
||||||
- Install Docker first.
|
|
||||||
Read [installation instructions] (http://docs.docker.io/en/latest/installation/).
|
|
||||||
|
|
||||||
|
|
||||||
- Clone this repository:
|
|
||||||
|
|
||||||
`$ git clone https://github.com/art567/docker-ubuntu-sshd.git`
|
|
||||||
|
|
||||||
|
|
||||||
- Enter local directory:
|
|
||||||
|
|
||||||
`$ cd docker-ubuntu-sshd`
|
|
||||||
|
|
||||||
- Change passwords in Dockerfile:
|
|
||||||
|
|
||||||
`$ vi Dockerfile`
|
|
||||||
|
|
||||||
- Build the container:
|
|
||||||
|
|
||||||
`$ sudo docker build -t art567/ubuntu .`
|
|
||||||
|
|
||||||
|
|
||||||
- Run the container:
|
|
||||||
|
|
||||||
`$ sudo docker run -d=true --name=ubuntu --restart=always -p=2222:22 -v=/opt/data:/data art567/ubuntu /start`
|
|
||||||
|
|
||||||
|
|
||||||
- Your container will start and bind ssh to 2222 port.
|
|
||||||
|
|
||||||
|
|
||||||
- Find your local IP Address:
|
|
||||||
|
|
||||||
`$ ifconfig`
|
|
||||||
|
|
||||||
|
|
||||||
- Connect to the SSH server:
|
|
||||||
|
|
||||||
`$ ssh root@<ip-address> -p 2222`
|
|
||||||
|
|
||||||
|
|
||||||
- If you don't want to deal with root:
|
|
||||||
|
|
||||||
`$ ssh master@<ip-address> -p 2222`
|
|
||||||
|
|
||||||
|
|
||||||
**VERY IMPORTANT!!!**
|
|
||||||
-----------
|
|
||||||
|
|
||||||
**Don't forget to change passwords in Dockerfile before building image!**
|
|
||||||
|
|
||||||
|
|
||||||
Versions
|
|
||||||
-----------
|
|
||||||
Some branches represents Ubuntu versions.
|
|
||||||
|
|
||||||
Branch `master` is always represented by latest Ubuntu LTS
|
|
||||||
|
|
||||||
For example:
|
|
||||||
- 12.04 - Ubuntu 12.04 LTS
|
|
||||||
- 14.04 - Ubuntu 14.04 LTS
|
|
||||||
- 16.04 - Ubuntu 16.04 LTS
|
|
||||||
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Simple Ubuntu 20.04 image
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
{
|
|
||||||
"Port": [
|
|
||||||
{
|
|
||||||
"PortName": "SSH",
|
|
||||||
"InternalPort": 22,
|
|
||||||
"Type": "tcp",
|
|
||||||
"Description": "SSH Port"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"PortName": "NoVNC",
|
|
||||||
"InternalPort": 5901,
|
|
||||||
"Type": "tcp",
|
|
||||||
"Description": "NoVNC port"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"PortName": "NoVNC",
|
|
||||||
"InternalPort": 6081,
|
|
||||||
"Type": "tcp",
|
|
||||||
"Description": "NoVNC port"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
# docker-ubuntu-sshd /start script
|
|
||||||
#
|
|
||||||
# Authors: Art567
|
|
||||||
# Updated: Sep 20th, 2015
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
# Run OpenSSH server in daemon mode
|
|
||||||
/usr/sbin/sshd -D
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
from horovod/horovod
|
|
||||||
# Switch to root user to install additional software
|
|
||||||
USER 0
|
|
||||||
|
|
||||||
|
|
||||||
# Make sure we don't get notifications we can't answer during building.
|
|
||||||
env DEBIAN_FRONTEND noninteractive
|
|
||||||
|
|
||||||
|
|
||||||
# Prepare scripts and configs
|
|
||||||
add ./scripts/start /start
|
|
||||||
|
|
||||||
|
|
||||||
# Set root password
|
|
||||||
run echo 'root:password' >> /root/passwdfile
|
|
||||||
|
|
||||||
|
|
||||||
# Create user and it's password
|
|
||||||
run useradd -m -G sudo master && \
|
|
||||||
echo 'master:password' >> /root/passwdfile
|
|
||||||
|
|
||||||
|
|
||||||
# Apply root password
|
|
||||||
run chpasswd -c SHA512 < /root/passwdfile && \
|
|
||||||
rm /root/passwdfile
|
|
||||||
|
|
||||||
|
|
||||||
# Port 22 is used for ssh
|
|
||||||
expose 22
|
|
||||||
|
|
||||||
|
|
||||||
# Assign /data as static volume.
|
|
||||||
volume ["/data"]
|
|
||||||
|
|
||||||
|
|
||||||
# Fix all permissions
|
|
||||||
run chmod +x /start
|
|
||||||
|
|
||||||
|
|
||||||
# Starting sshd
|
|
||||||
cmd ["/start"]
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Running official horovod dockerfile cpu version
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
# docker-ubuntu-sshd /start script
|
|
||||||
#
|
|
||||||
# Authors: Art567
|
|
||||||
# Updated: Sep 20th, 2015
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
# Run OpenSSH server in daemon mode
|
|
||||||
/usr/sbin/sshd -D
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
# -----------------------------------------------------------------------------
|
|
||||||
# This is base image of Ubuntu LTS with SSHD service.
|
|
||||||
#
|
|
||||||
# Authors: Art567
|
|
||||||
# Updated: Sep 20th, 2015
|
|
||||||
# Require: Docker (http://www.docker.io/)
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
# Base system is the latest LTS version of Ubuntu.
|
|
||||||
# from consol/ubuntu-xfce-vnc
|
|
||||||
|
|
||||||
# due to dependency issues vnc is still work in progress
|
|
||||||
from dorowu/ubuntu-desktop-lxde-vnc
|
|
||||||
|
|
||||||
# Switch to root user to install additional software
|
|
||||||
USER 0
|
|
||||||
|
|
||||||
|
|
||||||
# Make sure we don't get notifications we can't answer during building.
|
|
||||||
env DEBIAN_FRONTEND noninteractive
|
|
||||||
|
|
||||||
|
|
||||||
# Prepare scripts and configs
|
|
||||||
add ./scripts/start /start
|
|
||||||
|
|
||||||
|
|
||||||
# Download and install everything from the repos.
|
|
||||||
run apt-get -q -y update; apt-get -q -y upgrade && \
|
|
||||||
apt-get -q -y install sudo openssh-server && \
|
|
||||||
mkdir /var/run/sshd
|
|
||||||
|
|
||||||
|
|
||||||
# Set root password
|
|
||||||
run echo 'root:password' >> /root/passwdfile
|
|
||||||
|
|
||||||
|
|
||||||
# Create user and it's password
|
|
||||||
run useradd -m -G sudo master && \
|
|
||||||
echo 'master:password' >> /root/passwdfile
|
|
||||||
|
|
||||||
|
|
||||||
# Apply root password
|
|
||||||
run chpasswd -c SHA512 < /root/passwdfile && \
|
|
||||||
rm /root/passwdfile
|
|
||||||
|
|
||||||
|
|
||||||
# Port 22 is used for ssh
|
|
||||||
expose 22
|
|
||||||
|
|
||||||
|
|
||||||
# Assign /data as static volume.
|
|
||||||
volume ["/data"]
|
|
||||||
|
|
||||||
|
|
||||||
# Fix all permissions
|
|
||||||
run chmod +x /start
|
|
||||||
|
|
||||||
|
|
||||||
# Starting sshd
|
|
||||||
cmd ["/start"]
|
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
Ubuntu LTS with SSH (Docker)
|
|
||||||
=========
|
|
||||||
|
|
||||||
A Docker file to build a [docker.io] base container with Ubuntu LTS and a sshd service
|
|
||||||
[docker.io]: http://docker.io
|
|
||||||
Nice and easy way to get any server up and running using docker
|
|
||||||
|
|
||||||
|
|
||||||
Instructions
|
|
||||||
-----------
|
|
||||||
- Install Docker first.
|
|
||||||
Read [installation instructions] (http://docs.docker.io/en/latest/installation/).
|
|
||||||
|
|
||||||
|
|
||||||
- Clone this repository:
|
|
||||||
|
|
||||||
`$ git clone https://github.com/art567/docker-ubuntu-sshd.git`
|
|
||||||
|
|
||||||
|
|
||||||
- Enter local directory:
|
|
||||||
|
|
||||||
`$ cd docker-ubuntu-sshd`
|
|
||||||
|
|
||||||
- Change passwords in Dockerfile:
|
|
||||||
|
|
||||||
`$ vi Dockerfile`
|
|
||||||
|
|
||||||
- Build the container:
|
|
||||||
|
|
||||||
`$ sudo docker build -t art567/ubuntu .`
|
|
||||||
|
|
||||||
|
|
||||||
- Run the container:
|
|
||||||
|
|
||||||
`$ sudo docker run -d=true --name=ubuntu --restart=always -p=2222:22 -v=/opt/data:/data art567/ubuntu /start`
|
|
||||||
|
|
||||||
|
|
||||||
- Your container will start and bind ssh to 2222 port.
|
|
||||||
|
|
||||||
|
|
||||||
- Find your local IP Address:
|
|
||||||
|
|
||||||
`$ ifconfig`
|
|
||||||
|
|
||||||
|
|
||||||
- Connect to the SSH server:
|
|
||||||
|
|
||||||
`$ ssh root@<ip-address> -p 2222`
|
|
||||||
|
|
||||||
|
|
||||||
- If you don't want to deal with root:
|
|
||||||
|
|
||||||
`$ ssh master@<ip-address> -p 2222`
|
|
||||||
|
|
||||||
|
|
||||||
**VERY IMPORTANT!!!**
|
|
||||||
-----------
|
|
||||||
|
|
||||||
**Don't forget to change passwords in Dockerfile before building image!**
|
|
||||||
|
|
||||||
|
|
||||||
Versions
|
|
||||||
-----------
|
|
||||||
Some branches represents Ubuntu versions.
|
|
||||||
|
|
||||||
Branch `master` is always represented by latest Ubuntu LTS
|
|
||||||
|
|
||||||
For example:
|
|
||||||
- 12.04 - Ubuntu 12.04 LTS
|
|
||||||
- 14.04 - Ubuntu 14.04 LTS
|
|
||||||
- 16.04 - Ubuntu 16.04 LTS
|
|
||||||
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Simple Ubuntu 20.04 image
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user