Skip to content

Commit

Permalink
Update references after repo migration
Browse files Browse the repository at this point in the history
  • Loading branch information
p2004a committed Sep 15, 2024
1 parent 51ba4d7 commit 93ab2ec
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Spring RTS Rapid syncer
# Recoil RTS Rapid syncer

A small stateless utility that can mirror content of a Spring RTS
A small stateless utility that can mirror content of a Recoil RTS
[Rapid](https://springrts.com/wiki/Rapid) repository to some other hosting.

Currently it supports [Bunny Edge Storage](https://bunny.net/edge-storage/) as a
Expand Down
4 changes: 2 additions & 2 deletions cmd/rapidsyncer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"os"
"strings"

"github.com/p2004a/spring-rapid-syncer/pkg/syncer"
"github.com/beyond-all-reason/recoil-rapid-syncer/pkg/syncer"
)

type Server struct {
Expand Down Expand Up @@ -61,7 +61,7 @@ func (s *Server) HandleSync(w http.ResponseWriter, r *http.Request) {
func main() {
sourceRapidRepo := os.Getenv("SOURCE_RAPID_REPO")
if sourceRapidRepo == "" {
sourceRapidRepo = "https://repos.springrts.com/"
sourceRapidRepo = "https://repos.beyondallreason.dev/"
}
bunnyStorageZone := os.Getenv("BUNNY_STORAGE_ZONE")
if bunnyStorageZone == "" {
Expand Down
6 changes: 3 additions & 3 deletions cmd/replicationprober/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import (
"time"

"github.com/InfluxCommunity/influxdb3-go/influxdb3"
"github.com/beyond-all-reason/recoil-rapid-syncer/pkg/bunny"
"github.com/beyond-all-reason/recoil-rapid-syncer/pkg/sfcache"
"github.com/caarlos0/env/v9"
"github.com/p2004a/spring-rapid-syncer/pkg/bunny"
"github.com/p2004a/spring-rapid-syncer/pkg/sfcache"
)

const UserAgent = "spring-rapid-syncer/prober 1.0"
const UserAgent = "recoil-rapid-syncer/prober 1.0"

const versionsGzRepo = "byar"
const versionsGzFile = "/" + versionsGzRepo + "/versions.gz"
Expand Down
4 changes: 2 additions & 2 deletions cmd/replicationprober/replicatedfetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (
"sync"
"time"

"github.com/p2004a/spring-rapid-syncer/pkg/bunny"
"github.com/p2004a/spring-rapid-syncer/pkg/sfcache"
"github.com/beyond-all-reason/recoil-rapid-syncer/pkg/bunny"
"github.com/beyond-all-reason/recoil-rapid-syncer/pkg/sfcache"
"golang.org/x/sync/errgroup"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/replicationprober/replicationcanary.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"time"

"github.com/InfluxCommunity/influxdb3-go/influxdb3"
"github.com/p2004a/spring-rapid-syncer/pkg/bunny"
"github.com/beyond-all-reason/recoil-rapid-syncer/pkg/bunny"
)

type Canary struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/replicationprober/versionsgz.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"strings"
"time"

"github.com/p2004a/spring-rapid-syncer/pkg/sfcache"
"github.com/beyond-all-reason/recoil-rapid-syncer/pkg/sfcache"
)

type VersionGzFetcher struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/replicationprober/versionsgzredirect.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"time"

"github.com/InfluxCommunity/influxdb3-go/influxdb3"
"github.com/p2004a/spring-rapid-syncer/pkg/bunny"
"github.com/beyond-all-reason/recoil-rapid-syncer/pkg/bunny"
)

type RedirectProber struct {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/p2004a/spring-rapid-syncer
module github.com/beyond-all-reason/recoil-rapid-syncer

go 1.21

Expand Down
6 changes: 3 additions & 3 deletions pkg/syncer/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (rs *RapidSyncer) fetchGzipFile(
if err != nil {
return nil, 0, err
}
req.Header.Set("User-Agent", "spring-rapid-syncer 1.0")
req.Header.Set("User-Agent", "recoil-rapid-syncer 1.0")
for header, value := range headers {
req.Header.Set(header, value)
}
Expand Down Expand Up @@ -184,7 +184,7 @@ func (rs *RapidSyncer) uploadFile(ctx context.Context, repo, path string, conten
return err
}
contentsHash := sha256.Sum256(contents)
req.Header.Set("User-Agent", "spring-rapid-syncer 1.0")
req.Header.Set("User-Agent", "recoil-rapid-syncer 1.0")
req.Header.Set("Content-Type", "application/octet-stream")
req.Header.Set("AccessKey", rs.bunnyAccessKey)
req.Header.Set("Checksum", strings.ToUpper(hex.EncodeToString(contentsHash[:])))
Expand All @@ -205,7 +205,7 @@ func (rs *RapidSyncer) getAvailableFilesWithPrefix(ctx context.Context, repo str
if err != nil {
return nil, err
}
req.Header.Set("User-Agent", "spring-rapid-syncer 1.0")
req.Header.Set("User-Agent", "recoil-rapid-syncer 1.0")
req.Header.Set("AccessKey", rs.bunnyAccessKey)
resp, err := rs.client.Do(req)
if err != nil {
Expand Down

0 comments on commit 93ab2ec

Please sign in to comment.