Skip to content

Commit 5a460e3

Browse files
authored
Merge pull request #7 from segment-sources/rearrange
Rearrange to expose driver as a lib
2 parents 7a52f4c + c921cf2 commit 5a460e3

File tree

5 files changed

+17
-11
lines changed

5 files changed

+17
-11
lines changed

Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
FROM golang:1.6
22

3-
RUN go get -u github.com/segment-sources/postgres
3+
ADD . /go/src/github.com/segment-sources/source-postgres
4+
5+
RUN go get "github.com/tools/godep"
6+
RUN cd /go/src/github.com/segment-sources/source-postgres \
7+
&& godep go install ./cmd/source-postgres
48

59
# Additionally add a cron-like runner to run on an
610
# interval.
711
RUN go get -u github.com/segmentio/go-every
812

9-
ENTRYPOINT ["postgres"]
13+
ENTRYPOINT ["source-postgres"]

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ would be queryable in your analytics Redshift or Postgres database like this...
3030
Prerequisites: [Go](https://golang.org/doc/install)
3131

3232
```bash
33-
go get -u github.com/segment-sources/postgres
33+
go get -u github.com/tools/godep
34+
godep go install github.com/segment-source/source-postgres/cmd/source-postgres
3435
```
3536

3637
The first step is to initialize your schema. You can do so by running `postgres` with `--init` flag.

cmd/source-postgres/main.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package main
2+
3+
import "github.com/segment-sources/sqlsource"
4+
import "github.com/segment-sources/source-postgres"
5+
6+
func main() {
7+
sqlsource.Run(&postgres.Postgres{})
8+
}

driver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package main
1+
package postgres
22

33
import (
44
"bytes"

main.go

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)