@@ -54,7 +54,7 @@ type Series struct {
54
54
Node cluster.Node
55
55
}
56
56
57
- func (s * Server ) findSeries (ctx context.Context , orgId int , patterns []string , seenAfter int64 ) ([]Series , error ) {
57
+ func (s * Server ) findSeries (ctx context.Context , orgId uint32 , patterns []string , seenAfter int64 ) ([]Series , error ) {
58
58
peers , err := cluster .MembersForQuery ()
59
59
if err != nil {
60
60
log .Error (3 , "HTTP findSeries unable to get peers, %s" , err )
@@ -118,7 +118,7 @@ func (s *Server) findSeries(ctx context.Context, orgId int, patterns []string, s
118
118
return series , nil
119
119
}
120
120
121
- func (s * Server ) findSeriesLocal (ctx context.Context , orgId int , patterns []string , seenAfter int64 ) ([]Series , error ) {
121
+ func (s * Server ) findSeriesLocal (ctx context.Context , orgId uint32 , patterns []string , seenAfter int64 ) ([]Series , error ) {
122
122
result := make ([]Series , 0 )
123
123
for _ , pattern := range patterns {
124
124
select {
@@ -149,7 +149,7 @@ func (s *Server) findSeriesLocal(ctx context.Context, orgId int, patterns []stri
149
149
return result , nil
150
150
}
151
151
152
- func (s * Server ) findSeriesRemote (ctx context.Context , orgId int , patterns []string , seenAfter int64 , peer cluster.Node ) ([]Series , error ) {
152
+ func (s * Server ) findSeriesRemote (ctx context.Context , orgId uint32 , patterns []string , seenAfter int64 , peer cluster.Node ) ([]Series , error ) {
153
153
log .Debug ("HTTP Render querying %s/index/find for %d:%q" , peer .GetName (), orgId , patterns )
154
154
data := models.IndexFind {
155
155
Patterns : patterns ,
@@ -370,11 +370,11 @@ func (s *Server) metricsFind(ctx *middleware.Context, request models.GraphiteFin
370
370
}
371
371
}
372
372
373
- func (s * Server ) listLocal (orgId int ) []idx.Archive {
373
+ func (s * Server ) listLocal (orgId uint32 ) []idx.Archive {
374
374
return s .MetricIndex .List (orgId )
375
375
}
376
376
377
- func (s * Server ) listRemote (ctx context.Context , orgId int , peer cluster.Node ) ([]idx.Archive , error ) {
377
+ func (s * Server ) listRemote (ctx context.Context , orgId uint32 , peer cluster.Node ) ([]idx.Archive , error ) {
378
378
log .Debug ("HTTP IndexJson() querying %s/index/list for %d" , peer .GetName (), orgId )
379
379
buf , err := peer .Post (ctx , "listRemote" , "/index/list" , models.IndexList {OrgId : orgId })
380
380
if err != nil {
@@ -635,12 +635,12 @@ func (s *Server) metricsDelete(ctx *middleware.Context, req models.MetricsDelete
635
635
response .Write (ctx , response .NewJson (200 , resp , "" ))
636
636
}
637
637
638
- func (s * Server ) metricsDeleteLocal (orgId int , query string ) (int , error ) {
638
+ func (s * Server ) metricsDeleteLocal (orgId uint32 , query string ) (int , error ) {
639
639
defs , err := s .MetricIndex .Delete (orgId , query )
640
640
return len (defs ), err
641
641
}
642
642
643
- func (s * Server ) metricsDeleteRemote (ctx context.Context , orgId int , query string , peer cluster.Node ) (int , error ) {
643
+ func (s * Server ) metricsDeleteRemote (ctx context.Context , orgId uint32 , query string , peer cluster.Node ) (int , error ) {
644
644
log .Debug ("HTTP metricDelete calling %s/index/delete for %d:%q" , peer .GetName (), orgId , query )
645
645
646
646
body := models.IndexDelete {
@@ -673,7 +673,7 @@ func (s *Server) metricsDeleteRemote(ctx context.Context, orgId int, query strin
673
673
// executePlan looks up the needed data, retrieves it, and then invokes the processing
674
674
// note if you do something like sum(foo.*) and all of those metrics happen to be on another node,
675
675
// we will collect all the indidividual series from the peer, and then sum here. that could be optimized
676
- func (s * Server ) executePlan (ctx context.Context , orgId int , plan expr.Plan ) ([]models.Series , error ) {
676
+ func (s * Server ) executePlan (ctx context.Context , orgId uint32 , plan expr.Plan ) ([]models.Series , error ) {
677
677
678
678
minFrom := uint32 (math .MaxUint32 )
679
679
var maxTo uint32
@@ -861,7 +861,7 @@ func (s *Server) graphiteTagDetails(ctx *middleware.Context, request models.Grap
861
861
response .Write (ctx , response .NewJson (200 , resp , "" ))
862
862
}
863
863
864
- func (s * Server ) clusterTagDetails (ctx context.Context , orgId int , tag , filter string , from int64 ) (map [string ]uint64 , error ) {
864
+ func (s * Server ) clusterTagDetails (ctx context.Context , orgId uint32 , tag , filter string , from int64 ) (map [string ]uint64 , error ) {
865
865
result , err := s .MetricIndex .TagDetails (orgId , tag , filter , from )
866
866
if err != nil {
867
867
return nil , err
@@ -923,7 +923,7 @@ func (s *Server) graphiteTagFindSeries(ctx *middleware.Context, request models.G
923
923
response .Write (ctx , response .NewJson (200 , seriesNames , "" ))
924
924
}
925
925
926
- func (s * Server ) clusterFindByTag (ctx context.Context , orgId int , expressions []string , from int64 ) ([]Series , error ) {
926
+ func (s * Server ) clusterFindByTag (ctx context.Context , orgId uint32 , expressions []string , from int64 ) ([]Series , error ) {
927
927
seriesSet := make (map [string ]Series )
928
928
929
929
result , err := s .MetricIndex .FindByTag (orgId , expressions , from )
@@ -1005,7 +1005,7 @@ func (s *Server) graphiteTags(ctx *middleware.Context, request models.GraphiteTa
1005
1005
response .Write (ctx , response .NewJson (200 , resp , "" ))
1006
1006
}
1007
1007
1008
- func (s * Server ) clusterTags (ctx context.Context , orgId int , filter string , from int64 ) ([]string , error ) {
1008
+ func (s * Server ) clusterTags (ctx context.Context , orgId uint32 , filter string , from int64 ) ([]string , error ) {
1009
1009
result , err := s .MetricIndex .Tags (orgId , filter , from )
1010
1010
if err != nil {
1011
1011
return nil , err
@@ -1068,7 +1068,7 @@ func (s *Server) graphiteAutoCompleteTags(ctx *middleware.Context, request model
1068
1068
response .Write (ctx , response .NewJson (200 , tags , "" ))
1069
1069
}
1070
1070
1071
- func (s * Server ) clusterAutoCompleteTags (ctx context.Context , orgId int , prefix string , expressions []string , from int64 , limit uint ) ([]string , error ) {
1071
+ func (s * Server ) clusterAutoCompleteTags (ctx context.Context , orgId uint32 , prefix string , expressions []string , from int64 , limit uint ) ([]string , error ) {
1072
1072
result , err := s .MetricIndex .FindTags (orgId , prefix , expressions , from , limit )
1073
1073
if err != nil {
1074
1074
return nil , err
@@ -1123,7 +1123,7 @@ func (s *Server) graphiteAutoCompleteTagValues(ctx *middleware.Context, request
1123
1123
response .Write (ctx , response .NewJson (200 , resp , "" ))
1124
1124
}
1125
1125
1126
- func (s * Server ) clusterAutoCompleteTagValues (ctx context.Context , orgId int , tag , prefix string , expressions []string , from int64 , limit uint ) ([]string , error ) {
1126
+ func (s * Server ) clusterAutoCompleteTagValues (ctx context.Context , orgId uint32 , tag , prefix string , expressions []string , from int64 , limit uint ) ([]string , error ) {
1127
1127
result , err := s .MetricIndex .FindTagValues (orgId , tag , prefix , expressions , from , limit )
1128
1128
if err != nil {
1129
1129
return nil , err
0 commit comments