Singleton
faststream.utils.classes.Singleton #
A class to implement the Singleton design pattern.
ATTRIBUTE | DESCRIPTION |
---|---|
_instance | the single instance of the class
|
METHOD | DESCRIPTION |
---|---|
__new__ | creates a new instance of the class if it doesn't exist, otherwise returns the existing instance |
_drop | sets the instance to None, allowing a new instance to be created |