Add ServerBlockIndex and ServerBlockHosts to Controller

This way, Setup functions have access to the list of hosts that share the server block, and also, if needed for some reason, the index of the server block in the input
This commit is contained in:
Matthew Holt 2015-10-15 23:34:54 -06:00
parent 691204ceed
commit 2236780190
3 changed files with 24 additions and 1 deletions

View file

@ -24,6 +24,15 @@ type Controller struct {
// (not deferred) and may return an error which is
// returned by OncePerServerBlock.
OncePerServerBlock func(f func() error) error
// ServerBlockIndex is the 0-based index of the
// server block as it appeared in the input.
ServerBlockIndex int
// ServerBlockHosts is a list of hosts that are
// associated with this server block. All these
// hosts, consequently, share the same tokens.
ServerBlockHosts []string
}
// NewTestController creates a new *Controller for