Skip to content

Commit

Permalink
chore: config changes
Browse files Browse the repository at this point in the history
  • Loading branch information
markphelps committed Apr 22, 2024
1 parent a7902b6 commit 70830e6
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions cmd/flipt/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,18 +371,18 @@ func run(ctx context.Context, logger *zap.Logger, cfg *config.Config) error {
g.Go(httpServer.Run)

if cfg.Server.Cloud.Enabled {
tunnel := fmt.Sprintf("%s-%s.%s", cfg.Server.Cloud.Instance, cfg.Server.Cloud.Organization, cfg.Server.Cloud.Address)

tunnelServer := &client.Server{
TunnelGroup: tunnel,
Handler: httpServer.Handler,
Authenticator: client.BearerAuthenticator(cfg.Server.Cloud.Authentication.ApiKey),
}

// starts QUIC tunnel server to connect to Cloud
g.Go(func() error {
tunnelServer := &client.Server{
TunnelGroup: fmt.Sprintf("%s.%s", cfg.Server.Cloud.Organization, cfg.Server.Cloud.Address),
Handler: httpServer.Handler,
Authenticator: client.BearerAuthenticator(cfg.Server.Cloud.Authentication.ApiKey),
}

defer tunnelServer.Close()

Check failure on line 382 in cmd/flipt/main.go

View workflow job for this annotation

GitHub Actions / Benchmark SQLite

tunnelServer.Close undefined (type *"go.flipt.io/reverst/client".Server has no field or method Close)

Check failure on line 382 in cmd/flipt/main.go

View workflow job for this annotation

GitHub Actions / Lint Go

tunnelServer.Close undefined (type *"go.flipt.io/reverst/client".Server has no field or method Close) (typecheck)

Check failure on line 382 in cmd/flipt/main.go

View workflow job for this annotation

GitHub Actions / Tests (Migration)

tunnelServer.Close undefined (type *"go.flipt.io/reverst/client".Server has no field or method Close)

Check failure on line 382 in cmd/flipt/main.go

View workflow job for this annotation

GitHub Actions / CLI Integration Tests

tunnelServer.Close undefined (type *"go.flipt.io/reverst/client".Server has no field or method Close)

Check failure on line 382 in cmd/flipt/main.go

View workflow job for this annotation

GitHub Actions / Tests (Go)

tunnelServer.Close undefined (type *"go.flipt.io/reverst/client".Server has no field or method Close)

Check failure on line 382 in cmd/flipt/main.go

View workflow job for this annotation

GitHub Actions / Integration Tests (api/sqlite)

tunnelServer.Close undefined (type *"go.flipt.io/reverst/client".Server has no field or method Close)

Check failure on line 382 in cmd/flipt/main.go

View workflow job for this annotation

GitHub Actions / Integration Tests (api/libsql)

tunnelServer.Close undefined (type *"go.flipt.io/reverst/client".Server has no field or method Close)

Check failure on line 382 in cmd/flipt/main.go

View workflow job for this annotation

GitHub Actions / Tests (Go - Darwin)

tunnelServer.Close undefined (type *"go.flipt.io/reverst/client".Server has no field or method Close)

Check failure on line 382 in cmd/flipt/main.go

View workflow job for this annotation

GitHub Actions / UI Integration Tests

tunnelServer.Close undefined (type *"go.flipt.io/reverst/client".Server has no field or method Close)

Check failure on line 382 in cmd/flipt/main.go

View workflow job for this annotation

GitHub Actions / Integration Tests (api/postgres)

tunnelServer.Close undefined (type *"go.flipt.io/reverst/client".Server has no field or method Close)

Check failure on line 382 in cmd/flipt/main.go

View workflow job for this annotation

GitHub Actions / Integration Tests (api/mysql)

tunnelServer.Close undefined (type *"go.flipt.io/reverst/client".Server has no field or method Close)

Check failure on line 382 in cmd/flipt/main.go

View workflow job for this annotation

GitHub Actions / Integration Tests (api/cockroach)

tunnelServer.Close undefined (type *"go.flipt.io/reverst/client".Server has no field or method Close)

Check failure on line 382 in cmd/flipt/main.go

View workflow job for this annotation

GitHub Actions / Integration Tests (api/cache)

tunnelServer.Close undefined (type *"go.flipt.io/reverst/client".Server has no field or method Close)

Check failure on line 382 in cmd/flipt/main.go

View workflow job for this annotation

GitHub Actions / Integration Tests (fs/git)

tunnelServer.Close undefined (type *"go.flipt.io/reverst/client".Server has no field or method Close)

Check failure on line 382 in cmd/flipt/main.go

View workflow job for this annotation

GitHub Actions / Integration Tests (fs/local)

tunnelServer.Close undefined (type *"go.flipt.io/reverst/client".Server has no field or method Close)

Check failure on line 382 in cmd/flipt/main.go

View workflow job for this annotation

GitHub Actions / Integration Tests (fs/s3)

tunnelServer.Close undefined (type *"go.flipt.io/reverst/client".Server has no field or method Close)

Check failure on line 382 in cmd/flipt/main.go

View workflow job for this annotation

GitHub Actions / Integration Tests (fs/oci)

tunnelServer.Close undefined (type *"go.flipt.io/reverst/client".Server has no field or method Close)

Check failure on line 382 in cmd/flipt/main.go

View workflow job for this annotation

GitHub Actions / Integration Tests (fs/azblob)

tunnelServer.Close undefined (type *"go.flipt.io/reverst/client".Server has no field or method Close)

Check failure on line 382 in cmd/flipt/main.go

View workflow job for this annotation

GitHub Actions / Integration Tests (fs/gcs)

tunnelServer.Close undefined (type *"go.flipt.io/reverst/client".Server has no field or method Close)

Check failure on line 382 in cmd/flipt/main.go

View workflow job for this annotation

GitHub Actions / Integration Tests (import/export)

tunnelServer.Close undefined (type *"go.flipt.io/reverst/client".Server has no field or method Close)

tunnel := fmt.Sprintf("%s-%s.%s", cfg.Server.Cloud.Instance, cfg.Server.Cloud.Organization, cfg.Server.Cloud.Address)

logger.Info("cloud tunnel available", zap.String("address", tunnel), zap.Int("port", cfg.Server.Cloud.Port))

if err := tunnelServer.DialAndServe(ctx, fmt.Sprintf("%s:%d", tunnel, cfg.Server.Cloud.Port)); !errors.Is(err, http.ErrServerClosed) {
Expand Down

0 comments on commit 70830e6

Please sign in to comment.