-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to pass an auth token #57
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,12 +13,14 @@ func main() { | |
httpIndexerEndpoint := flag.String("httpIndexerEndpoint", "https://cid.contact", "The HTTP IPNI endpoint to which announcements are made.") | ||
maxConcurrentChecks := flag.Int("maxConcurrentChecks", 10, "The maximum number of concurrent checks.") | ||
storePath := flag.String("storePath", "", "The directory to use for storing the discovered SP information.") | ||
token := flag.String("token", "", "A bearer token to pass for auth to the filecoin api endpoint.") | ||
flag.Parse() | ||
|
||
hf, err := newHeyFil( | ||
WithHttpIndexerEndpoint(*httpIndexerEndpoint), | ||
WithMaxConcurrentChecks(*maxConcurrentChecks), | ||
WithStorePath(*storePath), | ||
WithFileCoinAPIToken(*token), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. WithBearerAuthToken? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https://api.node.glif.io/ just calls them api keys :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would drop FileCoin from the name. I think we don't much that specifically depends on glif. Unless the snapshot format is glif-specific? In any case, there are mo blockers here. |
||
) | ||
if err != nil { | ||
panic(err) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conditionally instantiate if token is set?