Documentation
¶
Index ¶
- Constants
- Variables
- func EscapeKey(value string) string
- func NodePlanIndexKey(projectID string, label string, planID string, id string) string
- func NodeStatusIndexKey(projectID string, label string, status string, id string) string
- func NodeStorageKey(label string, id string) string
- func PebbleGraphPath(path string) string
- func PrefixUpperBound(prefix []byte) []byte
- func ProjectNodeIndexKey(projectID string, label string, id string) string
- type BatchGraph
- type Graph
- type LazyPebbleGraph
- func (graph *LazyPebbleGraph) Batch(ctx context.Context, fn func(Graph) error) error
- func (graph *LazyPebbleGraph) Bootstrap(ctx context.Context, graphSchema schema.GraphSchema) error
- func (graph *LazyPebbleGraph) Close() error
- func (graph *LazyPebbleGraph) DeleteDerivedFileNodes(ctx context.Context, projectID string, repoFileID string) error
- func (graph *LazyPebbleGraph) DeleteNodes(ctx context.Context, label string, filter map[string]string) error
- func (graph *LazyPebbleGraph) Diagnostics() LazyPebbleGraphDiagnostics
- func (graph *LazyPebbleGraph) GetNode(ctx context.Context, label string, id string) (Node, error)
- func (graph *LazyPebbleGraph) IsOpenForTest() bool
- func (graph *LazyPebbleGraph) ListNodes(ctx context.Context, label string, filter map[string]string) ([]Node, error)
- func (graph *LazyPebbleGraph) ListRelationships(ctx context.Context, relationshipType string, filter RelationshipFilter) ([]Relationship, error)
- func (graph *LazyPebbleGraph) PutNode(ctx context.Context, node Node) error
- func (graph *LazyPebbleGraph) PutRelationship(ctx context.Context, relationship Relationship) error
- type LazyPebbleGraphDiagnostics
- type MemoryGraph
- func (graph *MemoryGraph) Bootstrap(_ context.Context, graphSchema schema.GraphSchema) error
- func (graph *MemoryGraph) DeleteDerivedFileNodes(_ context.Context, projectID string, repoFileID string) error
- func (graph *MemoryGraph) DeleteNodes(_ context.Context, label string, filter map[string]string) error
- func (graph *MemoryGraph) GetNode(_ context.Context, label string, id string) (Node, error)
- func (graph *MemoryGraph) GetRelationship(_ context.Context, relationshipType string, from NodeRef, to NodeRef) (Relationship, error)
- func (graph *MemoryGraph) ListNodes(_ context.Context, label string, filter map[string]string) ([]Node, error)
- func (graph *MemoryGraph) ListRelationships(_ context.Context, relationshipType string, filter RelationshipFilter) ([]Relationship, error)
- func (graph *MemoryGraph) PutNode(_ context.Context, node Node) error
- func (graph *MemoryGraph) PutRelationship(_ context.Context, relationship Relationship) error
- func (graph *MemoryGraph) SchemaSnapshot() schema.GraphSchema
- type NativeRuntimeStatus
- type Node
- type NodeRef
- type PebbleGraph
- func (graph *PebbleGraph) Batch(ctx context.Context, fn func(Graph) error) error
- func (graph *PebbleGraph) Bootstrap(ctx context.Context, graphSchema schema.GraphSchema) error
- func (graph *PebbleGraph) Close() error
- func (graph *PebbleGraph) DeleteDerivedFileNodes(ctx context.Context, projectID string, repoFileID string) error
- func (graph *PebbleGraph) DeleteNodes(ctx context.Context, label string, filter map[string]string) error
- func (graph *PebbleGraph) GetNode(ctx context.Context, label string, id string) (Node, error)
- func (graph *PebbleGraph) ListNodes(ctx context.Context, label string, filter map[string]string) ([]Node, error)
- func (graph *PebbleGraph) ListRelationships(ctx context.Context, relationshipType string, filter RelationshipFilter) ([]Relationship, error)
- func (graph *PebbleGraph) PutNode(ctx context.Context, node Node) error
- func (graph *PebbleGraph) PutRelationship(ctx context.Context, relationship Relationship) error
- type PebbleGraphLRU
- type PebbleGraphLRUDiagnostics
- type PersistentGraph
- func (graph *PersistentGraph) Batch(ctx context.Context, fn func(Graph) error) error
- func (graph *PersistentGraph) Bootstrap(ctx context.Context, graphSchema schema.GraphSchema) error
- func (graph *PersistentGraph) DeleteDerivedFileNodes(ctx context.Context, projectID string, repoFileID string) error
- func (graph *PersistentGraph) DeleteNodes(ctx context.Context, label string, filter map[string]string) error
- func (graph *PersistentGraph) Diagnostics() PersistentGraphDiagnostics
- func (graph *PersistentGraph) GetNode(ctx context.Context, label string, id string) (Node, error)
- func (graph *PersistentGraph) GetRelationship(ctx context.Context, relationshipType string, from NodeRef, to NodeRef) (Relationship, error)
- func (graph *PersistentGraph) ListNodes(ctx context.Context, label string, filter map[string]string) ([]Node, error)
- func (graph *PersistentGraph) ListRelationships(ctx context.Context, relationshipType string, filter RelationshipFilter) ([]Relationship, error)
- func (graph *PersistentGraph) PutNode(ctx context.Context, node Node) error
- func (graph *PersistentGraph) PutRelationship(ctx context.Context, relationship Relationship) error
- func (graph *PersistentGraph) SchemaSnapshot() schema.GraphSchema
- type PersistentGraphDiagnostics
- type Relationship
- type RelationshipFilter
Constants ¶
View Source
const DefaultPebbleGraphMaxOpen = 16
Variables ¶
View Source
var ( ErrNodeNotFound = errors.New("ladybug node not found") ErrRelationshipNotFound = errors.New("ladybug relationship not found") )
View Source
var ErrLazyPebbleGraphClosing = errors.New("lazy pebble graph is closing")
Functions ¶
func NodePlanIndexKey ¶ added in v0.3.0
NodePlanIndexKey is the composite plan_id secondary index key. It enables ListNodes(label, {project_id, plan_id}) to be a prefix scan instead of a full np: scan + Go post-filter. Critical for WorkTask queries where a plan has 14-17 tasks but the project has 1400+ — the scan drops from 1400 to 17.
func NodeStatusIndexKey ¶ added in v0.3.0
NodeStatusIndexKey is the composite status secondary index key. It enables ListNodes(label, {project_id, status}) to be a prefix scan instead of a full np: scan + Go post-filter. Written/deleted alongside np: in the same batch, so status mutations atomically evict the old key and write the new one.
func NodeStorageKey ¶ added in v0.3.0
func PebbleGraphPath ¶ added in v0.1.10
func PrefixUpperBound ¶ added in v0.3.0
Types ¶
type Graph ¶
type Graph interface {
Bootstrap(context.Context, schema.GraphSchema) error
PutNode(context.Context, Node) error
GetNode(context.Context, string, string) (Node, error)
ListNodes(context.Context, string, map[string]string) ([]Node, error)
DeleteNodes(context.Context, string, map[string]string) error
DeleteDerivedFileNodes(context.Context, string, string) error
PutRelationship(context.Context, Relationship) error
ListRelationships(context.Context, string, RelationshipFilter) ([]Relationship, error)
}
type LazyPebbleGraph ¶ added in v0.1.10
type LazyPebbleGraph struct {
// contains filtered or unexported fields
}
func NewLazyPebbleGraph ¶ added in v0.1.10
func NewLazyPebbleGraph(path string, manager *PebbleGraphLRU) *LazyPebbleGraph
func (*LazyPebbleGraph) Bootstrap ¶ added in v0.1.10
func (graph *LazyPebbleGraph) Bootstrap(ctx context.Context, graphSchema schema.GraphSchema) error
func (*LazyPebbleGraph) Close ¶ added in v0.1.10
func (graph *LazyPebbleGraph) Close() error
func (*LazyPebbleGraph) DeleteDerivedFileNodes ¶ added in v0.1.10
func (*LazyPebbleGraph) DeleteNodes ¶ added in v0.1.10
func (*LazyPebbleGraph) Diagnostics ¶ added in v0.1.10
func (graph *LazyPebbleGraph) Diagnostics() LazyPebbleGraphDiagnostics
func (*LazyPebbleGraph) IsOpenForTest ¶ added in v0.1.10
func (graph *LazyPebbleGraph) IsOpenForTest() bool
func (*LazyPebbleGraph) ListRelationships ¶ added in v0.1.10
func (graph *LazyPebbleGraph) ListRelationships(ctx context.Context, relationshipType string, filter RelationshipFilter) ([]Relationship, error)
func (*LazyPebbleGraph) PutNode ¶ added in v0.1.10
func (graph *LazyPebbleGraph) PutNode(ctx context.Context, node Node) error
func (*LazyPebbleGraph) PutRelationship ¶ added in v0.1.10
func (graph *LazyPebbleGraph) PutRelationship(ctx context.Context, relationship Relationship) error
type LazyPebbleGraphDiagnostics ¶ added in v0.1.10
type MemoryGraph ¶
type MemoryGraph struct {
// contains filtered or unexported fields
}
func NewMemoryGraph ¶
func NewMemoryGraph() *MemoryGraph
func (*MemoryGraph) Bootstrap ¶
func (graph *MemoryGraph) Bootstrap(_ context.Context, graphSchema schema.GraphSchema) error
func (*MemoryGraph) DeleteDerivedFileNodes ¶
func (*MemoryGraph) DeleteNodes ¶
func (*MemoryGraph) GetRelationship ¶
func (graph *MemoryGraph) GetRelationship(_ context.Context, relationshipType string, from NodeRef, to NodeRef) (Relationship, error)
func (*MemoryGraph) ListRelationships ¶
func (graph *MemoryGraph) ListRelationships(_ context.Context, relationshipType string, filter RelationshipFilter) ([]Relationship, error)
func (*MemoryGraph) PutRelationship ¶
func (graph *MemoryGraph) PutRelationship(_ context.Context, relationship Relationship) error
func (*MemoryGraph) SchemaSnapshot ¶
func (graph *MemoryGraph) SchemaSnapshot() schema.GraphSchema
type NativeRuntimeStatus ¶
func NativeStatus ¶
func NativeStatus() NativeRuntimeStatus
type PebbleGraph ¶ added in v0.1.10
type PebbleGraph struct {
// contains filtered or unexported fields
}
func OpenPebbleGraph ¶ added in v0.1.10
func OpenPebbleGraph(path string) (*PebbleGraph, error)
func (*PebbleGraph) Bootstrap ¶ added in v0.1.10
func (graph *PebbleGraph) Bootstrap(ctx context.Context, graphSchema schema.GraphSchema) error
func (*PebbleGraph) Close ¶ added in v0.1.10
func (graph *PebbleGraph) Close() error
func (*PebbleGraph) DeleteDerivedFileNodes ¶ added in v0.1.10
func (*PebbleGraph) DeleteNodes ¶ added in v0.1.10
func (*PebbleGraph) ListRelationships ¶ added in v0.1.10
func (graph *PebbleGraph) ListRelationships(ctx context.Context, relationshipType string, filter RelationshipFilter) ([]Relationship, error)
func (*PebbleGraph) PutNode ¶ added in v0.1.10
func (graph *PebbleGraph) PutNode(ctx context.Context, node Node) error
func (*PebbleGraph) PutRelationship ¶ added in v0.1.10
func (graph *PebbleGraph) PutRelationship(ctx context.Context, relationship Relationship) error
type PebbleGraphLRU ¶ added in v0.1.10
type PebbleGraphLRU struct {
// contains filtered or unexported fields
}
func NewPebbleGraphLRU ¶ added in v0.1.10
func NewPebbleGraphLRU(maxOpen int) *PebbleGraphLRU
func (*PebbleGraphLRU) CloseAll ¶ added in v0.1.10
func (lru *PebbleGraphLRU) CloseAll() error
func (*PebbleGraphLRU) Diagnostics ¶ added in v0.1.10
func (lru *PebbleGraphLRU) Diagnostics() PebbleGraphLRUDiagnostics
type PebbleGraphLRUDiagnostics ¶ added in v0.1.10
type PersistentGraph ¶
type PersistentGraph struct {
// contains filtered or unexported fields
}
func OpenPersistentGraph ¶
func OpenPersistentGraph(path string) (*PersistentGraph, error)
func (*PersistentGraph) Bootstrap ¶
func (graph *PersistentGraph) Bootstrap(ctx context.Context, graphSchema schema.GraphSchema) error
func (*PersistentGraph) DeleteDerivedFileNodes ¶
func (*PersistentGraph) DeleteNodes ¶
func (*PersistentGraph) Diagnostics ¶ added in v0.1.10
func (graph *PersistentGraph) Diagnostics() PersistentGraphDiagnostics
func (*PersistentGraph) GetRelationship ¶
func (graph *PersistentGraph) GetRelationship(ctx context.Context, relationshipType string, from NodeRef, to NodeRef) (Relationship, error)
func (*PersistentGraph) ListRelationships ¶
func (graph *PersistentGraph) ListRelationships(ctx context.Context, relationshipType string, filter RelationshipFilter) ([]Relationship, error)
func (*PersistentGraph) PutNode ¶
func (graph *PersistentGraph) PutNode(ctx context.Context, node Node) error
func (*PersistentGraph) PutRelationship ¶
func (graph *PersistentGraph) PutRelationship(ctx context.Context, relationship Relationship) error
func (*PersistentGraph) SchemaSnapshot ¶
func (graph *PersistentGraph) SchemaSnapshot() schema.GraphSchema
type PersistentGraphDiagnostics ¶ added in v0.1.10
type PersistentGraphDiagnostics struct {
IgnoredPartialJournalRecords int `json:"ignored_partial_journal_records"`
}
type Relationship ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.