chore: include module list in heartbeat
This commit is contained in:
parent
1dcf389f3a
commit
0d8abbfae7
|
@ -11,6 +11,9 @@ type PacketHeartbeat struct {
|
|||
// The time when this Wraith was initialised.
|
||||
InitTime time.Time
|
||||
|
||||
// A list of the names of modules installed in this Wraith.
|
||||
Modules []string
|
||||
|
||||
// The operating system Wraith is running on.
|
||||
HostOS string
|
||||
|
||||
|
|
|
@ -114,14 +114,14 @@ func (m *ModulePinecomms) handleRequest(ctx context.Context, w *libwraith.Wraith
|
|||
}
|
||||
|
||||
func (m *ModulePinecomms) Mainloop(ctx context.Context, w *libwraith.Wraith) {
|
||||
// Ensure this instance is only started once and mark as running if so
|
||||
// Ensure this instance is only started once and mark as running if so.
|
||||
single := m.mutex.TryLock()
|
||||
if !single {
|
||||
panic(fmt.Errorf("%s already running", MOD_NAME))
|
||||
}
|
||||
defer m.mutex.Unlock()
|
||||
|
||||
// Make sure keys are valid
|
||||
// Make sure keys are valid.
|
||||
if keylen := len(m.OwnPrivKey); keylen != ed25519.PrivateKeySize {
|
||||
panic(fmt.Errorf("[%s] incorrect private key size (is %d, should be %d)", MOD_NAME, keylen, ed25519.PublicKeySize))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user