Runtime Retries Limit (#1163)
* Implement Runtime Retries * Remove Debug * Action Feedback * Refactor Retries * Fix WithRetires Typo
This commit is contained in:
@@ -51,6 +51,8 @@ type CreateOptions struct {
|
||||
Output io.Writer
|
||||
// Type of service to create
|
||||
Type string
|
||||
// Retries before failing deploy
|
||||
Retries int
|
||||
}
|
||||
|
||||
// ReadOptions queries runtime services
|
||||
@@ -78,6 +80,13 @@ func WithCommand(args ...string) CreateOption {
|
||||
}
|
||||
}
|
||||
|
||||
// WithRetries sets the max retries attemps
|
||||
func WithRetries(retries int) CreateOption {
|
||||
return func(o *CreateOptions) {
|
||||
o.Retries = retries
|
||||
}
|
||||
}
|
||||
|
||||
// WithEnv sets the created service environment
|
||||
func WithEnv(env []string) CreateOption {
|
||||
return func(o *CreateOptions) {
|
||||
@@ -99,7 +108,7 @@ func ReadService(service string) ReadOption {
|
||||
}
|
||||
}
|
||||
|
||||
// WithVersion confifgures service version
|
||||
// ReadVersion confifgures service version
|
||||
func ReadVersion(version string) ReadOption {
|
||||
return func(o *ReadOptions) {
|
||||
o.Version = version
|
||||
|
Reference in New Issue
Block a user