Enabling default runtime to run multiple versions (#1545)

* Enabling default runtime to run multiple versions

* Trigger build

* Fix

* Sprintf
This commit is contained in:
Janos Dobronszki
2020-04-20 15:54:29 +02:00
committed by GitHub
parent c4acf3c2cb
commit 7c31edd5f8
2 changed files with 16 additions and 7 deletions

View File

@@ -1,6 +1,7 @@
package runtime
import (
"fmt"
"io"
"strconv"
"strings"
@@ -76,6 +77,10 @@ func (s *service) shouldStart() bool {
return s.retries <= s.maxRetries
}
func (s *service) key() string {
return fmt.Sprintf("%v:%v", s.Name, s.Version)
}
func (s *service) ShouldStart() bool {
s.RLock()
defer s.RUnlock()