Documentation
¶
Overview ¶
Package memstore provides an in-memory SpendStore for local development, ark run, and unit tests. Data is not persisted across restarts.
Register it with a blank import:
import _ "github.com/arkonis-dev/ark/pkg/costs/memstore"
Index ¶
- type MemSpendStore
- func (m *MemSpendStore) Record(_ context.Context, entry costs.SpendEntry) error
- func (m *MemSpendStore) Rollup(_ context.Context, scope costs.SpendScope, period costs.Period, ...) ([]costs.RollupEntry, error)
- func (m *MemSpendStore) Total(_ context.Context, scope costs.SpendScope, since time.Time) (float64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemSpendStore ¶
type MemSpendStore struct {
// contains filtered or unexported fields
}
MemSpendStore is a non-persistent, thread-safe SpendStore backed by a slice.
func (*MemSpendStore) Record ¶
func (m *MemSpendStore) Record(_ context.Context, entry costs.SpendEntry) error
func (*MemSpendStore) Rollup ¶
func (m *MemSpendStore) Rollup(_ context.Context, scope costs.SpendScope, period costs.Period, since time.Time) ([]costs.RollupEntry, error)
Click to show internal directories.
Click to hide internal directories.