@@ -21,7 +21,7 @@ type queryBlocksParams struct {
21
21
LocalPath string
22
22
BucketName string
23
23
BlockIds []string
24
- TenanId string
24
+ TenantID string
25
25
ObjectStoreType string
26
26
Query string
27
27
}
@@ -37,7 +37,7 @@ func addQueryBlocksParams(queryCmd commander) *queryBlocksParams {
37
37
queryCmd .Flag ("bucket-name" , "The name of the object storage bucket." ).StringVar (& params .BucketName )
38
38
queryCmd .Flag ("object-store-type" , "The type of the object storage (e.g., gcs)." ).Default ("gcs" ).StringVar (& params .ObjectStoreType )
39
39
queryCmd .Flag ("block-ids" , "List of blocks ids to query on" ).StringsVar (& params .BlockIds )
40
- queryCmd .Flag ("tenant-id" , "Tenant id of the queried block for remote bucket" ).StringVar (& params .TenanId )
40
+ queryCmd .Flag ("tenant-id" , "Tenant id of the queried block for remote bucket" ).StringVar (& params .TenantID )
41
41
queryCmd .Flag ("query" , "Label selector to query." ).Default ("{}" ).StringVar (& params .Query )
42
42
return params
43
43
}
@@ -51,7 +51,7 @@ func addQueryBlocksSeriesParams(queryCmd commander) *queryBlocksSeriesParams {
51
51
52
52
func queryBlocksSeries (ctx context.Context , params * queryBlocksSeriesParams ) error {
53
53
level .Info (logger ).Log ("msg" , "query-block series" , "labelNames" , fmt .Sprintf ("%v" , params .LabelNames ),
54
- "blockIds" , fmt .Sprintf ("%v" , params .BlockIds ), "localPath" , params .LocalPath , "bucketName" , params .BucketName , "tenantId" , params .TenanId )
54
+ "blockIds" , fmt .Sprintf ("%v" , params .BlockIds ), "localPath" , params .LocalPath , "bucketName" , params .BucketName , "tenantId" , params .TenantID )
55
55
56
56
bucket , err := getBucket (ctx , params )
57
57
if err != nil {
@@ -97,7 +97,7 @@ func getBucket(ctx context.Context, params *queryBlocksSeriesParams) (objstore.B
97
97
}
98
98
99
99
func getRemoteBucket (ctx context.Context , params * queryBlocksSeriesParams ) (objstore.Bucket , error ) {
100
- if params .TenanId == "" {
100
+ if params .TenantID == "" {
101
101
return nil , errors .New ("specify tenant id for remote bucket" )
102
102
}
103
103
return objstoreclient .NewBucket (ctx , objstoreclient.Config {
@@ -107,6 +107,6 @@ func getRemoteBucket(ctx context.Context, params *queryBlocksSeriesParams) (objs
107
107
BucketName : params .BucketName ,
108
108
},
109
109
},
110
- StoragePrefix : fmt .Sprintf ("%s/phlaredb" , params .TenanId ),
110
+ StoragePrefix : fmt .Sprintf ("%s/phlaredb" , params .TenantID ),
111
111
}, params .BucketName )
112
112
}
0 commit comments