flimit method moved

This commit is contained in:
alessio 2016-11-21 23:05:46 +01:00
parent 21be6f2759
commit f6d63cc8ab
1 changed files with 0 additions and 12 deletions

View File

@ -2,7 +2,6 @@ package settings
import (
"gopkg.in/yaml.v2"
"syscall"
)
type Settings struct {
@ -29,17 +28,6 @@ type Resources struct {
Log string `yaml:"log" json:"log"`
}
// Flimit defines the max number of watched files
func (s *Settings) Flimit() {
var rLimit syscall.Rlimit
rLimit.Max = s.Config.Flimit
rLimit.Cur = s.Config.Flimit
err := syscall.Setrlimit(syscall.RLIMIT_NOFILE, &rLimit)
if err != nil {
s.Fatal("Error Setting Rlimit", err)
}
}
// Read from the configuration file
func (s *Settings) Read(out interface{}) error {
content, err := s.Stream(s.Resources.Config)