Documentation
¶
Index ¶
Constants ¶
View Source
const ( TypeLogger ProviderType = iota TypeErrorReporter TypeMetrics LevelInfo Severity = iota LevelWarn LevelError LevelDebug )
Variables ¶
This section is empty.
Functions ¶
func NewDefaultProvider ¶
func NewDefaultProvider() interface{}
a NULL provider that does nothing but prevents NPEs in case someone forgets to actually initializa the 'real' provider
Types ¶
type ErrorReportingProvider ¶
type ErrorReportingProvider interface {
ReportError(error)
}
type GenericProvider ¶
type GenericProvider interface {
Close() error
}
type InstanceProviderFunc ¶
type InstanceProviderFunc func() interface{}
type LoggingProvider ¶
type MetricsProvider ¶
type ProviderConfig ¶
type ProviderConfig struct {
ID string
Type ProviderType
Impl InstanceProviderFunc
}
func WithProvider ¶
func WithProvider(ID string, providerType ProviderType, impl InstanceProviderFunc) ProviderConfig
WithProvider returns a populated ProviderConfig struct.
type ProviderType ¶
type ProviderType int
func (ProviderType) String ¶
func (l ProviderType) String() string
Returns the name of a provider type
Click to show internal directories.
Click to hide internal directories.