minor fixes

This commit is contained in:
Jay
2026-05-22 17:05:31 -04:00
parent 35cfe0ebf6
commit a9ca8394c4
2 changed files with 4 additions and 8 deletions
+4 -4
View File
@@ -21,7 +21,7 @@ type preparedWrite struct {
Subgraph *EventSubgraph
}
type excludedEvent struct {
type ExcludedEvent struct {
Event roots.ValidatedEvent
Reason error
}
@@ -32,7 +32,7 @@ type WriteResult struct {
}
type WriteReport struct {
ExcludedEvents []excludedEvent
ExcludedEvents []ExcludedEvent
CreatedEventCount int
Neo4jResultSummaries []neo4j.ResultSummary
Duration time.Duration
@@ -81,7 +81,7 @@ func setDefaultWriteOptions(opts *WriteOptions) {
}
}
func enforcePolicyRules(in []roots.ValidatedEvent, boltdb *bolt.DB, batchSize int) (queued []roots.ValidatedEvent, excluded []excludedEvent) {
func enforcePolicyRules(in []roots.ValidatedEvent, boltdb *bolt.DB, batchSize int) (queued []roots.ValidatedEvent, excluded []ExcludedEvent) {
for i := 0; i < len(in); i += batchSize {
end := i + batchSize
if end > len(in) {
@@ -98,7 +98,7 @@ func enforcePolicyRules(in []roots.ValidatedEvent, boltdb *bolt.DB, batchSize in
for _, e := range batch {
if existsMap[e.ID()] {
excluded = append(excluded, excludedEvent{
excluded = append(excluded, ExcludedEvent{
Event: e,
Reason: fmt.Errorf("skipped: %w", ErrDuplicate),
})