commits
make function comment match function name
Signed-off-by: pudongair <744355276@qq.com>
- removed a deadcode function
- removed lingering "bigsky" references"
- removed unused "MemPersister" (it is still in the top-level events
package)
- move settings (using gorm/db) and otel code out of main.go (makes
main.go shorter)
- group imports consistently
- replace some "BGS" terminology with "relay"
- update README
```
goat relay admin host list | jq .Host -r
truffle.us-east.host.bsky.network
pds.robocracy.org
grisette.us-west.host.bsky.network
pds.haileyok.com
agaric.us-west.host.bsky.network
pioppino.us-west.host.bsky.network
[...]
```
```
goat relay admin account takedown --reverse bnewbold.net
go run ./cmd/goat/ relay host add pds.example.com
```
```
goat relay account list --json | head
{"did":"did:plc:bpurujb3biqxm3rj6dq362co","head":"bafyreibdp33fixrpjztokl3yjhsfitha7iakfqoddpodhzy3lxqm4e7bi4","rev":""}
{"did":"did:plc:byrvqzvjg2wecnaw5wj42tbn","head":"bafyreiadhjx3h7wmeiolzagxxpd2s3sikypcnnrmkwzrfe6t42qo3vm4ki","rev":""}
{"did":"did:plc:x7hvipgsf3olqj2scs6vnfsx","head":"bafyreidagggvucwh5tieuj5erw4xfkh2y7evpidryp3mof6vnqmx7r42mu","rev":""}
{"did":"did:plc:bgzuexwoewroc5vvrjf6xdl3","head":"bafyreietjjrkuh34uh5dselwwqibp2o4nnvmq3ewpkiogkkqoeod5dp6gy","rev":""}
{"did":"did:plc:cahlsbuspvfckfoom6llqiao","head":"bafyreiappbl54e7m6bwcw53l6pxbuqgkshgqb6xwv3v3l2ym2aqwokgczu","rev":""}
{"did":"did:plc:bdru4kuod27akpllbusuvemz","head":"bafyreibfo74zbzqpwj4jtvltuhm5zxdja4qtuw6ovw3rgonk7qaidhjcyy","rev":""}
{"did":"did:plc:xaei4rjmliqrfhor6ncujtwo","head":"bafyreidf53dcsabb26g7eed4t6btu57u6wsai6ghp7mm4xjm2gjz5tootq","rev":""}
{"did":"did:plc:drwgwtoidbvxmbq5ix3uynnd","head":"bafyreiczyauyvcpj5n3r3rjwia2zpparse4xxcjijo5tv4kdl4bto2fxam","rev":""}
{"did":"did:plc:wz4f36gw3dudr64hbf4f6f4p","head":"bafyreiachwx45gha6hp4pdhiwtamufwfi67lxpskhdvnfxyhknumnswhbm","rev":""}
{"did":"did:plc:ixncuy6ec3pmvl7ni2auzqse","head":"bafyreieay3eueytuozikcssqd5ik4jesjkpmiuks2caf42bknm437bgg5e","rev":""}
```
- [x] new MST implementation
- [x] `#sync` event
This is basically stacked on two other PRs:
- https://github.com/bluesky-social/indigo/pull/983
- https://github.com/bluesky-social/indigo/pull/984
Goal with this is a very small/minimal PR which won't conflict with
either Relay v1.1 branch, or
https://github.com/bluesky-social/indigo/pull/967
This doesn't deprecate/remove anything, just adds cborgen for existing
lexicon types, and callbacks for event handlers.
Adds a `Walk` method to `Tree` for visiting all key/value in the MST.
Also updates `GetRecordBytes` to return the CID, along with actual
bytes. It needs to be looked up from the MST anyways, and this results
in one less call/lookup in some cases. Code which doesn't need the CID
can just ignore that return type.
Caching identity service.
- [x] rebase on https://github.com/bluesky-social/indigo/pull/872
- [x] review the above, ensure it still makes sense for this application
- [x] actually use redis caching directory
- [x] client package (which implements `identity.Directory` interface)
- [x] config, rate-limit, or admin auth for refreshIdentity (?)
- [x] basic firehose consumer (for `#identity` events)
NOTE: this was previously called `domesday`, it has been updated to
`bluepages` to be a bit more legible.
In production we use `svlogd` as part of our docker CMD. This is
provided by the `runit` package.
the motivation is to not pull in things like `carstore` in to the
dependency tree of every firehose consumer.
- removed a deadcode function
- removed lingering "bigsky" references"
- removed unused "MemPersister" (it is still in the top-level events
package)
- move settings (using gorm/db) and otel code out of main.go (makes
main.go shorter)
- group imports consistently
- replace some "BGS" terminology with "relay"
- update README
```
goat relay admin host list | jq .Host -r
truffle.us-east.host.bsky.network
pds.robocracy.org
grisette.us-west.host.bsky.network
pds.haileyok.com
agaric.us-west.host.bsky.network
pioppino.us-west.host.bsky.network
[...]
```
```
goat relay admin account takedown --reverse bnewbold.net
go run ./cmd/goat/ relay host add pds.example.com
```
```
goat relay account list --json | head
{"did":"did:plc:bpurujb3biqxm3rj6dq362co","head":"bafyreibdp33fixrpjztokl3yjhsfitha7iakfqoddpodhzy3lxqm4e7bi4","rev":""}
{"did":"did:plc:byrvqzvjg2wecnaw5wj42tbn","head":"bafyreiadhjx3h7wmeiolzagxxpd2s3sikypcnnrmkwzrfe6t42qo3vm4ki","rev":""}
{"did":"did:plc:x7hvipgsf3olqj2scs6vnfsx","head":"bafyreidagggvucwh5tieuj5erw4xfkh2y7evpidryp3mof6vnqmx7r42mu","rev":""}
{"did":"did:plc:bgzuexwoewroc5vvrjf6xdl3","head":"bafyreietjjrkuh34uh5dselwwqibp2o4nnvmq3ewpkiogkkqoeod5dp6gy","rev":""}
{"did":"did:plc:cahlsbuspvfckfoom6llqiao","head":"bafyreiappbl54e7m6bwcw53l6pxbuqgkshgqb6xwv3v3l2ym2aqwokgczu","rev":""}
{"did":"did:plc:bdru4kuod27akpllbusuvemz","head":"bafyreibfo74zbzqpwj4jtvltuhm5zxdja4qtuw6ovw3rgonk7qaidhjcyy","rev":""}
{"did":"did:plc:xaei4rjmliqrfhor6ncujtwo","head":"bafyreidf53dcsabb26g7eed4t6btu57u6wsai6ghp7mm4xjm2gjz5tootq","rev":""}
{"did":"did:plc:drwgwtoidbvxmbq5ix3uynnd","head":"bafyreiczyauyvcpj5n3r3rjwia2zpparse4xxcjijo5tv4kdl4bto2fxam","rev":""}
{"did":"did:plc:wz4f36gw3dudr64hbf4f6f4p","head":"bafyreiachwx45gha6hp4pdhiwtamufwfi67lxpskhdvnfxyhknumnswhbm","rev":""}
{"did":"did:plc:ixncuy6ec3pmvl7ni2auzqse","head":"bafyreieay3eueytuozikcssqd5ik4jesjkpmiuks2caf42bknm437bgg5e","rev":""}
```
Adds a `Walk` method to `Tree` for visiting all key/value in the MST.
Also updates `GetRecordBytes` to return the CID, along with actual
bytes. It needs to be looked up from the MST anyways, and this results
in one less call/lookup in some cases. Code which doesn't need the CID
can just ignore that return type.
Caching identity service.
- [x] rebase on https://github.com/bluesky-social/indigo/pull/872
- [x] review the above, ensure it still makes sense for this application
- [x] actually use redis caching directory
- [x] client package (which implements `identity.Directory` interface)
- [x] config, rate-limit, or admin auth for refreshIdentity (?)
- [x] basic firehose consumer (for `#identity` events)
NOTE: this was previously called `domesday`, it has been updated to
`bluepages` to be a bit more legible.