-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
36 lines (30 loc) · 827 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
* Copyright (c) AppDynamics, Inc., and its affiliates 2020
* All Rights Reserved.
* THIS IS UNPUBLISHED PROPRIETARY CODE OF APPDYNAMICS, INC.
*
* The copyright notice above does not evidence any actual or
* intended publication of such source code
*/
package main
import (
"flag"
"go.uber.org/zap"
"in-cluster/internal/agent"
"os"
"os/signal"
)
func main() {
var agentType string
flag.StringVar(&agentType, "t", "io.opentelemetry.collector", "Agent Type String")
var agentVersion string
flag.StringVar(&agentVersion, "v", "1.0.0", "Agent Version String")
flag.Parse()
sugar := zap.NewExample().Sugar()
defer sugar.Sync()
opamoAgent := agent.NewAgent(sugar, agentType, agentVersion)
interrupt := make(chan os.Signal, 1)
signal.Notify(interrupt, os.Interrupt)
<-interrupt
opamoAgent.Shutdown()
}