Documentation
¶
Index ¶
- type Driver
- func (s *Driver) Ancestry(ctx context.Context, hash string) ([]*merkle.Node, error)
- func (s *Driver) Close() error
- func (s *Driver) Count() int
- func (s *Driver) Depth(ctx context.Context, hash string) (int, error)
- func (s *Driver) Get(_ context.Context, hash string) (*merkle.Node, error)
- func (s *Driver) GetByParent(_ context.Context, parentHash *string) ([]*merkle.Node, error)
- func (s *Driver) Has(_ context.Context, hash string) (bool, error)
- func (s *Driver) Leaves(_ context.Context) ([]*merkle.Node, error)
- func (s *Driver) List(_ context.Context) ([]*merkle.Node, error)
- func (s *Driver) Migrate(_ context.Context) error
- func (s *Driver) Put(_ context.Context, node *merkle.Node) (bool, error)
- func (s *Driver) Roots(ctx context.Context) ([]*merkle.Node, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver implements Storer using an in-memory map.
func (*Driver) Ancestry ¶
Ancestry returns the path from a node back to its root (node first, root last).
func (*Driver) GetByParent ¶
GetByParent retrieves all nodes that have the provided parent. This is useful for determining where branching occurs.
Click to show internal directories.
Click to hide internal directories.