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