fix: update lego.
This commit is contained in:
parent
b8b0c8f3e5
commit
8d848c3d60
169 changed files with 12224 additions and 605 deletions
20
vendor/github.com/sacloud/libsacloud/api/polling.go
generated
vendored
20
vendor/github.com/sacloud/libsacloud/api/polling.go
generated
vendored
|
@ -21,16 +21,16 @@ func poll(handler pollingHandler, timeout time.Duration) (chan (interface{}), ch
|
|||
select {
|
||||
case <-tick:
|
||||
exit, state, err := handler()
|
||||
if state != nil {
|
||||
progChan <- state
|
||||
}
|
||||
if err != nil {
|
||||
errChan <- fmt.Errorf("Failed: poll: %s", err)
|
||||
return
|
||||
}
|
||||
if state != nil {
|
||||
progChan <- state
|
||||
if exit {
|
||||
compChan <- state
|
||||
return
|
||||
}
|
||||
if exit {
|
||||
compChan <- state
|
||||
return
|
||||
}
|
||||
case <-bomb:
|
||||
errChan <- fmt.Errorf("Timeout")
|
||||
|
@ -65,9 +65,9 @@ type hasFailed interface {
|
|||
func waitingForAvailableFunc(readFunc func() (hasAvailable, error), maxRetry int) func() (bool, interface{}, error) {
|
||||
counter := 0
|
||||
return func() (bool, interface{}, error) {
|
||||
counter++
|
||||
v, err := readFunc()
|
||||
if err != nil {
|
||||
counter++
|
||||
if maxRetry > 0 && counter < maxRetry {
|
||||
return false, nil, nil
|
||||
}
|
||||
|
@ -96,9 +96,9 @@ type hasUpDown interface {
|
|||
func waitingForUpFunc(readFunc func() (hasUpDown, error), maxRetry int) func() (bool, interface{}, error) {
|
||||
counter := 0
|
||||
return func() (bool, interface{}, error) {
|
||||
counter++
|
||||
v, err := readFunc()
|
||||
if err != nil {
|
||||
counter++
|
||||
if maxRetry > 0 && counter < maxRetry {
|
||||
return false, nil, nil
|
||||
}
|
||||
|
@ -118,9 +118,9 @@ func waitingForUpFunc(readFunc func() (hasUpDown, error), maxRetry int) func() (
|
|||
func waitingForDownFunc(readFunc func() (hasUpDown, error), maxRetry int) func() (bool, interface{}, error) {
|
||||
counter := 0
|
||||
return func() (bool, interface{}, error) {
|
||||
counter++
|
||||
v, err := readFunc()
|
||||
if err != nil {
|
||||
counter++
|
||||
if maxRetry > 0 && counter < maxRetry {
|
||||
return false, nil, nil
|
||||
}
|
||||
|
@ -140,9 +140,9 @@ func waitingForDownFunc(readFunc func() (hasUpDown, error), maxRetry int) func()
|
|||
func waitingForReadFunc(readFunc func() (interface{}, error), maxRetry int) func() (bool, interface{}, error) {
|
||||
counter := 0
|
||||
return func() (bool, interface{}, error) {
|
||||
counter++
|
||||
v, err := readFunc()
|
||||
if err != nil {
|
||||
counter++
|
||||
if maxRetry > 0 && counter < maxRetry {
|
||||
return false, nil, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue