Skip to content
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

docs: point to SetDefaultServiceLimits in ResourceManager option #1636

Merged
merged 1 commit into from
Jul 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions options.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,8 @@ func ConnectionGater(cg connmgr.ConnectionGater) Option {
}

// ResourceManager configures libp2p to use the given ResourceManager.
// When using the go-libp2p-resource-manager implementation of the ResourceManager interface,
// it is recommended to set limits for libp2p protocol by calling SetDefaultServiceLimits.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(optional) What do you think about adding an example that gets rendered in the godoc here too?

https://pkg.go.dev/github.com/fluhus/godoc-tricks#Examples

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good idea, but we should do that after we've updated the resource manager to include the config refactor.

func ResourceManager(rcmgr network.ResourceManager) Option {
return func(cfg *Config) error {
if cfg.ResourceManager != nil {
Expand Down