Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Options( fx.Provide(ProvideFromEntityCache), fx.Provide(NewMetrics), )
Module is a set of default providers for servicegetter components.
Functions ¶
This section is empty.
Types ¶
type FxIn ¶
type FxIn struct { fx.In Lifecycle fx.Lifecycle EntityCache *entitycache.EntityCache EntityTrackers *entitycache.EntityTrackers Metrics *Metrics `optional:"true"` }
FxIn are FX arguments to ProvideFromEntityCache.
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
Metrics is used for collecting metrics about servicegetter
nil value of Metrics should be always usable.
func NewMetrics ¶
func NewMetrics(registry *prometheus.Registry) (*Metrics, error)
NewMetrics creates new Metrics, registering counters in given registry.
type ServiceGetter ¶
ServiceGetter can be used to query services based on client context.
func FromEntityCache ¶
func FromEntityCache(ec *entitycache.EntityCache) ServiceGetter
FromEntityCache creates a new EntityCache-powered ServiceGetter.
func NewEmpty ¶
func NewEmpty() ServiceGetter
NewEmpty creates a new ServiceGetter that always returns nil.
func ProvideFromEntityCache ¶
func ProvideFromEntityCache(in FxIn) ServiceGetter
ProvideFromEntityCache provides an EntityCache-powered ServiceGetter.
Click to show internal directories.
Click to hide internal directories.