Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

No way to set Packet.ServerName #189

Open
kirugan opened this issue May 3, 2018 · 1 comment
Open

No way to set Packet.ServerName #189

kirugan opened this issue May 3, 2018 · 1 comment

Comments

@kirugan
Copy link

kirugan commented May 3, 2018

Problem:

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.

@kamilogorek
Copy link
Contributor

SetServerName config method would be nice as well.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

2 participants