Documentation
¶
Overview ¶
Package system is a generated GoMock package.
Index ¶
- Constants
- func AptGet(ctx context.Context, args ...string) error
- func GetAppUserID() (int, int, error)
- func GetHostOS() (string, error)
- func GetTotalMemory() (int, error)
- func RunWithOutput(ctx context.Context, executor CommandExecutor, path string, args []string, ...) (string, error)
- type CPUUsage
- type CmdOption
- type CommandExecutor
- type MockCommandExecutor
- type MockCommandExecutorMockRecorder
- type SimpleExecutor
- type SystemInfo
Constants ¶
View Source
const ScopeName = "github.com/kofuk/premises/runner/internal/system"
Variables ¶
This section is empty.
Functions ¶
func GetAppUserID ¶
func GetTotalMemory ¶
func RunWithOutput ¶ added in v0.7.0
Types ¶
type CPUUsage ¶
type CPUUsage struct {
// contains filtered or unexported fields
}
func NewCPUUsage ¶
type CommandExecutor ¶ added in v0.7.0
type CommandExecutor interface {
Run(ctx context.Context, path string, args []string, options ...CmdOption) error
}
var DefaultExecutor CommandExecutor = new(SimpleExecutor)
type MockCommandExecutor ¶ added in v0.7.0
type MockCommandExecutor struct {
// contains filtered or unexported fields
}
MockCommandExecutor is a mock of CommandExecutor interface.
func NewMockCommandExecutor ¶ added in v0.7.0
func NewMockCommandExecutor(ctrl *gomock.Controller) *MockCommandExecutor
NewMockCommandExecutor creates a new mock instance.
func (*MockCommandExecutor) EXPECT ¶ added in v0.7.0
func (m *MockCommandExecutor) EXPECT() *MockCommandExecutorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockCommandExecutorMockRecorder ¶ added in v0.7.0
type MockCommandExecutorMockRecorder struct {
// contains filtered or unexported fields
}
MockCommandExecutorMockRecorder is the mock recorder for MockCommandExecutor.
type SimpleExecutor ¶ added in v0.7.0
type SimpleExecutor struct{}
type SystemInfo ¶
type SystemInfo struct {
PremisesVersion string `json:"premisesVersion"`
HostOS string `json:"hostOS"`
}
func GetSystemVersion ¶
func GetSystemVersion() *SystemInfo
Click to show internal directories.
Click to hide internal directories.