Documentation
¶
Overview ¶
Package lifecycle is a generated GoMock package.
Index ¶
- Constants
- func SdNotify(state string) error
- type Initializer
- type LifecycleManager
- func (m *LifecycleManager) AfterUpdate(ctx context.Context, current, desired *v1alpha1.DeviceSpec) error
- func (m *LifecycleManager) Initialize(ctx context.Context, status *v1alpha1.DeviceStatus) error
- func (m *LifecycleManager) IsInitialized() bool
- func (m *LifecycleManager) Sync(ctx context.Context, current, desired *v1alpha1.DeviceSpec) error
- type Manager
- type MockInitializer
- type MockInitializerMockRecorder
- type MockManager
- type MockManagerMockRecorder
- type TpmClient
- func (tc *TpmClient) CloseTPM() error
- func (tc *TpmClient) GetLocalAttestationPubKey() crypto.PublicKey
- func (tc *TpmClient) GetPath() string
- func (tc *TpmClient) GetSigner() (crypto.Signer, error)
- func (tc *TpmClient) OpenTPM() error
- func (tc *TpmClient) TpmAttestationCollector(ctx context.Context) string
- func (tc *TpmClient) TpmVendorInfoCollector(ctx context.Context) string
- func (tc *TpmClient) UpdateNonce(nonce []byte) error
Constants ¶
const (
// agent banner file
BannerFile = "/etc/issue.d/flightctl-banner.issue"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Initializer ¶
type LifecycleManager ¶
type LifecycleManager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager( deviceName string, enrollmentUIEndpoint string, managementCertPath string, managementKeyPath string, deviceReadWriter fileio.ReadWriter, enrollmentClient client.Enrollment, enrollmentCSR []byte, defaultLabels map[string]string, statusManager status.Manager, systemdClient *client.Systemd, backoff wait.Backoff, log *log.PrefixLogger, ) *LifecycleManager
Manager is responsible for managing the device lifecycle.
func (*LifecycleManager) AfterUpdate ¶
func (m *LifecycleManager) AfterUpdate(ctx context.Context, current, desired *v1alpha1.DeviceSpec) error
func (*LifecycleManager) Initialize ¶
func (m *LifecycleManager) Initialize(ctx context.Context, status *v1alpha1.DeviceStatus) error
Initialize ensures the device is enrolled to the management service.
func (*LifecycleManager) IsInitialized ¶
func (m *LifecycleManager) IsInitialized() bool
func (*LifecycleManager) Sync ¶
func (m *LifecycleManager) Sync(ctx context.Context, current, desired *v1alpha1.DeviceSpec) error
type Manager ¶
type Manager interface {
Sync(ctx context.Context, current, desired *v1alpha1.DeviceSpec) error
AfterUpdate(ctx context.Context, current, desired *v1alpha1.DeviceSpec) error
}
type MockInitializer ¶
type MockInitializer struct {
// contains filtered or unexported fields
}
MockInitializer is a mock of Initializer interface.
func NewMockInitializer ¶
func NewMockInitializer(ctrl *gomock.Controller) *MockInitializer
NewMockInitializer creates a new mock instance.
func (*MockInitializer) EXPECT ¶
func (m *MockInitializer) EXPECT() *MockInitializerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockInitializer) Initialize ¶
func (m *MockInitializer) Initialize(ctx context.Context, status *v1alpha1.DeviceStatus) error
Initialize mocks base method.
func (*MockInitializer) IsInitialized ¶
func (m *MockInitializer) IsInitialized() bool
IsInitialized mocks base method.
type MockInitializerMockRecorder ¶
type MockInitializerMockRecorder struct {
// contains filtered or unexported fields
}
MockInitializerMockRecorder is the mock recorder for MockInitializer.
func (*MockInitializerMockRecorder) Initialize ¶
func (mr *MockInitializerMockRecorder) Initialize(ctx, status any) *gomock.Call
Initialize indicates an expected call of Initialize.
func (*MockInitializerMockRecorder) IsInitialized ¶
func (mr *MockInitializerMockRecorder) IsInitialized() *gomock.Call
IsInitialized indicates an expected call of IsInitialized.
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) AfterUpdate ¶
func (m *MockManager) AfterUpdate(ctx context.Context, current, desired *v1alpha1.DeviceSpec) error
AfterUpdate mocks base method.
func (*MockManager) EXPECT ¶
func (m *MockManager) EXPECT() *MockManagerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockManager) Sync ¶
func (m *MockManager) Sync(ctx context.Context, current, desired *v1alpha1.DeviceSpec) error
Sync mocks base method.
type MockManagerMockRecorder ¶
type MockManagerMockRecorder struct {
// contains filtered or unexported fields
}
MockManagerMockRecorder is the mock recorder for MockManager.
func (*MockManagerMockRecorder) AfterUpdate ¶
func (mr *MockManagerMockRecorder) AfterUpdate(ctx, current, desired any) *gomock.Call
AfterUpdate indicates an expected call of AfterUpdate.
type TpmClient ¶ added in v0.7.0
type TpmClient struct {
// contains filtered or unexported fields
}
func NewTpmClient ¶ added in v0.7.0
func NewTpmClient(log *log.PrefixLogger) (*TpmClient, error)