Currently there is no way to set ServerName property in Packet struct. Here is the only code that access this property:
if packet.ServerName == "" {
packet.ServerName = hostname
}
where hostname value is a result of call to os.Hostname()Link to code ^.
Why do we need one:
I need to distinguish hostname from server_name, cause in environments like kubernetes it is useful to have pod name as a hostname and real server name as a server_name.
You can specify hostname by using host tag, unfortunately server_name tag doesn't work the same way.
Proposed solution
Simplest solution is to use server_name tag for this field, no bc changes and everyone is happy.
P.S. If this ^ is ok, i will make a PR with such changes.
Problem:
Currently there is no way to set ServerName property in Packet struct. Here is the only code that access this property:
where hostname value is a result of call to
os.Hostname()
Link to code ^.Why do we need one:
I need to distinguish hostname from server_name, cause in environments like kubernetes it is useful to have pod name as a hostname and real server name as a server_name. You can specify hostname by using
host
tag, unfortunatelyserver_name
tag doesn't work the same way.Proposed solution
Simplest solution is to use
server_name
tag for this field, no bc changes and everyone is happy.P.S. If this ^ is ok, i will make a PR with such changes.