[service] Fix module failure when dll is missing

This commit is contained in:
Vladimir Stoilov
2024-12-02 14:02:49 +02:00
parent ef0995b1f7
commit 2a9d75433f
5 changed files with 60 additions and 22 deletions

View File

@@ -7,8 +7,9 @@ import (
// OSIntegration module provides special integration with the OS.
type OSIntegration struct {
m *mgr.Manager
states *mgr.StateMgr
m *mgr.Manager
OnInitializedEvent *mgr.EventMgr[struct{}]
//nolint:unused
os OSSpecific
@@ -20,10 +21,9 @@ type OSIntegration struct {
func New(instance instance) (*OSIntegration, error) {
m := mgr.New("OSIntegration")
module := &OSIntegration{
m: m,
states: m.NewStateMgr(),
instance: instance,
m: m,
OnInitializedEvent: mgr.NewEventMgr[struct{}]("on-initialized", m),
instance: instance,
}
return module, nil