Documentation
¶
Index ¶
- Constants
- func AddArmadaApiConnectionCommandlineArgs(rootCmd *cobra.Command)
- func AddClientIds(jobs []*api.JobSubmitRequestItem)
- func CreateApiConnection(config *ApiConnectionDetails, additionalDialOptions ...grpc.DialOption) (*grpc.ClientConn, error)
- func CreateApiConnectionWithCallOptions(config *ApiConnectionDetails, additionalDefaultCallOptions []grpc.CallOption, ...) (*grpc.ClientConn, error)
- func CreateChunkedSubmitRequests(queue string, jobSetId string, jobs []*api.JobSubmitRequestItem) []*api.JobSubmitRequest
- func CreateQueue(submitClient api.SubmitClient, queue *api.Queue) error
- func DeleteQueue(submitClient api.SubmitClient, name string) error
- func GetJobSetState(client api.EventClient, queue, jobSetId string, context context.Context) *domain.WatchContext
- func GetKubectlCommand(cluster string, namespace string, jobId string, podNumber int, cmd string) string
- func LoadClientConfig(configPath string) (*armadaClientConfig, error)
- func LoadCommandlineArgs() error
- func LoadCommandlineArgsFromConfigFile(cfgFile string) error
- func NewThreadSafeStringSlice() *threadSafeStringSlice
- func SubmitJobs(submitClient api.SubmitClient, request *api.JobSubmitRequest) (*api.JobSubmitResponse, error)
- func UpdateQueue(submitClient api.SubmitClient, queue *api.Queue) error
- func WatchJobEvents(ctx context.Context, client api.EventClient, queue, jobSetId string, ...) *domain.WatchContext
- func WatchJobSet(client api.EventClient, queue, jobSetId string, waitForNew bool, ...) *domain.WatchContext
- func WatchJobSetWithJobIdsFilter(client api.EventClient, queue, jobSetId string, waitForNew bool, ...) *domain.WatchContext
- func WithConnection(apiConnectionDetails *ApiConnectionDetails, action func(*grpc.ClientConn))
- type ApiConnectionDetails
- type ArmadaLoadTester
- type ConnectionDetails
- type LoadTester
Constants ¶
const MaxJobsPerRequest = 200
Variables ¶
This section is empty.
Functions ¶
func AddArmadaApiConnectionCommandlineArgs ¶
AddArmadaApiConnectionCommandlineArgs adds command-line flags to a cobra command. Arguments given via these flags are later used by LoadCommandlineArgsFromConfigFile. Hence, apps that use the client package to load config should call this function as part of their initialization.
func AddClientIds ¶ added in v0.1.28
func AddClientIds(jobs []*api.JobSubmitRequestItem)
func CreateApiConnection ¶
func CreateApiConnection(config *ApiConnectionDetails, additionalDialOptions ...grpc.DialOption) (*grpc.ClientConn, error)
func CreateApiConnectionWithCallOptions ¶ added in v0.2.14
func CreateApiConnectionWithCallOptions( config *ApiConnectionDetails, additionalDefaultCallOptions []grpc.CallOption, additionalDialOptions ...grpc.DialOption) (*grpc.ClientConn, error)
func CreateChunkedSubmitRequests ¶
func CreateChunkedSubmitRequests(queue string, jobSetId string, jobs []*api.JobSubmitRequestItem) []*api.JobSubmitRequest
func CreateQueue ¶
func CreateQueue(submitClient api.SubmitClient, queue *api.Queue) error
func DeleteQueue ¶ added in v0.1.14
func DeleteQueue(submitClient api.SubmitClient, name string) error
func GetJobSetState ¶ added in v0.1.4
func GetJobSetState(client api.EventClient, queue, jobSetId string, context context.Context) *domain.WatchContext
func GetKubectlCommand ¶ added in v0.1.4
func LoadClientConfig ¶ added in v0.2.13
LoadClientConfig reads in config from the file at configPath, or, if configPath is the empty string, from $HOME/.armada/config, and from environment variables, using viper.
func LoadCommandlineArgs ¶ added in v0.2.14
func LoadCommandlineArgs() error
LoadCommandlineArgsFromConfigFile loads armadactl config armadactl-defaults.yaml - From exePath, where exePath is the path to the armadactl executable armada config file - From cfgFile, set by the --config CLI flag, or defaulting to $HOME/.armadactl if not set These configs are then merged
func LoadCommandlineArgsFromConfigFile ¶
LoadCommandlineArgsFromConfigFile loads armadactl config armadactl-defaults.yaml - From exePath, where exePath is the path to the armadactl executable armada config file - From cfgFile or defaulting to $HOME/.armadactl These configs are then merged
func NewThreadSafeStringSlice ¶ added in v0.1.8
func NewThreadSafeStringSlice() *threadSafeStringSlice
func SubmitJobs ¶
func SubmitJobs(submitClient api.SubmitClient, request *api.JobSubmitRequest) (*api.JobSubmitResponse, error)
func UpdateQueue ¶ added in v0.2.3
func UpdateQueue(submitClient api.SubmitClient, queue *api.Queue) error
func WatchJobEvents ¶ added in v0.2.11
func WatchJobEvents(ctx context.Context, client api.EventClient, queue, jobSetId string, onUpdate func(*domain.WatchContext, api.Event) bool) *domain.WatchContext
func WatchJobSet ¶
func WatchJobSet(client api.EventClient, queue, jobSetId string, waitForNew bool, context context.Context, onUpdate func(*domain.WatchContext, api.Event) bool) *domain.WatchContext
func WatchJobSetWithJobIdsFilter ¶
func WatchJobSetWithJobIdsFilter(client api.EventClient, queue, jobSetId string, waitForNew bool, jobIds []string, context context.Context, onUpdate func(*domain.WatchContext, api.Event) bool) *domain.WatchContext
func WithConnection ¶
func WithConnection(apiConnectionDetails *ApiConnectionDetails, action func(*grpc.ClientConn))
Types ¶
type ApiConnectionDetails ¶
type ApiConnectionDetails struct { ArmadaUrl string BasicAuth common.LoginCredentials OpenIdAuth oidc.PKCEDetails OpenIdDeviceAuth oidc.DeviceDetails OpenIdPasswordAuth oidc.ClientPasswordDetails OpenIdClientCredentialsAuth oidc.ClientCredentialsDetails KerberosAuth kerberos.ClientConfig ForceNoTls bool ExecAuth exec.CommandDetails }
func ExtractCommandlineArmadaApiConnectionDetails ¶
func ExtractCommandlineArmadaApiConnectionDetails() *ApiConnectionDetails
ExtractCommandlineArmadaApiConnectionDetails extracts Armada server connection details from the config loaded into viper. Hence, this function must be called after loading config into viper, e.g., by calling LoadCommandlineArgsFromConfigFile.
type ArmadaLoadTester ¶
type ArmadaLoadTester struct {
// contains filtered or unexported fields
}
func NewArmadaLoadTester ¶
func NewArmadaLoadTester(connectionDetails *ApiConnectionDetails) *ArmadaLoadTester
func (ArmadaLoadTester) RunSubmissionTest ¶
func (apiLoadTester ArmadaLoadTester) RunSubmissionTest(ctx context.Context, spec domain.LoadTestSpecification, watchEvents bool) domain.LoadTestSummary
type ConnectionDetails ¶ added in v0.2.11
type ConnectionDetails func() *ApiConnectionDetails
type LoadTester ¶
type LoadTester interface {
RunSubmissionTest(ctx context.Context, spec domain.LoadTestSpecification, watchEvents bool) *domain.WatchContext
}