Skip to content
This repository was archived by the owner on Jun 20, 2024. It is now read-only.

Commit 200ed66

Browse files
committed
docs: improve stdout
1 parent c912625 commit 200ed66

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ bifrost-gateway
33

44
> Gateway implementation used by [protocol/bifrost-infra](https://github.com/protocol/bifrost-infra)
55
6+
7+
## Usage
8+
9+
```console
10+
$ go build
11+
$ ./bifrost-gateway --help
12+
```
13+
614
## Documentation
715

816
- HTTP Gateway implementation: [go-libipf/gateway](https://github.com/ipfs/go-libipfs/tree/main/gateway#documentation)
@@ -50,7 +58,6 @@ graph LR
5058
- IPFS Backend based on https://strn.network and HTTP client talking to it via [caboose](https://github.com/filecoin-saturn/caboose) or something else.
5159
- Functional gaps facilitated by temporary delegation to legacy Kubo RPC `(/api/v0`) infra already used by js-ipfs (or dedicated one).
5260

53-
## Open problem
5461

5562
## Lead Maintainer
5663

gateway.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ type bifrostGateway struct {
4141
}
4242

4343
func newBifrostGateway(blockService blockservice.BlockService, routing routing.ValueStore) (*bifrostGateway, error) {
44-
// Setup the DAG services, which use the CAR block store.
44+
// Setup the DAG services, which use the special block store.
4545
dagService := merkledag.NewDAGService(blockService)
4646

4747
// Setup the UnixFS resolver.

main.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ func init() {
4141
}
4242

4343
var rootCmd = &cobra.Command{
44-
Use: "bifrost",
44+
Use: "bifrost-gateway",
4545
CompletionOptions: cobra.CompletionOptions{DisableDefaultCmd: true},
46-
Short: "Eagle is a website CMS",
46+
Short: "IPFS Gateway implementation for https://github.com/protocol/bifrost-infra",
4747
RunE: func(cmd *cobra.Command, args []string) error {
4848
saturnOrchestrator, _ := cmd.Flags().GetString("saturn-orchestrator")
4949
saturnLogger, _ := cmd.Flags().GetString("saturn-logger")
@@ -68,8 +68,9 @@ var rootCmd = &cobra.Command{
6868
go func() {
6969
defer wg.Done()
7070

71-
log.Printf("Gateway listening on http://localhost:%d", gatewayPort)
72-
log.Printf("Redirecting /api/v0 to %s", strings.Join(kuboRPC, " "))
71+
log.Printf("Path gateway listening on http://127.0.0.1:%d", gatewayPort)
72+
log.Printf("Subdomain gateway listening on dweb.link and http://localhost:%d", gatewayPort)
73+
log.Printf("Legacy RPC at /api/v0 provided by %s", strings.Join(kuboRPC, " "))
7374
err := gatewaySrv.ListenAndServe()
7475
if err != nil && !errors.Is(err, http.ErrServerClosed) {
7576
log.Printf("Failed to start gateway: %s", err)
@@ -79,7 +80,7 @@ var rootCmd = &cobra.Command{
7980

8081
go func() {
8182
defer wg.Done()
82-
log.Printf("Metrics listening on http://127.0.0.1:%d", metricsPort)
83+
log.Printf("Metrics exposed at http://127.0.0.1:%d/debug/metrics/prometheus", metricsPort)
8384
err := metricsSrv.ListenAndServe()
8485
if err != nil && !errors.Is(err, http.ErrServerClosed) {
8586
log.Printf("Failed to start metrics: %s", err)

0 commit comments

Comments
 (0)