MCPcopy Create free account
hub / github.com/cloudbase/garm / ensureDefaultEndpoints

Function ensureDefaultEndpoints

cmd/garm-cli/cmd/init.go:137–166  ·  view source on GitHub ↗
(loginURL string)

Source from the content-addressed store, hash-verified

135}
136
137func ensureDefaultEndpoints(loginURL string) (err error) {
138 if metadataURL == "" {
139 metadataURL, err = url.JoinPath(loginURL, "api/v1/metadata")
140 if err != nil {
141 return err
142 }
143 }
144
145 if callbackURL == "" {
146 callbackURL, err = url.JoinPath(loginURL, "api/v1/callbacks")
147 if err != nil {
148 return err
149 }
150 }
151
152 if webhookURL == "" {
153 webhookURL, err = url.JoinPath(loginURL, "webhooks")
154 if err != nil {
155 return err
156 }
157 }
158
159 if agentURL == "" {
160 agentURL, err = url.JoinPath(loginURL, "agent")
161 if err != nil {
162 return err
163 }
164 }
165 return nil
166}
167
168func promptUnsetInitVariables() error {
169 var err error

Callers 1

init.goFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected