Documentation
¶
Overview ¶
Package entdriver
Index ¶
- type EntDriver
- func (ed *EntDriver) Ancestry(ctx context.Context, hash string) ([]*merkle.Node, error)
- func (ed *EntDriver) Close() error
- func (ed *EntDriver) Depth(ctx context.Context, hash string) (int, error)
- func (ed *EntDriver) Get(ctx context.Context, hash string) (*merkle.Node, error)
- func (ed *EntDriver) GetByParent(ctx context.Context, parentHash *string) ([]*merkle.Node, error)
- func (ed *EntDriver) Has(ctx context.Context, hash string) (bool, error)
- func (ed *EntDriver) Leaves(ctx context.Context) ([]*merkle.Node, error)
- func (ed *EntDriver) List(ctx context.Context) ([]*merkle.Node, error)
- func (ed *EntDriver) Put(ctx context.Context, n *merkle.Node) (bool, error)
- func (ed *EntDriver) Roots(ctx context.Context) ([]*merkle.Node, error)
- func (ed *EntDriver) UpdateUsage(ctx context.Context, hash string, usage *llm.Usage) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EntDriver ¶
EntDriver provides storage operations using an ent client. It is database-agnostic and can be embedded by specific drivers.
func (*EntDriver) Ancestry ¶
Ancestry returns the path from a node back to its root (node first, root last). Uses the parent edge for traversal.
func (*EntDriver) GetByParent ¶
GetByParent retrieves all nodes that have the given parent hash. Uses the children edge for efficient lookups.
func (*EntDriver) Leaves ¶
Leaves returns all leaf nodes (nodes with no children). Uses the children edge for efficient detection.
func (*EntDriver) Put ¶
Put stores a node. Returns true if the node was newly inserted, false if it already existed. This is a no-op due to content-addressing.
Click to show internal directories.
Click to hide internal directories.