Update the runtime for k8s name formatting and move Get to Read endpoint (#978)

* Update the runtime for k8s name formatting and move Get to Read endpoint

* strip regex validation
This commit is contained in:
Asim Aslam
2019-11-25 16:31:14 +00:00
committed by GitHub
parent 95045be83d
commit 252667398e
17 changed files with 268 additions and 589 deletions

View File

@@ -176,9 +176,9 @@ func (r *runtime) Create(s *Service, opts ...CreateOption) error {
return nil
}
// Get returns all instances of requested service
// Read returns all instances of requested service
// If no service name is provided we return all the track services.
func (r *runtime) Get(name string, opts ...GetOption) ([]*Service, error) {
func (r *runtime) Read(name string, opts ...ReadOption) ([]*Service, error) {
r.Lock()
defer r.Unlock()
@@ -186,7 +186,7 @@ func (r *runtime) Get(name string, opts ...GetOption) ([]*Service, error) {
return nil, errors.New("missing service name")
}
gopts := GetOptions{}
gopts := ReadOptions{}
for _, o := range opts {
o(&gopts)
}