MCPcopy
hub / github.com/dgraph-io/dgraph / publicPort

Method publicPort

testutil/docker.go:110–121  ·  view source on GitHub ↗
(privatePort uint16)

Source from the content-addressed store, hash-verified

108}
109
110func (in ContainerInstance) publicPort(privatePort uint16) string {
111 c := in.GetContainer()
112 if c == nil {
113 return ""
114 }
115 for _, p := range c.Ports {
116 if p.PrivatePort == privatePort {
117 return strconv.Itoa(int(p.PublicPort))
118 }
119 }
120 return ""
121}
122
123func (in ContainerInstance) login() error {
124 addr := in.publicPort(8080)

Callers 2

loginMethod · 0.95

Calls 1

GetContainerMethod · 0.95

Tested by

no test coverage detected