Open mas-who opened 1 month ago
@mas-who thanks for tracking this. After thinking through the details I am not so sure about this one anymore.
Let's say we would define a type ServerName string
and derive two constants ServerNameCore
and ServerNameUnix
from it.
I have the feeling this would indicate someone SHOULD use those constants as they already exist. So it would have the opposite effect of what we are trying to achieve.
Right now if you add additional servers by using either core
or unix
it will return an error. As this cannot happen during runtime (only when starting up), I guess we are fine leaving it like this?
When adding additional network listeners in a downstream project using
(microcluster.Microcluster).AddServers
, we need to pass in a map of the typemap[string]rest.Server
. Since there are reserved names for microcluster internal network listeners such ascore
andunix
, we should provide a server name type so that it is clear to the downstream project server names should be chosen with care.