validateParent validates parent service configuration
(verr *eval.ValidationErrors)
| 237 | |
| 238 | // validateParent validates parent service configuration |
| 239 | func (svc *HTTPServiceExpr) validateParent(verr *eval.ValidationErrors) { |
| 240 | n := svc.ParentName |
| 241 | if n == "" { |
| 242 | return |
| 243 | } |
| 244 | |
| 245 | p := svc.Root.Service(n) |
| 246 | if p == nil { |
| 247 | verr.Add(svc, "Parent service %s not found", n) |
| 248 | return |
| 249 | } |
| 250 | |
| 251 | if p.CanonicalEndpoint() == nil { |
| 252 | verr.Add(svc, "Parent service %s has no canonical endpoint", n) |
| 253 | } |
| 254 | if p.ParentName == svc.Name() { |
| 255 | verr.Add(svc, "Parent service %s is also child", n) |
| 256 | } |
| 257 | } |
| 258 | |
| 259 | // validateCanonicalEndpoint validates canonical endpoint configuration |
| 260 | func (svc *HTTPServiceExpr) validateCanonicalEndpoint(verr *eval.ValidationErrors) { |
no test coverage detected