Skip to content

Commit

Permalink
Update options.go
Browse files Browse the repository at this point in the history
  • Loading branch information
millken committed Jun 6, 2022
1 parent 547aff6 commit 83baea4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions options.go
Original file line number Diff line number Diff line change
Expand Up @@ -477,3 +477,17 @@ func WithDialTimeout(t time.Duration) Option {
return nil
}
}

func WithPerPeerLimit(perPeerLimit int) Option {
return func(cfg *Config) error {
cfg.PerPeerLimit = perPeerLimit
return nil
}
}

func WithFDLimit(fdLimit int) Option {
return func(cfg *Config) error {
cfg.FDLimit = fdLimit
return nil
}
}

0 comments on commit 83baea4

Please sign in to comment.