Documentation
¶
Index ¶
- Constants
- Variables
- type Delete
- type EvenType
- type Event
- type FromString
- type Get
- type Key
- type Less
- type List
- type Object
- type SortedMap
- type Store
- type StringKey
- type Table
- func (t *Table[K, T]) Begin(ctx context.Context) (*TableTx[K, T], error)
- func (t *Table[K, T]) Between(from, to K) iter.Seq[T]
- func (t *Table[K, T]) From(key K) iter.Seq[T]
- func (t *Table[K, T]) Get(key K) (T, bool)
- func (t *Table[K, T]) List() iter.Seq[T]
- func (t *Table[K, T]) Metrics() []prometheus.Collector
- func (t *Table[K, T]) ReadinessChecks() map[string]observability.Check
- func (t *Table[K, T]) Run(ctx context.Context, notify run.Notify) error
- type TableTx
Constants ¶
View Source
const ( BackoffInitialInterval = 100 * time.Millisecond BackoffMultiplier = 1.5 BackoffMaxRetriess = 3 )
Variables ¶
View Source
var ( ErrNotLoaded = errors.New("not loaded yet") ErrNotListening = errors.New("not listening yet") ErrInvalidUpdate = errors.New("invalid update") ErrAlreadyCommitted = errors.New("already committed") )
View Source
var ErrUnexpectedEvenType = errors.New("unexpected event type")
Functions ¶
This section is empty.
Types ¶
type FromString ¶
type Get ¶
type Get[K Key[K], T Object[K]] func(ctx context.Context, conn *pgxpool.Pool, keys []K) ([]T, error)
Get returns all objects matching the given keys from the database.
type SortedMap ¶
type SortedMap[K Key[K], V any] struct { // contains filtered or unexported fields }
func NewSortedMap ¶
type Table ¶
type Table[K Key[K], T Object[K]] struct {
// contains filtered or unexported fields
}
func (*Table[K, T]) Metrics ¶
func (t *Table[K, T]) Metrics() []prometheus.Collector
Metrics implements observability.Metrics.
func (*Table[K, T]) ReadinessChecks ¶
func (t *Table[K, T]) ReadinessChecks() map[string]observability.Check
ReadinessChecks implements observability.ReadinessChecks.
Click to show internal directories.
Click to hide internal directories.