Documentation
¶
Index ¶
- Variables
- type Manager
- func (m *Manager) AcquireConnection(reference string) (func(), error)
- func (m *Manager) Close() error
- func (m *Manager) Create(ctx context.Context, result *query.ReconcileResult, age time.Duration) (profiles.ReconcileSnapshotDescriptor, error)
- func (m *Manager) Delete(context.Context, string) error
- func (m *Manager) Describe(_ context.Context, id string) (profiles.ReconcileSnapshotDescriptor, error)
- func (m *Manager) Get(_ context.Context, name string) (query.Profile, error)
- func (m *Manager) IsVirtual(name string) bool
- func (m *Manager) List(context.Context) ([]query.Profile, error)
- func (m *Manager) ListConnections() []*models.Connection
- func (m *Manager) Materialize(ctx context.Context, options profiles.ReconcileMaterializeOptions) (profiles.ReconcileSnapshotDescriptor, error)
- func (m *Manager) Peek(_ context.Context, name string) (query.Profile, error)
- func (m *Manager) Prepare() error
- func (m *Manager) ResolveConnection(reference string) (*models.Connection, error)
- func (m *Manager) Save(context.Context, query.Profile) error
- func (m *Manager) SetMaxAge(age time.Duration) error
- func (m *Manager) Update(context.Context, string, query.Profile, profiles.UpdateOptions) error
- type Options
Constants ¶
This section is empty.
Variables ¶
var ErrExpired = dbcontext.ErrConnectionExpired
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func (*Manager) AcquireConnection ¶
func (*Manager) Create ¶
func (m *Manager) Create(ctx context.Context, result *query.ReconcileResult, age time.Duration) (profiles.ReconcileSnapshotDescriptor, error)
func (*Manager) Describe ¶
func (m *Manager) Describe(_ context.Context, id string) (profiles.ReconcileSnapshotDescriptor, error)
Describe returns a stored snapshot's base descriptor.
It touches: a by-id read is someone opening the results page, which is exactly the activity sliding expiry tracks, and it is the first request of that page load — a non-touching read would hand back an expires_at already stale relative to the row reads that follow it milliseconds later.
func (*Manager) ListConnections ¶
func (m *Manager) ListConnections() []*models.Connection
func (*Manager) Materialize ¶
func (m *Manager) Materialize(ctx context.Context, options profiles.ReconcileMaterializeOptions) (profiles.ReconcileSnapshotDescriptor, error)
func (*Manager) Prepare ¶
Prepare creates the private root, reloads the snapshots a previous process left behind, and starts the prune loop. Serve calls it at startup; tests and direct callers can create lazily.
It no longer wipes the directory. Persisting each snapshot's metadata beside its rows is what makes a /reconcile/{id} link outlive the process that created it, and a startup wipe would undo exactly that. Anything whose deadline passed while the process was down is dropped during the reload, so the guarantee a client was given still holds.
func (*Manager) ResolveConnection ¶
func (m *Manager) ResolveConnection(reference string) (*models.Connection, error)