Low-latency AT Protocol interaction indexer.
20

Configure Feed

Select the types of activity you want to include in your feed.

cmd/asterism: replace default directory with cached identity directory

Aly Raffauf (Jul 6, 2026, 4:59 PM EDT) 09142485 acd6cdf8

+27 -1
+27 -1
cmd/asterism/main.go
··· 3 3 import ( 4 4 "context" 5 5 "log/slog" 6 + "net" 7 + "net/http" 6 8 "strings" 9 + "time" 7 10 8 11 "github.com/alecthomas/kong" 9 12 "github.com/bluesky-social/indigo/atproto/identity" ··· 67 70 panic(err) 68 71 } 69 72 70 - directory := identity.DefaultDirectory() 73 + directory := identity.NewCacheDirectory( 74 + &identity.BaseDirectory{ 75 + PLCURL: identity.DefaultPLCURL, 76 + HTTPClient: http.Client{ 77 + Timeout: 3 * time.Second, 78 + Transport: &http.Transport{ 79 + Proxy: http.ProxyFromEnvironment, 80 + IdleConnTimeout: 1000 * time.Millisecond, 81 + MaxIdleConns: 100, 82 + MaxIdleConnsPerHost: 100, 83 + }, 84 + }, 85 + Resolver: net.Resolver{ 86 + Dial: func(ctx context.Context, network, address string) (net.Conn, error) { 87 + d := net.Dialer{Timeout: 3 * time.Second} 88 + return d.DialContext(ctx, network, address) 89 + }, 90 + }, 91 + TryAuthoritativeDNS: true, 92 + SkipDNSDomainSuffixes: []string{".bsky.social", ".blacksky.app"}, 93 + UserAgent: "asterism/dev", 94 + }, 95 + 250_000, 24*time.Hour, 2*time.Minute, 5*time.Minute, 96 + ) 71 97 72 98 server := &api.Server{Store: linkStore, Directory: directory, Logger: logger} 73 99 go func() {