Skip to content

Commit 4f82927

Browse files
authored
Merge pull request #54 from fly-apps/project-restructure
Project restructure
2 parents b3443da + eee5e33 commit 4f82927

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+102
-116
lines changed

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ COPY . .
99

1010
RUN CGO_ENABLED=0 GOOS=linux go build -v -o /fly/bin/event_handler ./cmd/event_handler
1111
RUN CGO_ENABLED=0 GOOS=linux go build -v -o /fly/bin/failover_validation ./cmd/failover_validation
12-
1312
RUN CGO_ENABLED=0 GOOS=linux go build -v -o /fly/bin/standby_cleaner ./cmd/standby_cleaner
14-
RUN CGO_ENABLED=0 GOOS=linux go build -v -o /fly/bin/pg_unregister ./.flyctl/cmd/pg_unregister
15-
13+
RUN CGO_ENABLED=0 GOOS=linux go build -v -o /fly/bin/pg_unregister ./cmd/pg_unregister
1614
RUN CGO_ENABLED=0 GOOS=linux go build -v -o /fly/bin/start ./cmd/start
15+
1716
COPY ./bin/* /fly/bin/
1817

1918
FROM wrouesnel/postgres_exporter:latest AS postgres_exporter
-8 MB
Binary file not shown.

cmd/connection_test/main.go

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

cmd/event_handler/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"strconv"
1010
"time"
1111

12-
"github.com/fly-apps/postgres-flex/pkg/flypg"
12+
"github.com/fly-apps/postgres-flex/internal/flypg"
1313
)
1414

1515
const eventLogFile = "/data/event.log"

.flyctl/cmd/pg_unregister/main.go renamed to cmd/pg_unregister/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"fmt"
77
"os"
88

9-
"github.com/fly-apps/postgres-flex/pkg/flypg"
10-
"github.com/fly-apps/postgres-flex/pkg/utils"
9+
"github.com/fly-apps/postgres-flex/internal/flypg"
10+
"github.com/fly-apps/postgres-flex/internal/utils"
1111
)
1212

1313
func main() {

cmd/standby_cleaner/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"os"
77
"time"
88

9-
"github.com/fly-apps/postgres-flex/pkg/flypg"
10-
"github.com/fly-apps/postgres-flex/pkg/flypg/admin"
9+
"github.com/fly-apps/postgres-flex/internal/flypg"
10+
"github.com/fly-apps/postgres-flex/internal/flypg/admin"
1111
"github.com/jackc/pgx/v4"
1212

1313
"golang.org/x/exp/maps"

cmd/start/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
"syscall"
88
"time"
99

10-
"github.com/fly-apps/postgres-flex/pkg/flypg"
11-
"github.com/fly-apps/postgres-flex/pkg/supervisor"
10+
"github.com/fly-apps/postgres-flex/internal/flypg"
11+
"github.com/fly-apps/postgres-flex/internal/supervisor"
1212
)
1313

1414
func main() {

pkg/api/handle_admin.go renamed to internal/api/handle_admin.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import (
66
"net/http"
77
"strings"
88

9-
"github.com/fly-apps/postgres-flex/pkg/flypg"
10-
"github.com/fly-apps/postgres-flex/pkg/flypg/admin"
11-
"github.com/fly-apps/postgres-flex/pkg/flypg/state"
9+
"github.com/fly-apps/postgres-flex/internal/flypg"
10+
"github.com/fly-apps/postgres-flex/internal/flypg/admin"
11+
"github.com/fly-apps/postgres-flex/internal/flypg/state"
1212
"golang.org/x/exp/slices"
1313
)
1414

pkg/api/handle_databases.go renamed to internal/api/handle_databases.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"encoding/json"
55
"net/http"
66

7-
"github.com/fly-apps/postgres-flex/pkg/flypg/admin"
7+
"github.com/fly-apps/postgres-flex/internal/flypg/admin"
88
"github.com/go-chi/chi/v5"
99
)
1010

pkg/api/handle_users.go renamed to internal/api/handle_users.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"fmt"
66
"net/http"
77

8-
"github.com/fly-apps/postgres-flex/pkg/flypg/admin"
8+
"github.com/fly-apps/postgres-flex/internal/flypg/admin"
99
"github.com/go-chi/chi/v5"
1010
)
1111

0 commit comments

Comments
 (0)