Documentation ¶
Index ¶
- Variables
- func AGPL() []*cobra.Command
- func Core() []*cobra.Command
- func CreateClient(cmd *cobra.Command) (*codersdk.Client, error)
- func CurrentOrganization(cmd *cobra.Command, client *codersdk.Client) (codersdk.Organization, error)
- func EnsureExperimental(cmd *cobra.Command, name string) error
- func ExperimentalEnabled(cmd *cobra.Command) bool
- func FormatCobraError(err error, cmd *cobra.Command) string
- func Root(subcommands []*cobra.Command) *cobra.Command
- func Server(vip *viper.Viper, ...) *cobra.Command
- type LoadTest
- type LoadTestConfig
- type LoadTestStrategy
- type LoadTestStrategyType
- type LoadTestType
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Caret = cliui.Styles.Prompt.String()
)
Functions ¶
func CreateClient ¶ added in v0.8.7
CreateClient returns a new client from the command context. It reads from global configuration files if flags are not set.
func CurrentOrganization ¶ added in v0.12.0
func CurrentOrganization(cmd *cobra.Command, client *codersdk.Client) (codersdk.Organization, error)
CurrentOrganization returns the currently active organization for the authenticated user.
func EnsureExperimental ¶ added in v0.9.3
EnsureExperimental will ensure that the experimental feature flag is set if the given flag is set.
func ExperimentalEnabled ¶ added in v0.9.3
ExperimentalEnabled returns if the experimental feature flag is enabled.
func FormatCobraError ¶ added in v0.6.0
FormatCobraError colorizes and adds "--help" docs to cobra commands.
Types ¶
type LoadTest ¶ added in v0.12.2
type LoadTest struct { // Type is the type of load test to run. Type LoadTestType `json:"type"` // Count is the number of test runs to execute with this configuration. If // the count is 0 or negative, defaults to 1. Count int `json:"count"` // Placebo must be set if type == "placebo". Placebo *placebo.Config `json:"placebo,omitempty"` // WorkspaceBuild must be set if type == "workspacebuild". WorkspaceBuild *workspacebuild.Config `json:"workspacebuild,omitempty"` }
type LoadTestConfig ¶ added in v0.12.2
type LoadTestConfig struct { Strategy LoadTestStrategy `json:"strategy"` Tests []LoadTest `json:"tests"` // Timeout sets a timeout for the entire test run, to control the timeout // for each individual run use strategy.timeout. Timeout httpapi.Duration `json:"timeout"` }
LoadTestConfig is the overall configuration for a call to `coder loadtest`.
func (*LoadTestConfig) Validate ¶ added in v0.12.2
func (c *LoadTestConfig) Validate() error
type LoadTestStrategy ¶ added in v0.12.2
type LoadTestStrategy struct { // Type is the type of load test strategy to use. Strategies determine how // to run tests concurrently. Type LoadTestStrategyType `json:"type"` // ConcurrencyLimit is the maximum number of concurrent runs. This only // applies if type == "concurrent". Negative values disable the concurrency // limit and attempts to perform all runs concurrently. The default value is // 100. ConcurrencyLimit int `json:"concurrency_limit"` // Shuffle determines whether or not to shuffle the test runs before // executing them. Shuffle bool `json:"shuffle"` // Timeout is the maximum amount of time to run each test for. This is // independent of the timeout specified in the test run. A timeout of 0 // disables the timeout. Timeout httpapi.Duration `json:"timeout"` }
func (LoadTestStrategy) ExecutionStrategy ¶ added in v0.12.2
func (s LoadTestStrategy) ExecutionStrategy() harness.ExecutionStrategy
func (*LoadTestStrategy) Validate ¶ added in v0.12.2
func (s *LoadTestStrategy) Validate() error
type LoadTestStrategyType ¶ added in v0.12.2
type LoadTestStrategyType string
const ( LoadTestStrategyTypeLinear LoadTestStrategyType = "linear" LoadTestStrategyTypeConcurrent LoadTestStrategyType = "concurrent" )
type LoadTestType ¶ added in v0.12.2
type LoadTestType string
const ( LoadTestTypePlacebo LoadTestType = "placebo" LoadTestTypeWorkspaceBuild LoadTestType = "workspacebuild" )
Source Files ¶
- agent.go
- agent_unix.go
- configssh.go
- constants.go
- create.go
- delete.go
- dotfiles.go
- gitaskpass.go
- gitssh.go
- list.go
- loadtest.go
- loadtestconfig.go
- login.go
- logout.go
- parameter.go
- parameters.go
- parameterslist.go
- portforward.go
- publickey.go
- rename.go
- resetpassword.go
- root.go
- schedule.go
- server.go
- show.go
- signal_unix.go
- speedtest.go
- ssh.go
- ssh_other.go
- start.go
- state.go
- stop.go
- templatecreate.go
- templatedelete.go
- templateedit.go
- templateinit.go
- templatelist.go
- templateplan.go
- templatepull.go
- templatepush.go
- templates.go
- templateversions.go
- tokens.go
- update.go
- usercreate.go
- userlist.go
- users.go
- userstatus.go
- util.go
Click to show internal directories.
Click to hide internal directories.