TUN-4206: Better error message when user is only using one ingress rule

This commit is contained in:
Adam Chalmers
2021-04-09 16:30:14 -05:00
parent 1073f8db40
commit eed7d7bbc9
2 changed files with 23 additions and 6 deletions

View File

@@ -138,6 +138,11 @@ func (ing Ingress) IsEmpty() bool {
return len(ing.Rules) == 0
}
// IsSingleRule checks if the user only specified a single ingress rule.
func (ing Ingress) IsSingleRule() bool {
return len(ing.Rules) == 1
}
// StartOrigins will start any origin services managed by cloudflared, e.g. proxy servers or Hello World.
func (ing Ingress) StartOrigins(
wg *sync.WaitGroup,