Documentation ¶
Index ¶
- func DashboardCmd(spec *DashboardSpec) *tool.Command
- func DeployCmd(spec *DeploySpec) *tool.Command
- func KillCmd(spec *KillSpec) *tool.Command
- func ProfileCmd(spec *ProfileSpec) *tool.Command
- func StatusCmd(spec *StatusSpec) *tool.Command
- func StoreCmd(spec *StoreSpec) *tool.Command
- type Command
- type DashboardSpec
- type DeploySpec
- type KillSpec
- type Links
- type ProfileSpec
- type StatusSpec
- type StoreSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DashboardCmd ¶
func DashboardCmd(spec *DashboardSpec) *tool.Command
DashboardCmd implements the "weaver dashboard" command. "weaver dashboard" hosts a webpage that returns information about the current set of Service Weaver applications.
func DeployCmd ¶
func DeployCmd(spec *DeploySpec) *tool.Command
DeployCmd returns the "deploy" command.
func KillCmd ¶
KillCmd implements the "weaver kill" command. "weaver kill" kills a Service Weaver application.
func ProfileCmd ¶
func ProfileCmd(spec *ProfileSpec) *tool.Command
ProfileCmd implements the "weaver profile" command. "weaver profile" profiles a running Service Weaver application.
func StatusCmd ¶
func StatusCmd(spec *StatusSpec) *tool.Command
StatusCmd implements the "weaver status" command. "weaver status" returns information about the current set of Service Weaver applications. It is similar to running "git status" or "kubectl get".
Types ¶
type Command ¶
type Command struct { Label string // e.g., cat logs Command string // e.g., weaver gke logs '--version=="12345678"' }
A Command is a labeled terminal command that a user can run. We show these commands on the dashboard so that users can copy and run them.
type DashboardSpec ¶
type DashboardSpec struct { Tool string // e.g., weaver-gke, weaver-gke-local Flags *flag.FlagSet // command line flags // Controller returns the HTTP address of the controller and an HTTP client // that we can use to contact the controller. Controller func(context.Context) (string, *http.Client, error) // Initializes the dashboard. Init func(ctx context.Context, mux *http.ServeMux) error AppLinks func(ctx context.Context, app string) (Links, error) // app links DeploymentLinks func(ctx context.Context, app, version string) (Links, error) // version links AppCommands func(app string) []Command // app commands DeploymentCommands func(depId string) []Command // deployment commands }
DashboardSpec configures the command returned by DashboardCmd.
type DeploySpec ¶
type DeploySpec struct { Tool string // e.g., weaver-gke, weaver-gke-local Flags *flag.FlagSet // command line flags // Controller returns the HTTP address of the controller and an HTTP client // that we can use to contact the controller. Controller func(context.Context, *config.GKEConfig) (string, *http.Client, error) PrepareRollout func(context.Context, *config.GKEConfig) (*controller.RolloutRequest, error) Source func(context.Context, *config.GKEConfig) (logging.Source, error) // contains filtered or unexported fields }
type KillSpec ¶
type KillSpec struct { Tool string // e.g., weaver-gke, weaver-gke-local Flags *flag.FlagSet // command line flags // Controller returns the HTTP address of the controller and an HTTP client // that we can use to contact the controller. Controller func(context.Context) (string, *http.Client, error) // contains filtered or unexported fields }
type Links ¶
type Links struct { Logs string // link to logs Metrics string // link to metrics Traces string // link to traces }
Links contains links to display on a status page. If a link is empty, the link is omitted.
type ProfileSpec ¶
type ProfileSpec struct { Tool string // e.g., weaver-gke, weaver-gke-local Flags *flag.FlagSet // command line flags GetProfile func(ctx context.Context, req *protos.GetProfileRequest) (*protos.GetProfileReply, error) // Controller returns the HTTP address of the controller and an HTTP client // that can be used to contact the controller. Controller func(context.Context) (string, *http.Client, error) // contains filtered or unexported fields }
type StatusSpec ¶
type StatusSpec struct { Tool string // e.g., weaver-gke, weaver-gke-local Flags *flag.FlagSet // command line flags // Controller returns the HTTP address of the controller and an HTTP client // that we can use to contact the controller. Controller func(context.Context) (string, *http.Client, error) }
Directories ¶
Path | Synopsis |
---|---|
testprogram is used by version tests.
|
testprogram is used by version tests. |