mirror of
https://github.com/hanzoai/o11y-foundry.git
synced 2026-10-30 18:26:45 +00:00
# Conflicts: # api/v1alpha1/casting.go # api/v1alpha1/installation/signoz.go # docs/casting.md # docs/examples/docker/compose/pours/deployment/configs/ingester/opamp.yaml # docs/examples/systemd/binary/pours/deployment/signoz-ingester.service # docs/examples/systemd/binary/pours/deployment/signoz-signoz.service # docs/examples/systemd/binary/pours/deployment/signoz-telemetrystore-migrator.service # docs/schemas/v1alpha1.yaml # internal/foundry/registry.go # internal/instrumentation/handler.go # internal/molding/signozmolding/signoz.go
39 lines
781 B
Go
39 lines
781 B
Go
package main
|
|
|
|
import (
|
|
"os"
|
|
|
|
foundryerrors "github.com/hanzoai/o11y-foundry/internal/errors"
|
|
"github.com/hanzoai/o11y-foundry/internal/instrumentation"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func main() {
|
|
rootCmd := &cobra.Command{
|
|
Use: "foundryctl",
|
|
SilenceUsage: true,
|
|
CompletionOptions: cobra.CompletionOptions{
|
|
DisableDefaultCmd: true,
|
|
},
|
|
PersistentPreRunE: newRoot,
|
|
}
|
|
|
|
// Register configuration.
|
|
commonCfg.RegisterFlags(rootCmd)
|
|
poursCfg.RegisterFlags(rootCmd)
|
|
|
|
// Register commands.
|
|
registerGaugeCmd(rootCmd)
|
|
registerForgeCmd(rootCmd)
|
|
registerCastCmd(rootCmd)
|
|
registerGenCmd(rootCmd)
|
|
registerCatalogCmd(rootCmd)
|
|
registerVersionCmd(rootCmd)
|
|
|
|
defer closeRoot()
|
|
|
|
if err := rootCmd.Execute(); err != nil {
|
|
os.Exit(foundryerrors.ExitCode(err))
|
|
}
|
|
}
|