abstract class Di::Provider::Base

Overview

Abstract base for type-erased provider storage in the registry. Only includes methods that don't need type info.

Direct Known Subclasses

Defined in:

di/provider.cr

Instance Method Summary

Instance Method Detail

def check_health : Bool | Nil #

Attempt to call .healthy? on the cached instance. Returns nil if not resolved, transient, or service doesn't respond.


[View source]
abstract def key=(key : String) #

Registry key for cycle detection (set by register_provider).


[View source]
abstract def reset! : Nil #

[View source]
def shutdown_instance : Nil #

Attempt to call .shutdown on the cached instance (if any). No-op for transient providers or unresolved singletons.


[View source]
abstract def transient? : Bool #

[View source]