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

Method login

testutil/docker.go:123–140  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

121}
122
123func (in ContainerInstance) login() error {
124 addr := in.publicPort(8080)
125 if len(addr) == 0 {
126 return fmt.Errorf("unable to find container: %s", in)
127 }
128
129 _, err := HttpLogin(&LoginParams{
130 Endpoint: "http://0.0.0.0:" + addr + "/admin",
131 UserID: "groot",
132 Passwd: "password",
133 })
134
135 if err != nil {
136 return fmt.Errorf("while connecting: %v", err)
137 }
138 fmt.Printf("Logged into %s\n", in)
139 return nil
140}
141
142func (in ContainerInstance) bestEffortTryLogin() error {
143 for range 60 {

Callers 1

bestEffortTryLoginMethod · 0.95

Calls 3

publicPortMethod · 0.95
HttpLoginFunction · 0.85
ErrorfMethod · 0.45

Tested by

no test coverage detected