Skip to content

Commit

Permalink
feat: http index announcements (#1418)
Browse files Browse the repository at this point in the history
* feat(indexprovider): announce http transport

refactor: isolate extended provider logic

feat: announce http indexes

refactor(indexprovider): use metadata.Default

fix(wrapper): fix compile error

* fix http ep signing bug

* update comment

---------

Co-authored-by: LexLuthr <lexluthr@protocol.ai>
  • Loading branch information
jacobheun and LexLuthr committed Jul 20, 2023
1 parent 4ad47b4 commit 1595f1e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion indexprovider/wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ type Wrapper struct {
// bitswapEnabled records whether to announce bitswap as an available
// protocol to the network indexer
bitswapEnabled bool
httpEnabled bool
stop context.CancelFunc
}

Expand Down Expand Up @@ -90,6 +91,7 @@ func NewWrapper(cfg *config.Boost) func(lc fx.Lifecycle, h host.Host, r repo.Loc
enabled: !isDisabled,
piecedirectory: piecedirectory,
bitswapEnabled: bitswapEnabled,
httpEnabled: httpEnabled,
ssm: ssm,
}
return w, nil
Expand All @@ -106,7 +108,7 @@ func (w *Wrapper) Start(_ context.Context) {
go func() {
err := w.AnnounceExtendedProviders(runCtx)
if err != nil {
log.Warnf("announcing extended providers: %w", err)
log.Warnf("announcing extended providers: %s", err)
}
}()

Expand Down

0 comments on commit 1595f1e

Please sign in to comment.