The knotserver can now use alternative PLCs for DID resolution by setting the env var KNOT_SERVER_PLC_URL. The default identity directory was copied out of the at proto lib and updated to take in a target url for the PLC being used to do this.
+1
-1
guard/guard.go
+1
-1
guard/guard.go
···func resolveIdentity(ctx context.Context, l *slog.Logger, didOrHandle string) *identity.Identity {
+28
-2
idresolver/resolver.go
+28
-2
idresolver/resolver.go
···+// would want this around 100ms for services doing lots of handle resolution. Impacts PLC connections as well, but not too bad.+cached := identity.NewCacheDirectory(&base, 250_000, time.Hour*24, time.Minute*2, time.Minute*5)···return redisdir.NewRedisDirectory(BaseDirectory(), url, hitTTL, errTTL, invalidHandleTTL, 10000)
+1
knotserver/config/config.go
+1
knotserver/config/config.go
···JetstreamEndpoint string `env:"JETSTREAM_ENDPOINT, default=wss://jetstream1.us-west.bsky.network/subscribe"`
+2
-2
knotserver/ingester.go
+2
-2
knotserver/ingester.go
······
+1
-1
knotserver/internal.go
+1
-1
knotserver/internal.go
···func (h *InternalHandle) replyCompare(line git.PostReceiveLine, repoOwner string, gitRelativeDir string, repoName string, ctx context.Context) ([]string, error) {