this repo has no description
0
fork

Configure Feed

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

more config; ability to disable refresh identity endpoint

+21 -10
+12 -4
cmd/domesday/main.go
··· 48 48 &cli.IntFlag{ 49 49 Name: "plc-rate-limit", 50 50 Usage: "max number of requests per second to PLC registry", 51 - Value: 100, 51 + Value: 300, 52 52 EnvVars: []string{"DOMESDAY_PLC_RATE_LIMIT"}, 53 53 }, 54 54 &cli.StringFlag{ ··· 86 86 Name: "disable-firehose-consumer", 87 87 Usage: "don't consume #identity events from firehose", 88 88 EnvVars: []string{"DOMESDAY_DISABLE_FIREHOSE_CONSUMER"}, 89 + }, 90 + &cli.BoolFlag{ 91 + Name: "disable-refresh", 92 + Usage: "disable the refreshIdentity API endpoint", 93 + EnvVars: []string{"DOMESDAY_DISABLE_REFRESH"}, 89 94 }, 90 95 &cli.IntFlag{ 91 96 Name: "firehose-parallelism", ··· 188 193 189 194 srv, err := NewServer( 190 195 Config{ 191 - Logger: logger, 192 - Bind: cctx.String("bind"), 193 - RedisURL: cctx.String("redis-url"), 196 + Logger: logger, 197 + Bind: cctx.String("bind"), 198 + RedisURL: cctx.String("redis-url"), 199 + PLCHost: cctx.String("atp-plc-host"), 200 + PLCRateLimit: cctx.Int("plc-rate-limit"), 201 + DisableRefresh: cctx.Bool("disable-refresh"), 194 202 }, 195 203 ) 196 204 if err != nil {
+9 -6
cmd/domesday/server.go
··· 40 40 } 41 41 42 42 type Config struct { 43 - Logger *slog.Logger 44 - PLCHost string 45 - PLCRateLimit int 46 - RedisURL string 47 - Bind string 43 + Logger *slog.Logger 44 + PLCHost string 45 + PLCRateLimit int 46 + RedisURL string 47 + Bind string 48 + DisableRefresh bool 48 49 } 49 50 50 51 func NewServer(config Config) (*Server, error) { ··· 136 137 e.GET("/xrpc/com.atproto.identity.resolveHandle", srv.ResolveHandle) 137 138 e.GET("/xrpc/com.atproto.identity.resolveDid", srv.ResolveDid) 138 139 e.GET("/xrpc/com.atproto.identity.resolveIdentity", srv.ResolveIdentity) 139 - e.POST("/xrpc/com.atproto.identity.refreshIdentity", srv.RefreshIdentity) 140 + if !config.DisableRefresh { 141 + e.POST("/xrpc/com.atproto.identity.refreshIdentity", srv.RefreshIdentity) 142 + } 140 143 141 144 return srv, nil 142 145 }