runtime: minor fixes for local runtime (#2019)

This commit is contained in:
ben-toogood
2020-09-24 16:46:23 +01:00
committed by GitHub
parent af8d55eb7f
commit 255fecb4f4
2 changed files with 3 additions and 2 deletions

View File

@@ -18,7 +18,7 @@ import (
)
// defaultNamespace to use if not provided as an option
const defaultNamespace = "default"
const defaultNamespace = "micro"
var (
// The directory for logs to be output
@@ -313,7 +313,7 @@ func (r *localRuntime) Create(s *runtime.Service, opts ...runtime.CreateOption)
r.namespaces[options.Namespace] = make(map[string]*service)
}
if _, ok := r.namespaces[options.Namespace][serviceKey(s)]; ok {
return errors.New("service already running")
return runtime.ErrAlreadyExists
}
// create new service

View File

@@ -8,6 +8,7 @@ import (
var (
ErrAlreadyExists = errors.New("already exists")
ErrNotFound = errors.New("not found")
)
// Runtime is a service runtime manager