Documentation
¶
Index ¶
- Constants
- Variables
- func AddMetrics2PoolLabels(poolLabels *[]api.PoolLabel)
- func AliasNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName
- func ApplyReSimStyle(cmd *cobra.Command)
- func DetermineTriggerMethod() *api.TriggeredVia
- func Execute() error
- func GetBffClient(ctx context.Context, cache CredentialCache) graphql.Client
- func GetCIEnvironmentVariableAccount() string
- func GetClient(ctx context.Context, cache CredentialCache) (*api.ClientWithResponses, error)
- func GetConfigDir() (string, error)
- func OutputJson(data interface{})
- func ParseBuildSpec(buildSpecLocation string, withOsEnv bool, withEnvFiles []string, ...) (*compose_types.Project, error)
- func ParseParameterString(parameterString string) (string, string, error)
- func ProcessMetricsSet(metricsSetKey string, poolLabels *[]api.PoolLabel) *string
- func RegisterViperFlags(cmd *cobra.Command, args []string)
- func RegisterViperFlagsAndSetClient(cmd *cobra.Command, args []string)
- func SetClient(cmd *cobra.Command, args []string)
- func ValidateResponse(expectedStatusCode int, message string, response *http.Response, body []byte)
- type AuthMode
- type CredentialCache
- type DownloadableLog
- type FlagSets
- type LogConfig
- type LogsFile
- type Spinner
- type SuperviseParams
- type SuperviseResult
- type TimeoutError
Constants ¶
const ( //Defaults: DefaultCPUs = 4 DefaultGPUs = 0 DefaultMemoryMiB = 16384 )
const ConfigPath = "$HOME/.resim"
const CredentialCacheFilename = "cache.json"
const (
LogIngestURI = "public.ecr.aws/resim/open-builds/log-ingest:latest"
)
const METRICS_2_POOL_LABEL = "resim:metrics2"
Variables ¶
var BffClient graphql.Client
var Client api.ClientWithResponsesInterface
var FlagSetUsageTemplate string = `` /* 163-byte string literal not displayed */
var ReSimUsageTemplate string = `` /* 1503-byte string literal not displayed */
Functions ¶
func AddMetrics2PoolLabels ¶ added in v0.27.0
Add Metrics 2.0 Pool labels to the list of pool labels:
func AliasNormalizeFunc ¶ added in v0.1.20
func AliasNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName
func ApplyReSimStyle ¶ added in v0.1.20
func DetermineTriggerMethod ¶ added in v0.3.5
func DetermineTriggerMethod() *api.TriggeredVia
Attempt to determine the environment we're in. i.e. are we running in Gitlab CI? Github CI? or maybe just running locally on a customer's machine? This information is useful downstream, for understanding where a batch was triggered from.
func GetBffClient ¶ added in v0.12.0
func GetBffClient(ctx context.Context, cache CredentialCache) graphql.Client
func GetCIEnvironmentVariableAccount ¶ added in v0.3.1
func GetCIEnvironmentVariableAccount() string
func GetClient ¶
func GetClient(ctx context.Context, cache CredentialCache) (*api.ClientWithResponses, error)
func GetConfigDir ¶ added in v0.1.31
func OutputJson ¶ added in v0.1.20
func OutputJson(data interface{})
func ParseBuildSpec ¶ added in v0.17.0
func ParseParameterString ¶ added in v0.7.0
ParseParameterString parses a string in the format "key=value" or "key:value" into a key-value pair. It first tries to split on "=" and falls back to ":" if that fails. This is especially useful for cases where parameter names contain colons, which is often the case in ros-based systems (e.g., "namespace::param").
func ProcessMetricsSet ¶ added in v0.24.0
ProcessMetricsSet handles the common logic for processing metrics sets and automatically adding the special metrics 2.0 pool label when needed. Returns the metrics set name if set, nil otherwise.
func RegisterViperFlags ¶ added in v0.1.10
func RegisterViperFlagsAndSetClient ¶ added in v0.1.19
Types ¶
type CredentialCache ¶ added in v0.1.18
type CredentialCache struct { Tokens map[string]oauth2.Token `json:"tokens"` TokenSource oauth2.TokenSource ClientID string }
func Authenticate ¶ added in v0.12.0
func Authenticate(ctx context.Context) (*CredentialCache, error)
func (*CredentialCache) SaveCredentialCache ¶ added in v0.1.18
func (c *CredentialCache) SaveCredentialCache()
type DownloadableLog ¶ added in v0.13.0
type DownloadableLog struct { FileName string LogOutputLocation string FileSize int64 LogType api.LogType }
func DownloadableLogsFromBatchLogs ¶ added in v0.13.0
func DownloadableLogsFromBatchLogs(batchLogs []api.BatchLog) []DownloadableLog
func DownloadableLogsFromJobLogs ¶ added in v0.13.0
func DownloadableLogsFromJobLogs(jobLogs []api.JobLog) []DownloadableLog
type FlagSets ¶ added in v0.1.20
type FlagSets struct {
// contains filtered or unexported fields
}
func (FlagSets) HasOptional ¶ added in v0.1.20
func (FlagSets) HasRequired ¶ added in v0.1.20
func (FlagSets) OptionalUsages ¶ added in v0.1.20
func (FlagSets) RequiredUsages ¶ added in v0.1.20
type Spinner ¶ added in v0.10.0
type Spinner struct {
// contains filtered or unexported fields
}
func NewSpinner ¶ added in v0.10.0
type SuperviseParams ¶ added in v0.26.0
type SuperviseParams struct { ProjectID uuid.UUID MaxRerunAttempts int RerunMaxFailurePercent float64 UndesiredConflatedStates []api.ConflatedJobStatus Timeout time.Duration PollInterval time.Duration BatchID string BatchName string }
SuperviseParams contains the parameters needed for actualSuperviseBatch
type SuperviseResult ¶ added in v0.26.0
SuperviseResult contains the result information from actualSuperviseBatch
type TimeoutError ¶ added in v0.26.0
type TimeoutError struct {
// contains filtered or unexported fields
}
TimeoutError represents a timeout condition
func (*TimeoutError) Error ¶ added in v0.26.0
func (e *TimeoutError) Error() string
func (*TimeoutError) IsTimeout ¶ added in v0.26.0
func (e *TimeoutError) IsTimeout() bool