Documentation
¶
Overview ¶
Package hook is a generated GoMock package.
Index ¶
- Constants
- type CommandLineVarKey
- type Manager
- type MockManager
- func (m *MockManager) EXPECT() *MockManagerMockRecorder
- func (m *MockManager) OnAfterRebooting(ctx context.Context) error
- func (m *MockManager) OnAfterUpdating(ctx context.Context, current, desired *v1alpha1.RenderedDeviceSpec, ...) error
- func (m *MockManager) OnBeforeRebooting(ctx context.Context) error
- func (m *MockManager) OnBeforeUpdating(ctx context.Context, current, desired *v1alpha1.RenderedDeviceSpec) error
- func (m *MockManager) Sync(current, desired *v1alpha1.RenderedDeviceSpec) error
- type MockManagerMockRecorder
- func (mr *MockManagerMockRecorder) OnAfterRebooting(ctx any) *gomock.Call
- func (mr *MockManagerMockRecorder) OnAfterUpdating(ctx, current, desired, systemRebooted any) *gomock.Call
- func (mr *MockManagerMockRecorder) OnBeforeRebooting(ctx any) *gomock.Call
- func (mr *MockManagerMockRecorder) OnBeforeUpdating(ctx, current, desired any) *gomock.Call
- func (mr *MockManagerMockRecorder) Sync(current, desired any) *gomock.Call
Constants ¶
const ( // ReadOnlyConfigDir is where read-only configuration files are stored ReadOnlyConfigDir = "/usr/lib/flightctl" // ReadOnlyConfigDir is where read-only configuration files are stored UserWritableConfigDir = "/etc/flightctl" // HooksDropInDirName is the subdirectory in which hooks are stored HooksDropInDirName = "hooks.d" )
TODO: Deduplicate with internal/agent/config.go after agreeing how to best break import cycles
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandLineVarKey ¶ added in v0.4.0
type CommandLineVarKey string
const ( DefaultHookActionTimeout = 10 * time.Second // PathKey defines the name of the variable that contains the path operated on PathKey CommandLineVarKey = "Path" // FilesKey defines the name of the variable that contains a space- // separated list of files created, updated, or removed during the update FilesKey CommandLineVarKey = "Files" // CreatedKey defines the name of the variable that contains a space- // separated list of files created during the update CreatedKey CommandLineVarKey = "CreatedFiles" // UpdatedKey defines the name of the variable that contains a space- // separated list of files updated during the update UpdatedKey CommandLineVarKey = "UpdatedFiles" // RemovedKey defines the name of the variable that contains a space- // separated list of files removed during the update RemovedKey CommandLineVarKey = "RemovedFiles" // BackupKey defines the name of the variable that contains a space- // separated list of files backed up before removal from the system // into a temporary location deleted after the action completes. BackupKey CommandLineVarKey = "BackupFiles" )
type Manager ¶
type Manager interface {
Sync(current, desired *api.RenderedDeviceSpec) error
OnBeforeUpdating(ctx context.Context, current *api.RenderedDeviceSpec, desired *api.RenderedDeviceSpec) error
OnAfterUpdating(ctx context.Context, current *api.RenderedDeviceSpec, desired *api.RenderedDeviceSpec, systemRebooted bool) error
OnBeforeRebooting(ctx context.Context) error
OnAfterRebooting(ctx context.Context) error
}
func NewManager ¶
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) OnAfterRebooting ¶ added in v0.4.0
func (m *MockManager) OnAfterRebooting(ctx context.Context) error
OnAfterRebooting mocks base method.
func (*MockManager) OnAfterUpdating ¶ added in v0.4.0
func (m *MockManager) OnAfterUpdating(ctx context.Context, current, desired *v1alpha1.RenderedDeviceSpec, systemRebooted bool) error
OnAfterUpdating mocks base method.
func (*MockManager) OnBeforeRebooting ¶ added in v0.4.0
func (m *MockManager) OnBeforeRebooting(ctx context.Context) error
OnBeforeRebooting mocks base method.
func (*MockManager) OnBeforeUpdating ¶ added in v0.4.0
func (m *MockManager) OnBeforeUpdating(ctx context.Context, current, desired *v1alpha1.RenderedDeviceSpec) error
OnBeforeUpdating mocks base method.
func (*MockManager) Sync ¶
func (m *MockManager) Sync(current, desired *v1alpha1.RenderedDeviceSpec) error
Sync mocks base method.
type MockManagerMockRecorder ¶
type MockManagerMockRecorder struct {
// contains filtered or unexported fields
}
MockManagerMockRecorder is the mock recorder for MockManager.
func (*MockManagerMockRecorder) OnAfterRebooting ¶ added in v0.4.0
func (mr *MockManagerMockRecorder) OnAfterRebooting(ctx any) *gomock.Call
OnAfterRebooting indicates an expected call of OnAfterRebooting.
func (*MockManagerMockRecorder) OnAfterUpdating ¶ added in v0.4.0
func (mr *MockManagerMockRecorder) OnAfterUpdating(ctx, current, desired, systemRebooted any) *gomock.Call
OnAfterUpdating indicates an expected call of OnAfterUpdating.
func (*MockManagerMockRecorder) OnBeforeRebooting ¶ added in v0.4.0
func (mr *MockManagerMockRecorder) OnBeforeRebooting(ctx any) *gomock.Call
OnBeforeRebooting indicates an expected call of OnBeforeRebooting.
func (*MockManagerMockRecorder) OnBeforeUpdating ¶ added in v0.4.0
func (mr *MockManagerMockRecorder) OnBeforeUpdating(ctx, current, desired any) *gomock.Call
OnBeforeUpdating indicates an expected call of OnBeforeUpdating.