forked from cloudfoundry/gosigar
-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added method stubs for unsupported OSes (#83)
- Added method stubs to enable compilation for operating systems that are not supported by gosigar. All methods return `ErrNotImplemented` on these unsupported operating systems. - FreeBSD returns `ErrNotImplemented` for `ProcTime.Get`. - OpenBSD returns `ErrNotImplemented` for `ProcTime.Get` instead of `nil`. - Remove NetBSD build from sigar_unix.go as it is not supported by gosigar.
- Loading branch information
1 parent
306d519
commit 8620c67
Showing
5 changed files
with
48 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// +build !darwin,!freebsd,!linux,!openbsd,!windows | ||
|
||
package gosigar | ||
|
||
import ( | ||
"runtime" | ||
) | ||
|
||
func (c *Cpu) Get() error { | ||
return ErrNotImplemented{runtime.GOOS} | ||
} | ||
|
||
func (l *LoadAverage) Get() error { | ||
return ErrNotImplemented{runtime.GOOS} | ||
} | ||
|
||
func (m *Mem) Get() error { | ||
return ErrNotImplemented{runtime.GOOS} | ||
} | ||
|
||
func (s *Swap) Get() error { | ||
return ErrNotImplemented{runtime.GOOS} | ||
} | ||
|
||
func (f *FDUsage) Get() error { | ||
return ErrNotImplemented{runtime.GOOS} | ||
} | ||
|
||
func (p *ProcTime) Get(int) error { | ||
return ErrNotImplemented{runtime.GOOS} | ||
} | ||
|
||
func (self *FileSystemUsage) Get(path string) error { | ||
return ErrNotImplemented{runtime.GOOS} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters