INNER CODE UNIT · Go

main

antrea-io/antrea · cmd/antrea-agent/main.go:30

func main() {
	command := newAgentCommand()
	if err := command.Execute(); err != nil {
		os.Exit(1)
	}
}

func newAgentCommand() *cobra.Command {
	opts := newOptions()

	cmd := &cobra.Command{
		Use:  "antrea-agent",
		Long: "The Antrea agent runs on each node.",
		Run: func(cmd *cobra.Command, args []string) {
			log.InitLogs(cmd.Flags())
			defer log.FlushLogs()
			if err := opts.complete(args); err != nil {
				klog.Fatalf("Failed to complete: %v", err)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…