Commit graph

9 commits

Author SHA1 Message Date
Alvar Penning
d6f67074e1
golangci-lint: Address forcetypeassert
There were multiple occurrences of forcetypeassert throughout the
codebase. In most cases, an if guard was added to return an error.
Sometimes, a panic was raised as refactoring would be too much. And
once, a nolint annotation was added as the actual check was out of
scope.
2025-10-14 15:12:57 +02:00
Yonas Habteab
9e23399eb9 Streamline Redis & DB state_type values
Icinga 2 sets now the `state_type` field to either `hard` or `soft`,
thus the mappings within the Icinga DB code is no longer needed.
2025-06-05 14:25:26 +02:00
Eric Lippmann
7c068d4adf Use icinga-go-library 2024-05-24 09:56:28 +02:00
Eric Lippmann
2f3bf491d7 Move utils#Name() to types#Name() 2024-05-22 11:51:21 +02:00
Eric Lippmann
75501e11f8 Move database related contracts to database/contracts 2024-05-22 11:51:21 +02:00
Alexander A. Klimov
6209b5b376 Save memory during config sync via SyncSubject#FactoryForDelta()
Code comment TL;DR: Allocate the same amount of smaller data structures
2022-09-13 17:57:23 +02:00
Eric Lippmann
4d65c62f77 Handle contracts.Initer in common.NewSyncSubject()
contracts.EntitiyFactoryFunc.WithInit() checked for
contracts.Initer every time.
Now it is only done once in common.NewSyncSubject().
2021-10-26 09:31:36 +02:00
Eric Lippmann
fe6915447e Add method SyncSubject.Name() 2021-10-26 09:27:00 +02:00
Eric Lippmann
961a3650e8 Introduce type common.SyncSubject 2021-05-11 16:40:08 +02:00