Documentation ¶
Index ¶
- Variables
- func ApplyFieldMask(src proto.Message, dst proto.Message, fm *fieldmaskpb.FieldMask) error
- func ApplyFieldMaskPaths(src, dst proto.Message, path ...string) error
- func FilterFieldMask(m proto.Message, fm *fieldmaskpb.FieldMask) error
- func FilterFieldMaskPaths(m proto.Message, path ...string) error
- func IsKeyOnlyFilter(f protodb.Filter, field string) bool
- func MatchKey(filter filters.FieldFilterer, value string) (bool, error)
- func MatchPrefixOnly(f protodb.Filter) (string, bool)
- func Open(ctx context.Context, opts ...Option) (protodb.DB, error)
- type Logger
- type Metrics
- type MetricsEnd
- type OpMetrics
- type Option
- func WithApplyDefaults(b bool) Option
- func WithBadgerOptionsFunc(fn func(opts badger.Options) badger.Options) Option
- func WithIgnoreProtoRegisterErrors() Option
- func WithInMemory(b bool) Option
- func WithLogger(l Logger) Option
- func WithOnClose(fn func()) Option
- func WithPath(path string) Option
- func WithProtoRegisterErrHandler(fn func(err error) error) Option
- func WithReplication(opts ...replication.Option) Option
- type TxMetrics
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultPath = "./data"
)
Functions ¶
func ApplyFieldMask ¶
func FilterFieldMask ¶
func FilterFieldMask(m proto.Message, fm *fieldmaskpb.FieldMask) error
Types ¶
type MetricsEnd ¶
type MetricsEnd interface {
End()
}
type OpMetrics ¶
type OpMetrics struct { OpsCounter *prometheus.CounterVec ErrorsCounter *prometheus.CounterVec DurationHist *prometheus.HistogramVec Inflight *prometheus.GaugeVec }
func (*OpMetrics) Start ¶
func (m *OpMetrics) Start(lvs ...string) MetricsEnd
type Option ¶
type Option func(o *options)
func WithApplyDefaults ¶
func WithBadgerOptionsFunc ¶
func WithBadgerOptionsFunc(fn func(opts badger.Options) badger.Options) Option
func WithIgnoreProtoRegisterErrors ¶
func WithIgnoreProtoRegisterErrors() Option
func WithInMemory ¶
func WithLogger ¶
func WithOnClose ¶
func WithOnClose(fn func()) Option
func WithReplication ¶
func WithReplication(opts ...replication.Option) Option
type TxMetrics ¶
type TxMetrics struct { OpMetrics SizeHist prometheus.Histogram OpCountHist prometheus.Histogram Get OpMetrics Set OpMetrics Delete OpMetrics }
Click to show internal directories.
Click to hide internal directories.