-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
name
committed
Jun 2, 2021
1 parent
096b1e2
commit 1771b40
Showing
11 changed files
with
288 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
package conf | ||
|
||
import "github.com/docker/docker/api/types" | ||
import ( | ||
"docker-agent/service/model" | ||
"github.com/docker/docker/api/types" | ||
) | ||
|
||
var DockerInfo types.Info | ||
|
||
var ( | ||
LogsFollow model.SyncMap | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,19 @@ | ||
package conf | ||
|
||
import "github.com/go-basic/uuid" | ||
import ( | ||
"github.com/go-basic/uuid" | ||
"strings" | ||
) | ||
|
||
var DockerServer = "" //eg.: http://localhost:8080/docker/ | ||
var DockerWsServer = "" //eg.: ws://localhost:8080/docker/ws | ||
var DockerServer = "" //eg.: http://localhost:8080/docker/ | ||
var Token = "12345678" | ||
var AppId = uuid.New() | ||
|
||
func GetDockerWsUrl() string { | ||
//var DockerWsServer = "" //eg.: ws://localhost:8080/docker/ws | ||
if strings.HasPrefix(DockerServer, "http://") { | ||
return "ws://" + strings.TrimLeft(DockerServer, "http://") + "/ws" | ||
} else { | ||
return "wss://" + strings.TrimLeft(DockerServer, "https://") + "/ws" | ||
} | ||
} |
Oops, something went wrong.