flimit method moved
This commit is contained in:
parent
21be6f2759
commit
f6d63cc8ab
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue