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

Commit

Permalink
docs: improve stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel committed Feb 8, 2023
1 parent c912625 commit 200ed66
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ bifrost-gateway

> Gateway implementation used by [protocol/bifrost-infra](https://github.com/protocol/bifrost-infra)

## Usage

```console
$ go build
$ ./bifrost-gateway --help
```

## Documentation

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

## Open problem

## Lead Maintainer

Expand Down
2 changes: 1 addition & 1 deletion gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ type bifrostGateway struct {
}

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

// Setup the UnixFS resolver.
Expand Down
11 changes: 6 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ func init() {
}

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

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

go func() {
defer wg.Done()
log.Printf("Metrics listening on http://127.0.0.1:%d", metricsPort)
log.Printf("Metrics exposed at http://127.0.0.1:%d/debug/metrics/prometheus", metricsPort)
err := metricsSrv.ListenAndServe()
if err != nil && !errors.Is(err, http.ErrServerClosed) {
log.Printf("Failed to start metrics: %s", err)
Expand Down

0 comments on commit 200ed66

Please sign in to comment.