Move to vendor
Signed-off-by: Olivier Gambier <olivier@docker.com>
This commit is contained in:
parent
c8d8e7e357
commit
77e69b9cf3
1268 changed files with 34 additions and 24 deletions
27
vendor/github.com/yvasiyarov/newrelic_platform_go/agent.go
generated
vendored
Normal file
27
vendor/github.com/yvasiyarov/newrelic_platform_go/agent.go
generated
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
package newrelic_platform_go
|
||||
|
||||
import (
|
||||
"log"
|
||||
"os"
|
||||
)
|
||||
|
||||
type Agent struct {
|
||||
Host string `json:"host"`
|
||||
Version string `json:"version"`
|
||||
Pid int `json:"pid"`
|
||||
}
|
||||
|
||||
func NewAgent(Version string) *Agent {
|
||||
agent := &Agent{
|
||||
Version: Version,
|
||||
}
|
||||
return agent
|
||||
}
|
||||
|
||||
func (agent *Agent) CollectEnvironmentInfo() {
|
||||
var err error
|
||||
agent.Pid = os.Getpid()
|
||||
if agent.Host, err = os.Hostname(); err != nil {
|
||||
log.Fatalf("Can not get hostname: %#v \n", err)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue