refactor: rewrite network plugin in golang
This commit is contained in:
1 parent
e74346f0dc
commit
c788659b63
69 files changed
+3710
-274
No files matched your search
@@ -0,0 +1,22 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
common "github.com/dokku/dokku/plugins/common"
|
||||
network "github.com/dokku/dokku/plugins/network"
|
||||
)
|
||||
|
||||
// write the ipaddress to stdout for a given app container
|
||||
func main() {
|
||||
flag.Parse()
|
||||
appName := flag.Arg(1)
|
||||
procType := flag.Arg(2)
|
||||
isHerokuishContainer := common.ToBool(flag.Arg(3))
|
||||
containerId := flag.Arg(4)
|
||||
|
||||
ipAddress := network.GetContainerIpaddress(appName, procType, isHerokuishContainer, containerId)
|
||||
fmt.Fprintln(os.Stdout, ipAddress)
|
||||
}
|
||||
Reference in new issue
Block a user