Skip to content

Commit

Permalink
move decisionType into trace_decision.go
Browse files Browse the repository at this point in the history
  • Loading branch information
VinozzZ committed Nov 8, 2024
1 parent 61c0945 commit d58efe4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
18 changes: 0 additions & 18 deletions collect/collect.go
Original file line number Diff line number Diff line change
Expand Up @@ -1529,24 +1529,6 @@ func (i *InMemCollector) publishTraceDecision(ctx context.Context, td TraceDecis
}
}

type decisionType int

func (d decisionType) String() string {
switch d {
case keptDecision:
return "kept"
case dropDecision:
return "drop"
default:
return "unknown"
}
}

var (
keptDecision decisionType = 1
dropDecision decisionType = 2
)

func (i *InMemCollector) sendKeptDecisions() {
if i.Config.GetCollectionConfig().EnableTraceLocality {
return
Expand Down
18 changes: 18 additions & 0 deletions collect/trace_decision.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,24 @@ import (
"strings"
)

type decisionType int

func (d decisionType) String() string {
switch d {
case keptDecision:
return "kept"
case dropDecision:
return "drop"
default:
return "unknown"
}
}

var (
keptDecision decisionType = 1
dropDecision decisionType = 2
)

type newDecisionMessage func([]TraceDecision) (string, error)

func newDroppedDecisionMessage(tds []TraceDecision) (string, error) {
Expand Down

0 comments on commit d58efe4

Please sign in to comment.