fork of indigo with slightly nicer lexgen

organize/style imports (#1004)

authored by bnewbold.net and committed by GitHub 0eb2aaa7 40f39771

Changed files
+20 -15
cmd
splitter
+3 -2
cmd/collectiondir/collectiondir.go
··· 8 8 "encoding/json" 9 9 "errors" 10 10 "fmt" 11 - "github.com/carlmjohnson/versioninfo" 12 - "github.com/urfave/cli/v2" 13 11 "io" 14 12 "log/slog" 15 13 "net/http" ··· 18 16 "strconv" 19 17 "strings" 20 18 "time" 19 + 20 + "github.com/carlmjohnson/versioninfo" 21 + "github.com/urfave/cli/v2" 21 22 ) 22 23 23 24 func main() {
+4 -4
cmd/collectiondir/crawl.go
··· 4 4 "context" 5 5 "encoding/csv" 6 6 "fmt" 7 - "github.com/bluesky-social/indigo/util" 8 - "golang.org/x/time/rate" 9 7 "io" 10 8 "log/slog" 11 9 "net/url" ··· 13 11 "strings" 14 12 "sync/atomic" 15 13 16 - "github.com/urfave/cli/v2" 17 - 18 14 "github.com/bluesky-social/indigo/api/atproto" 15 + "github.com/bluesky-social/indigo/util" 19 16 "github.com/bluesky-social/indigo/xrpc" 17 + 18 + "github.com/urfave/cli/v2" 19 + "golang.org/x/time/rate" 20 20 ) 21 21 22 22 type DidCollection struct {
+4 -2
cmd/collectiondir/firehose.go
··· 3 3 import ( 4 4 "context" 5 5 "fmt" 6 - "github.com/bluesky-social/indigo/events" 7 - "github.com/gorilla/websocket" 8 6 "log/slog" 9 7 "net/http" 10 8 "net/url" 11 9 "time" 10 + 11 + "github.com/bluesky-social/indigo/events" 12 + 13 + "github.com/gorilla/websocket" 12 14 ) 13 15 14 16 type Firehose struct {
+2 -1
cmd/collectiondir/pebble.go
··· 6 6 "encoding/binary" 7 7 "errors" 8 8 "fmt" 9 - "github.com/cockroachdb/pebble" 10 9 "log/slog" 11 10 "sync" 12 11 "time" 12 + 13 + "github.com/cockroachdb/pebble" 13 14 ) 14 15 15 16 func makeCollectionInternKey(collection string) []byte {
+2 -2
cmd/collectiondir/serve.go
··· 6 6 "encoding/csv" 7 7 "encoding/json" 8 8 "fmt" 9 - "github.com/bluesky-social/indigo/atproto/syntax" 10 - lru "github.com/hashicorp/golang-lru/v2" 11 9 "log/slog" 12 10 "net" 13 11 "net/http" ··· 24 22 "time" 25 23 26 24 comatproto "github.com/bluesky-social/indigo/api/atproto" 25 + "github.com/bluesky-social/indigo/atproto/syntax" 27 26 "github.com/bluesky-social/indigo/events" 28 27 "github.com/bluesky-social/indigo/xrpc" 29 28 29 + "github.com/hashicorp/golang-lru/v2" 30 30 "github.com/labstack/echo/v4" 31 31 "github.com/labstack/echo/v4/middleware" 32 32 "github.com/prometheus/client_golang/prometheus/promhttp"
+1 -1
splitter/ringbuf.go
··· 4 4 "context" 5 5 "sync" 6 6 7 - events "github.com/bluesky-social/indigo/events" 7 + "github.com/bluesky-social/indigo/events" 8 8 "github.com/bluesky-social/indigo/models" 9 9 ) 10 10
+4 -3
splitter/splitter.go
··· 6 6 "encoding/json" 7 7 "errors" 8 8 "fmt" 9 - "go.opentelemetry.io/otel" 10 9 "io" 11 10 "log/slog" 12 11 "math/rand" ··· 27 26 "github.com/bluesky-social/indigo/events/schedulers/sequential" 28 27 "github.com/bluesky-social/indigo/util" 29 28 "github.com/bluesky-social/indigo/xrpc" 29 + 30 30 "github.com/gorilla/websocket" 31 31 "github.com/labstack/echo/v4" 32 32 "github.com/labstack/echo/v4/middleware" 33 - promclient "github.com/prometheus/client_golang/prometheus" 33 + "github.com/prometheus/client_golang/prometheus" 34 34 "github.com/prometheus/client_golang/prometheus/promhttp" 35 35 dto "github.com/prometheus/client_model/go" 36 + "go.opentelemetry.io/otel" 36 37 ) 37 38 38 39 type Splitter struct { ··· 544 545 UserAgent string 545 546 RemoteAddr string 546 547 ConnectedAt time.Time 547 - EventsSent promclient.Counter 548 + EventsSent prometheus.Counter 548 549 } 549 550 550 551 func (s *Splitter) registerConsumer(c *SocketConsumer) uint64 {