Skip to content

Commit ac0eed7

Browse files
committed
ref(services): replace deis with teamhephy
replace deis with teamhephy in import dependencies, also add more details in comments re functionality.
1 parent d0c2d4e commit ac0eed7

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

services/services.go

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"fmt"
77
"io/ioutil"
88

9-
deis "github.com/deis/controller-sdk-go"
10-
"github.com/deis/controller-sdk-go/api"
9+
deis "github.com/teamhephy/controller-sdk-go"
10+
"github.com/teamhephy/controller-sdk-go/api"
1111
)
1212

1313
// List services registered with an app.
@@ -44,7 +44,13 @@ func List(c *deis.Client, appID string) (api.Services, error) {
4444
return services, reqErr
4545
}
4646

47-
// New adds a service to an app.
47+
// New adds a new service to an app. App should already exists.
48+
// Service is the way to route some traffic matching given URL pattern to worker different than `web`
49+
// procfileType - name of the process in Procfile (i.e. <process type> from the `<process type>: <command>`), e.g. `webhooks`
50+
// for more about Procfile see this https://devcenter.heroku.com/articles/procfile
51+
// pathPattern - one or several regexp patterns separated by comma, all request matching given regexp
52+
// are routed to the procfileType workers. E.g. `/webhooks/notify,~ ^/users/[0-9]+/.*/webhooks/notify,/webhooks/rest`
53+
// procfileType and pathPattern are mandatory and should have valid values.
4854
func New(c *deis.Client, appID string, procfileType string, pathPattern string) (api.Service, error) {
4955
u := fmt.Sprintf("/v2/apps/%s/services/", appID)
5056

@@ -67,6 +73,7 @@ func New(c *deis.Client, appID string, procfileType string, pathPattern string)
6773
}
6874

6975
// Delete service from app
76+
// If given service for the app doesn't exists then error returned
7077
func Delete(c *deis.Client, appID string, procfileType string) error {
7178
u := fmt.Sprintf("/v2/apps/%s/services/", appID)
7279

services/services_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import (
88
"reflect"
99
"testing"
1010

11-
deis "github.com/deis/controller-sdk-go"
12-
"github.com/deis/controller-sdk-go/api"
11+
deis "github.com/teamhephy/controller-sdk-go"
12+
"github.com/teamhephy/controller-sdk-go/api"
1313
)
1414

1515
const servicesFixture string = `

0 commit comments

Comments
 (0)