Documentation
¶
Overview ¶
Package state stores FerretDB process state.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider provides access to FerretDB process state.
func NewProvider ¶
NewProvider creates a new Provider that stores state in the given file.
If filename is empty, then the state is not persisted.
All provider's methods are thread-safe.
func (*Provider) Get ¶
Get returns a copy of the current process state.
It is okay to call this function often. The caller should not cache result; Provider does everything needed itself.
func (*Provider) MetricsCollector ¶
func (p *Provider) MetricsCollector(addUUIDToMetric bool) prometheus.Collector
MetricsCollector returns Prometheus metrics collector for that provider.
If addUUIDToMetric is true, then the UUID is added to the Prometheus metric.
Click to show internal directories.
Click to hide internal directories.