Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Command = &cli.Command{ Name: "bridge", Usage: "open Kubernetes dashboard", Flags: []cli.Flag{ app.ScopeFlag, app.NamespacesFlag, }, Action: func(ctx context.Context, cmd *cli.Command) error { client := app.MustClient(ctx, cmd) port, err := system.FreePort(8888) if err != nil { return err } srv, err := bridge.New(client, nil) if err != nil { return err } url := fmt.Sprintf("http://localhost:%d", port) addr := fmt.Sprintf("localhost:%d", port) time.AfterFunc(500*time.Millisecond, func() { cli.Infof("Bridge on %s", url) cli.OpenURL(url) }) return srv.ListenAndServe(ctx, addr) }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.