SingletonRegistry defines methods for managing singleton instances within the component system.
| 16 | |
| 17 | // SingletonRegistry defines methods for managing singleton instances within the component system. |
| 18 | type SingletonRegistry interface { |
| 19 | // RegisterSingleton registers a singleton instance with the given name. |
| 20 | // Returns an error if a singleton with the same name already exists. |
| 21 | RegisterSingleton(name string, instance any) error |
| 22 | |
| 23 | // ContainsSingleton checks whether a singleton with the specified name exists. |
| 24 | ContainsSingleton(name string) bool |
| 25 | |
| 26 | // Singleton retrieves the singleton instance associated with the given name. |
| 27 | // Returns the instance and a boolean indicating its existence. |
| 28 | Singleton(name string) (any, bool) |
| 29 | |
| 30 | // RemoveSingleton removes the singleton instance associated with the specified name. |
| 31 | RemoveSingleton(name string) error |
| 32 | } |
nothing calls this directly
no outgoing calls
no test coverage detected