Documentation ¶
Overview ¶
Package status is a generated GoMock package.
Index ¶
- Constants
- Variables
- func DefaultConditions() *[]v1alpha1.Condition
- func SetDegradedConditionByError(conditions *[]v1alpha1.Condition, reason string, err error) bool
- func SetProgressingCondition(conditions *[]v1alpha1.Condition, conditionType v1alpha1.ConditionType, ...) bool
- type Collector
- type Container
- func (c *Container) CrioExport(ctx context.Context, status *v1alpha1.DeviceStatus) error
- func (c *Container) Export(ctx context.Context, status *v1alpha1.DeviceStatus) error
- func (c *Container) PodmanExport(ctx context.Context, status *v1alpha1.DeviceStatus) error
- func (c *Container) SetProperties(spec *v1alpha1.RenderedDeviceSpec)
- type CrioContainerList
- type CrioContainerListEntry
- type Exporter
- type Manager
- type MockCollector
- type MockCollectorMockRecorder
- type MockExporter
- type MockExporterMockRecorder
- type MockManager
- func (m *MockManager) EXPECT() *MockManagerMockRecorder
- func (m *MockManager) Get(arg0 context.Context) (*v1alpha1.DeviceStatus, error)
- func (m *MockManager) SetClient(arg0 *client.Management)
- func (m *MockManager) SetProperties(arg0 *v1alpha1.RenderedDeviceSpec)
- func (m *MockManager) Update(arg0 context.Context, arg1 *v1alpha1.DeviceStatus) error
- func (m *MockManager) UpdateCondition(ctx context.Context, conditionType v1alpha1.ConditionType, ...) error
- func (m *MockManager) UpdateConditionError(ctx context.Context, reason string, err error) error
- type MockManagerMockRecorder
- func (mr *MockManagerMockRecorder) Get(arg0 any) *gomock.Call
- func (mr *MockManagerMockRecorder) SetClient(arg0 any) *gomock.Call
- func (mr *MockManagerMockRecorder) SetProperties(arg0 any) *gomock.Call
- func (mr *MockManagerMockRecorder) Update(arg0, arg1 any) *gomock.Call
- func (mr *MockManagerMockRecorder) UpdateCondition(ctx, conditionType, conditionStatus, reason, message any) *gomock.Call
- func (mr *MockManagerMockRecorder) UpdateConditionError(ctx, reason, err any) *gomock.Call
- type PodmanContainerList
- type PodmanContainerListEntry
- type Shell
- type StatusManager
- func (m *StatusManager) Get(ctx context.Context) (*v1alpha1.DeviceStatus, error)
- func (m *StatusManager) SetClient(managementCLient *client.Management)
- func (m *StatusManager) SetProperties(spec *v1alpha1.RenderedDeviceSpec)
- func (m *StatusManager) Update(ctx context.Context, status *v1alpha1.DeviceStatus) error
- func (m *StatusManager) UpdateCondition(ctx context.Context, conditionType v1alpha1.ConditionType, ...) error
- func (m *StatusManager) UpdateConditionError(ctx context.Context, reason string, serr error) error
- type SystemD
- type SystemDUnitList
- type SystemDUnitListEntry
- type SystemInfo
Constants ¶
const ( PodmanEngine = "podman" CrioEngine = "crio" )
Variables ¶
var ( DeviceConditionBootstrapReason string = "Bootstrap" DeviceConditionExpectedReason string = "AsExpected" )
Functions ¶
func DefaultConditions ¶
func SetDegradedConditionByError ¶
SetProgressingConditionByError sets the degraded condition based on the error.
func SetProgressingCondition ¶
func SetProgressingCondition(conditions *[]v1alpha1.Condition, conditionType v1alpha1.ConditionType, conditionStatus v1alpha1.ConditionStatus, reason string, message string) bool
SetProgressingCondition sets the progressing condition to true and adds the reason and message.
Types ¶
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
Container collects container status.
func (*Container) CrioExport ¶
func (*Container) PodmanExport ¶
func (*Container) SetProperties ¶
func (c *Container) SetProperties(spec *v1alpha1.RenderedDeviceSpec)
type CrioContainerList ¶
type CrioContainerList struct {
Containers []CrioContainerListEntry `json:"containers"`
}
type CrioContainerListEntry ¶
type Exporter ¶
type Exporter interface { Export(ctx context.Context, device *v1alpha1.DeviceStatus) error SetProperties(*v1alpha1.RenderedDeviceSpec) }
type Manager ¶
type Manager interface { Collector Update(context.Context, *v1alpha1.DeviceStatus) error SetClient(*client.Management) UpdateConditionError(ctx context.Context, reason string, err error) error UpdateCondition(ctx context.Context, conditionType v1alpha1.ConditionType, conditionStatus v1alpha1.ConditionStatus, reason, message string) error SetProperties(*v1alpha1.RenderedDeviceSpec) }
type MockCollector ¶
type MockCollector struct {
// contains filtered or unexported fields
}
MockCollector is a mock of Collector interface.
func NewMockCollector ¶
func NewMockCollector(ctrl *gomock.Controller) *MockCollector
NewMockCollector creates a new mock instance.
func (*MockCollector) EXPECT ¶
func (m *MockCollector) EXPECT() *MockCollectorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockCollector) Get ¶
func (m *MockCollector) Get(arg0 context.Context) (*v1alpha1.DeviceStatus, error)
Get mocks base method.
type MockCollectorMockRecorder ¶
type MockCollectorMockRecorder struct {
// contains filtered or unexported fields
}
MockCollectorMockRecorder is the mock recorder for MockCollector.
type MockExporter ¶
type MockExporter struct {
// contains filtered or unexported fields
}
MockExporter is a mock of Exporter interface.
func NewMockExporter ¶
func NewMockExporter(ctrl *gomock.Controller) *MockExporter
NewMockExporter creates a new mock instance.
func (*MockExporter) EXPECT ¶
func (m *MockExporter) EXPECT() *MockExporterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockExporter) Export ¶
func (m *MockExporter) Export(ctx context.Context, device *v1alpha1.DeviceStatus) error
Export mocks base method.
func (*MockExporter) SetProperties ¶
func (m *MockExporter) SetProperties(arg0 *v1alpha1.RenderedDeviceSpec)
SetProperties mocks base method.
type MockExporterMockRecorder ¶
type MockExporterMockRecorder struct {
// contains filtered or unexported fields
}
MockExporterMockRecorder is the mock recorder for MockExporter.
func (*MockExporterMockRecorder) Export ¶
func (mr *MockExporterMockRecorder) Export(ctx, device any) *gomock.Call
Export indicates an expected call of Export.
func (*MockExporterMockRecorder) SetProperties ¶
func (mr *MockExporterMockRecorder) SetProperties(arg0 any) *gomock.Call
SetProperties indicates an expected call of SetProperties.
type MockManager ¶
type MockManager struct {
// contains filtered or unexported fields
}
MockManager is a mock of Manager interface.
func NewMockManager ¶
func NewMockManager(ctrl *gomock.Controller) *MockManager
NewMockManager creates a new mock instance.
func (*MockManager) EXPECT ¶
func (m *MockManager) EXPECT() *MockManagerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockManager) Get ¶
func (m *MockManager) Get(arg0 context.Context) (*v1alpha1.DeviceStatus, error)
Get mocks base method.
func (*MockManager) SetClient ¶
func (m *MockManager) SetClient(arg0 *client.Management)
SetClient mocks base method.
func (*MockManager) SetProperties ¶
func (m *MockManager) SetProperties(arg0 *v1alpha1.RenderedDeviceSpec)
SetProperties mocks base method.
func (*MockManager) Update ¶
func (m *MockManager) Update(arg0 context.Context, arg1 *v1alpha1.DeviceStatus) error
Update mocks base method.
func (*MockManager) UpdateCondition ¶
func (m *MockManager) UpdateCondition(ctx context.Context, conditionType v1alpha1.ConditionType, conditionStatus v1alpha1.ConditionStatus, reason, message string) error
UpdateCondition mocks base method.
func (*MockManager) UpdateConditionError ¶
UpdateConditionError mocks base method.
type MockManagerMockRecorder ¶
type MockManagerMockRecorder struct {
// contains filtered or unexported fields
}
MockManagerMockRecorder is the mock recorder for MockManager.
func (*MockManagerMockRecorder) Get ¶
func (mr *MockManagerMockRecorder) Get(arg0 any) *gomock.Call
Get indicates an expected call of Get.
func (*MockManagerMockRecorder) SetClient ¶
func (mr *MockManagerMockRecorder) SetClient(arg0 any) *gomock.Call
SetClient indicates an expected call of SetClient.
func (*MockManagerMockRecorder) SetProperties ¶
func (mr *MockManagerMockRecorder) SetProperties(arg0 any) *gomock.Call
SetProperties indicates an expected call of SetProperties.
func (*MockManagerMockRecorder) Update ¶
func (mr *MockManagerMockRecorder) Update(arg0, arg1 any) *gomock.Call
Update indicates an expected call of Update.
func (*MockManagerMockRecorder) UpdateCondition ¶
func (mr *MockManagerMockRecorder) UpdateCondition(ctx, conditionType, conditionStatus, reason, message any) *gomock.Call
UpdateCondition indicates an expected call of UpdateCondition.
func (*MockManagerMockRecorder) UpdateConditionError ¶
func (mr *MockManagerMockRecorder) UpdateConditionError(ctx, reason, err any) *gomock.Call
UpdateConditionError indicates an expected call of UpdateConditionError.
type PodmanContainerList ¶
type PodmanContainerList []PodmanContainerListEntry
type StatusManager ¶
type StatusManager struct {
// contains filtered or unexported fields
}
Collector aggregates device status from various exporters.
func NewManager ¶
func NewManager( deviceName string, tpm *tpm.TPM, executer executer.Executer, log *logrus.Logger, logPrefix string, ) *StatusManager
NewManager creates a new device status manager.
func (*StatusManager) Get ¶
func (m *StatusManager) Get(ctx context.Context) (*v1alpha1.DeviceStatus, error)
func (*StatusManager) SetClient ¶
func (m *StatusManager) SetClient(managementCLient *client.Management)
func (*StatusManager) SetProperties ¶
func (m *StatusManager) SetProperties(spec *v1alpha1.RenderedDeviceSpec)
func (*StatusManager) Update ¶
func (m *StatusManager) Update(ctx context.Context, status *v1alpha1.DeviceStatus) error
func (*StatusManager) UpdateCondition ¶
func (m *StatusManager) UpdateCondition( ctx context.Context, conditionType v1alpha1.ConditionType, conditionStatus v1alpha1.ConditionStatus, reason, message string, ) error
func (*StatusManager) UpdateConditionError ¶
type SystemD ¶
type SystemD struct {
// contains filtered or unexported fields
}
SystemD collects systemd unit status as defined by match patterns.
func (*SystemD) SetProperties ¶
func (c *SystemD) SetProperties(spec *v1alpha1.RenderedDeviceSpec)
type SystemDUnitList ¶
type SystemDUnitList []SystemDUnitListEntry
type SystemDUnitListEntry ¶
type SystemInfo ¶
type SystemInfo struct {
// contains filtered or unexported fields
}
SystemInfo collects system information.
func (*SystemInfo) Export ¶
func (c *SystemInfo) Export(ctx context.Context, status *v1alpha1.DeviceStatus) error
func (*SystemInfo) SetProperties ¶
func (c *SystemInfo) SetProperties(spec *v1alpha1.RenderedDeviceSpec)