-
Notifications
You must be signed in to change notification settings - Fork 687
/
main.go
32 lines (27 loc) · 1.19 KB
/
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
// Ambassador combines the various Golang binaries used in the Ambassador
// container, dispatching on os.Args[0] like BusyBox. Note that the
// capabilities_wrapper binary is _not_ included here. That one has special
// permissions magic applied to it that is not appropriate for these other
// binaries.
package main
import (
"github.com/datawire/ambassador/pkg/busy"
"github.com/datawire/ambassador/pkg/environment"
"github.com/datawire/ambassador/cmd/ambex"
"github.com/datawire/ambassador/cmd/entrypoint"
"github.com/datawire/ambassador/cmd/kubestatus"
"github.com/datawire/ambassador/cmd/reproducer"
"github.com/datawire/ambassador/cmd/watt"
)
// Version is inserted at build-time using --ldflags -X
var Version = "(unknown version)"
func noop() {}
func main() {
busy.Main("busyambassador", "Ambassador", Version, map[string]busy.Command{
"ambex": {Setup: environment.EnvironmentSetupEntrypoint, Run: ambex.Main},
"watt": {Setup: environment.EnvironmentSetupEntrypoint, Run: watt.Main},
"kubestatus": {Setup: environment.EnvironmentSetupEntrypoint, Run: kubestatus.Main},
"entrypoint": {Setup: noop, Run: entrypoint.Main},
"reproducer": {Setup: noop, Run: reproducer.Main},
})
}