Controller.Key is used as a key in a storage, so each host have it’s own “space”. I don’t have a link to the source code, but i can try to provide an example
Problem is to distinguish modules in different hosts. For example:
http://localhost {
route {
test
}
}
http://foo.bar {
route {
test
}
}
there will be 2 test module’s instances and i’d like to get host in each Provision call. I can’t describe global storage’s purpose without diving into internal kitchen but let’s say it’s some config storage, so we get configuration based on host
Well, that’s not possible because the site address is a matcher in a subroute above your handler, and your handler doesn’t have access to that.
If you need to identify your specific handler by some unique ID, then you should pass it as an argument to that handler in its config.
But seriously, it’s hard to give specific help without specific details. If you’re vague about what you’re trying to achieve, we can only be vague with our answers.