repo stringlengths 6 47 | file_url stringlengths 77 269 | file_path stringlengths 5 186 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-07 08:35:43 2026-01-07 08:55:24 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
binwiederhier/ntfy | https://github.com/binwiederhier/ntfy/blob/e18d64933fdfad2710ad8a930e1f880c2714cb52/log/log_test.go | log/log_test.go | package log
import (
"bytes"
"encoding/json"
"github.com/stretchr/testify/require"
"io"
"log"
"os"
"path/filepath"
"testing"
"time"
)
func TestMain(m *testing.M) {
exitCode := m.Run()
resetState()
SetLevel(ErrorLevel) // For other modules!
os.Exit(exitCode)
}
func TestLog_TagContextFieldFields(t *testin... | go | Apache-2.0 | e18d64933fdfad2710ad8a930e1f880c2714cb52 | 2026-01-07T08:37:03.915928Z | false |
binwiederhier/ntfy | https://github.com/binwiederhier/ntfy/blob/e18d64933fdfad2710ad8a930e1f880c2714cb52/log/types.go | log/types.go | package log
import (
"encoding/json"
"strings"
)
// Level is a well-known log level, as defined below
type Level int
// Well known log levels
const (
TraceLevel Level = iota
DebugLevel
InfoLevel
WarnLevel
ErrorLevel
FatalLevel
)
func (l Level) String() string {
switch l {
case TraceLevel:
return "TRACE"... | go | Apache-2.0 | e18d64933fdfad2710ad8a930e1f880c2714cb52 | 2026-01-07T08:37:03.915928Z | false |
binwiederhier/ntfy | https://github.com/binwiederhier/ntfy/blob/e18d64933fdfad2710ad8a930e1f880c2714cb52/log/log.go | log/log.go | package log
import (
"io"
"log"
"os"
"strings"
"sync"
"time"
)
// Defaults for package level variables
var (
DefaultLevel = InfoLevel
DefaultFormat = TextFormat
DefaultOutput = &peekLogWriter{os.Stderr}
)
var (
level = DefaultLevel
format = DefaultFormat
overrides = ... | go | Apache-2.0 | e18d64933fdfad2710ad8a930e1f880c2714cb52 | 2026-01-07T08:37:03.915928Z | false |
binwiederhier/ntfy | https://github.com/binwiederhier/ntfy/blob/e18d64933fdfad2710ad8a930e1f880c2714cb52/log/event.go | log/event.go | package log
import (
"encoding/json"
"fmt"
"heckel.io/ntfy/v2/util"
"log"
"os"
"sort"
"strings"
"time"
)
const (
fieldTag = "tag"
fieldError = "error"
fieldTimeTaken = "time_taken_ms"
fieldExitCode = "exit_code"
tagStdLog = "stdlog"
)
// Event represents a single log event
type Event str... | go | Apache-2.0 | e18d64933fdfad2710ad8a930e1f880c2714cb52 | 2026-01-07T08:37:03.915928Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/rules.go | rules.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/rules.go | pkg/rules.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/taskcommon/time.go | pkg/taskcommon/time.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/taskcommon/state.go | pkg/taskcommon/state.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/taskcommon/type.go | pkg/taskcommon/type.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/taskcommon/properties.go | pkg/taskcommon/properties.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/constant.go | pkg/util/constant.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/metricsinfo/metric_request.go | pkg/util/metricsinfo/metric_request.go | // Copyright (C) 2019-2020 Zilliz. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable l... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/metricsinfo/quota_metric.go | pkg/util/metricsinfo/quota_metric.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/metricsinfo/cache.go | pkg/util/metricsinfo/cache.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/metricsinfo/cache_test.go | pkg/util/metricsinfo/cache_test.go | // Copyright (C) 2019-2020 Zilliz. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable l... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/metricsinfo/utils.go | pkg/util/metricsinfo/utils.go | // Copyright (C) 2019-2020 Zilliz. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable l... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/metricsinfo/utils_test.go | pkg/util/metricsinfo/utils_test.go | // Copyright (C) 2019-2020 Zilliz. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable l... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/metricsinfo/topology_test.go | pkg/util/metricsinfo/topology_test.go | // Copyright (C) 2019-2020 Zilliz. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable l... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/metricsinfo/err.go | pkg/util/metricsinfo/err.go | // Copyright (C) 2019-2020 Zilliz. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable l... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/metricsinfo/metrics_info_test.go | pkg/util/metricsinfo/metrics_info_test.go | // Copyright (C) 2019-2020 Zilliz. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable l... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/metricsinfo/metrics_info.go | pkg/util/metricsinfo/metrics_info.go | // Copyright (C) 2019-2020 Zilliz. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable l... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/metricsinfo/metric_request_test.go | pkg/util/metricsinfo/metric_request_test.go | // Copyright (C) 2019-2020 Zilliz. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable l... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/metricsinfo/topology.go | pkg/util/metricsinfo/topology.go | // Copyright (C) 2019-2020 Zilliz. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable l... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/commonpbutil/commonpbutil.go | pkg/util/commonpbutil/commonpbutil.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/ratelimitutil/rate_collector.go | pkg/util/ratelimitutil/rate_collector.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/ratelimitutil/utils.go | pkg/util/ratelimitutil/utils.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/ratelimitutil/limiter.go | pkg/util/ratelimitutil/limiter.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/ratelimitutil/limiter_test.go | pkg/util/ratelimitutil/limiter_test.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/ratelimitutil/rate_collector_test.go | pkg/util/ratelimitutil/rate_collector_test.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/ratelimitutil/utils_test.go | pkg/util/ratelimitutil/utils_test.go | package ratelimitutil
import (
"testing"
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
)
func TestGetQuotaErrorString(t *testing.T) {
tests := []struct {
name string
args commonpb.ErrorCode
want string
}{
{
name: "Test ErrorCode_ForceDeny",
args: commonpb.ErrorCode_ForceDeny,
want: "acc... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/parameterutil/get_max_len_test.go | pkg/util/parameterutil/get_max_len_test.go | package parameterutil
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
"github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
"github.com/milvus-io/milvus/pkg/v2/common"
)
func TestGetMaxLength(t *testing.T) {
t.Run("not string type", func(t *testi... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/parameterutil/get_max_len.go | pkg/util/parameterutil/get_max_len.go | package parameterutil
import (
"fmt"
"strconv"
"github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
"github.com/milvus-io/milvus/pkg/v2/common"
"github.com/milvus-io/milvus/pkg/v2/util/merr"
"github.com/milvus-io/milvus/pkg/v2/util/typeutil"
)
// GetMaxLength get max length of field. Maybe also helpful outsi... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/distance/calc_distance_amd64.go | pkg/util/distance/calc_distance_amd64.go | package distance
import (
"math"
"golang.org/x/sys/cpu"
"github.com/milvus-io/milvus/pkg/v2/log"
"github.com/milvus-io/milvus/pkg/v2/util/distance/asm"
)
func init() {
if cpu.X86.HasAVX2 {
log.Info("Hook avx for go simd distance computation")
IPImpl = asm.IP
L2Impl = asm.L2
CosineImpl = func(a []float3... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/distance/calc_distance.go | pkg/util/distance/calc_distance.go | package distance
import (
"math"
"strings"
"sync"
"github.com/cockroachdb/errors"
)
/**
* Delete in #25663 Remove calc_distance
* Add back partially as clustering feature needs to calculate distance between search vector and clustering center
*/
const (
// L2 represents the Euclidean distance
L2 = "L2"
// ... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/distance/calc_distance_test.go | pkg/util/distance/calc_distance_test.go | package distance
import (
"math"
"math/rand"
"testing"
"time"
"github.com/stretchr/testify/assert"
)
const PRECISION = 1e-5
func TestValidateMetricType(t *testing.T) {
invalidMetric := []string{"", "aaa"}
for _, str := range invalidMetric {
_, err := ValidateMetricType(str)
assert.Error(t, err)
}
vali... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/distance/asm/ip_stub_amd64.go | pkg/util/distance/asm/ip_stub_amd64.go | // Code generated by command: go run ip.go -out ip_amd64.s -stubs ip_stub_amd64.go. DO NOT EDIT.
package asm
// inner product between x and y
func IP(x []float32, y []float32) float32
| go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/distance/asm/l2.go | pkg/util/distance/asm/l2.go | //go:build ignore
package main
import (
. "github.com/mmcloughlin/avo/build"
. "github.com/mmcloughlin/avo/operand"
. "github.com/mmcloughlin/avo/reg"
)
var unroll = 4
// inspired by the avo example https://github.com/mmcloughlin/avo
// avo is a tool to generate go assembly
func main() {
TEXT("L2", NOSPLIT, "fu... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/distance/asm/l2_stub_amd64.go | pkg/util/distance/asm/l2_stub_amd64.go | // Code generated by command: go run l2.go -out l2_amd64.s -stubs l2_stub_amd64.go. DO NOT EDIT.
package asm
// squared l2 between x and y
func L2(x []float32, y []float32) float32
| go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/distance/asm/ip.go | pkg/util/distance/asm/ip.go | //go:build ignore
package main
import (
. "github.com/mmcloughlin/avo/build"
. "github.com/mmcloughlin/avo/operand"
. "github.com/mmcloughlin/avo/reg"
)
var unroll = 4
// inspired by the avo example https://github.com/mmcloughlin/avo
// avo is a tool to generate go assembly
func main() {
TEXT("IP", NOSPLIT, "fu... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/vralloc/sharedalloc_test.go | pkg/util/vralloc/sharedalloc_test.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/vralloc/alloc_test.go | pkg/util/vralloc/alloc_test.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/vralloc/sharedalloc.go | pkg/util/vralloc/sharedalloc.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/vralloc/alloc.go | pkg/util/vralloc/alloc.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/metautil/segment_index.go | pkg/util/metautil/segment_index.go | package metautil
import (
"path"
"github.com/milvus-io/milvus/pkg/v2/common"
)
func BuildSegmentIndexFilePath(rootPath string, buildID, indexVersion, partID, segID int64, fileKey string) string {
k := JoinIDPath(buildID, indexVersion, partID, segID)
return path.Join(rootPath, common.SegmentIndexPath, k, fileKey)... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/metautil/binlog_test.go | pkg/util/metautil/binlog_test.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/metautil/channel.go | pkg/util/metautil/channel.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/metautil/channel_test.go | pkg/util/metautil/channel_test.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/metautil/binlog.go | pkg/util/metautil/binlog.go | package metautil
import (
"path"
"strconv"
"strings"
"github.com/milvus-io/milvus/pkg/v2/common"
"github.com/milvus-io/milvus/pkg/v2/proto/datapb"
"github.com/milvus-io/milvus/pkg/v2/util/typeutil"
)
const pathSep = "/"
func BuildInsertLogPath(rootPath string, collectionID, partitionID, segmentID, fieldID, lo... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/lifetime/safe_chan_test.go | pkg/util/lifetime/safe_chan_test.go | package lifetime
import (
"testing"
"github.com/stretchr/testify/suite"
"github.com/milvus-io/milvus/pkg/v2/util/typeutil"
)
type SafeChanSuite struct {
suite.Suite
}
func (s *SafeChanSuite) TestClose() {
sc := NewSafeChan()
s.False(sc.IsClosed(), "IsClosed() shall return false before Close()")
s.False(typ... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/lifetime/state.go | pkg/util/lifetime/state.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/lifetime/safe_chan.go | pkg/util/lifetime/safe_chan.go | package lifetime
import (
"sync"
"github.com/milvus-io/milvus/pkg/v2/util/typeutil"
)
// SafeChan is the utility type combining chan struct{} & sync.Once.
// It provides double close protection internally.
type SafeChan interface {
IsClosed() bool
CloseCh() <-chan struct{}
Close()
}
type safeChan struct {
clo... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/lifetime/lifetime_test.go | pkg/util/lifetime/lifetime_test.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/lifetime/lifetime.go | pkg/util/lifetime/lifetime.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/resource/resource_manager_test.go | pkg/util/resource/resource_manager_test.go | package resource
import (
"testing"
"time"
"github.com/cockroachdb/errors"
"github.com/stretchr/testify/assert"
)
func TestResourceManager(t *testing.T) {
{
manager := NewManager(0, 0, nil)
manager.Close()
}
manager := NewManager(500*time.Millisecond, 2*time.Second, map[string]time.Duration{
"test": ti... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/resource/resource_manager.go | pkg/util/resource/resource_manager.go | package resource
import (
"sync"
"time"
)
const (
NoExpiration time.Duration = -1
DefaultCheckInterval = 2 * time.Second
DefaultExpiration = 4 * time.Second
)
type Resource interface {
Type() string
Name() string
Get() any
Close()
// KeepAliveTime returns the time dur... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/generic/generic.go | pkg/util/generic/generic.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/paramtable/credential_param_test.go | pkg/util/paramtable/credential_param_test.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/paramtable/rbac_param.go | pkg/util/paramtable/rbac_param.go | package paramtable
import (
"strings"
"github.com/samber/lo"
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
"github.com/milvus-io/milvus/pkg/v2/util"
)
type rbacConfig struct {
Enabled ParamItem `refreshable:"false"`
ClusterRea... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/paramtable/role_param_test.go | pkg/util/paramtable/role_param_test.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/paramtable/component_param_test.go | pkg/util/paramtable/component_param_test.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | true |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/paramtable/role_param.go | pkg/util/paramtable/role_param.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/paramtable/rbac_config_test.go | pkg/util/paramtable/rbac_config_test.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/paramtable/function_param_test.go | pkg/util/paramtable/function_param_test.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/paramtable/function_param.go | pkg/util/paramtable/function_param.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/paramtable/autoindex_param.go | pkg/util/paramtable/autoindex_param.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/paramtable/http_param_test.go | pkg/util/paramtable/http_param_test.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/paramtable/cipher_config.go | pkg/util/paramtable/cipher_config.go | package paramtable
import (
"github.com/milvus-io/milvus/pkg/v2/log"
)
const cipherYamlFile = "hook.yaml"
type cipherConfig struct {
cipherBase *BaseTable
SoPathGo ParamItem `refreshable:"false"`
SoPathCpp ParamItem `refreshable:"false"`
DefaultRootKey ParamItem `refreshable:... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/paramtable/grpc_param_test.go | pkg/util/paramtable/grpc_param_test.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/paramtable/base_table.go | pkg/util/paramtable/base_table.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/paramtable/autoindex_param_test.go | pkg/util/paramtable/autoindex_param_test.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/paramtable/param_item.go | pkg/util/paramtable/param_item.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/paramtable/knowhere_param_test.go | pkg/util/paramtable/knowhere_param_test.go | package paramtable
import (
"encoding/json"
"testing"
"github.com/stretchr/testify/assert"
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
)
func TestKnowhereConfig_GetIndexParam(t *testing.T) {
bt := NewBaseTable(SkipRemote(true))
cfg := &knowhereConfig{}
cfg.init(bt)
// Set some initial config
in... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/paramtable/hook_config.go | pkg/util/paramtable/hook_config.go | package paramtable
import (
"go.uber.org/zap"
"github.com/milvus-io/milvus/pkg/v2/config"
"github.com/milvus-io/milvus/pkg/v2/log"
)
const hookYamlFile = "hook.yaml"
type hookConfig struct {
hookBase *BaseTable
SoPath ParamItem `refreshable:"false"`
SoConfig ParamGroup `refreshable:"true"`
}
func (h *hoo... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/paramtable/grpc_param.go | pkg/util/paramtable/grpc_param.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/paramtable/autoindex_param_nocuda.go | pkg/util/paramtable/autoindex_param_nocuda.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/paramtable/quota_param_test.go | pkg/util/paramtable/quota_param_test.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/paramtable/base_table_test.go | pkg/util/paramtable/base_table_test.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/paramtable/autoindex_param_cuda.go | pkg/util/paramtable/autoindex_param_cuda.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/paramtable/credential_param.go | pkg/util/paramtable/credential_param.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/paramtable/quota_param.go | pkg/util/paramtable/quota_param.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | true |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/paramtable/service_param.go | pkg/util/paramtable/service_param.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | true |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/paramtable/param_item_callback_test.go | pkg/util/paramtable/param_item_callback_test.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/paramtable/runtime.go | pkg/util/paramtable/runtime.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/paramtable/component_param.go | pkg/util/paramtable/component_param.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | true |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/paramtable/knowhere_param.go | pkg/util/paramtable/knowhere_param.go | package paramtable
import (
"fmt"
"strings"
"go.uber.org/zap"
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
"github.com/milvus-io/milvus/pkg/v2/common"
"github.com/milvus-io/milvus/pkg/v2/log"
"github.com/milvus-io/milvus/pkg/v2/util/hardware"
)
type knowhereConfig struct {
Enable ParamItem `r... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/paramtable/service_param_test.go | pkg/util/paramtable/service_param_test.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/paramtable/http_param.go | pkg/util/paramtable/http_param.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/cache/cache.go | pkg/util/cache/cache.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/cache/cache_test.go | pkg/util/cache/cache_test.go | package cache
import (
"context"
"sync"
"testing"
"time"
"github.com/cockroachdb/errors"
"github.com/stretchr/testify/assert"
"go.uber.org/atomic"
"github.com/milvus-io/milvus/pkg/v2/util/contextutil"
"github.com/milvus-io/milvus/pkg/v2/util/merr"
)
var errTimeout = errors.New("timeout")
func TestLRUCache... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/cache/monitor.go | pkg/util/cache/monitor.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/tikv/tikv_util.go | pkg/util/tikv/tikv_util.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/tikv/tikv_test_util.go | pkg/util/tikv/tikv_test_util.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/uniquegenerator/unique_int_generator_test.go | pkg/util/uniquegenerator/unique_int_generator_test.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/uniquegenerator/unique_int_generator.go | pkg/util/uniquegenerator/unique_int_generator.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/requestutil/getter.go | pkg/util/requestutil/getter.go | /*
* Licensed to the LF AI & Data foundation under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/requestutil/getter_test.go | pkg/util/requestutil/getter_test.go | /*
* Licensed to the LF AI & Data foundation under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/conc/singleflight_test.go | pkg/util/conc/singleflight_test.go | package conc
import (
"sync"
"testing"
"github.com/stretchr/testify/suite"
"go.uber.org/atomic"
)
type SingleflightSuite struct {
suite.Suite
}
func (s *SingleflightSuite) TestDo() {
counter, hasShared := atomic.Int32{}, atomic.Bool{}
sf := Singleflight[any]{}
ch := make(chan struct{})
var wg sync.WaitGro... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/conc/future.go | pkg/util/conc/future.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/conc/pool_test.go | pkg/util/conc/pool_test.go | // Licensed to the LF AI & Data foundation under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use th... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
milvus-io/milvus | https://github.com/milvus-io/milvus/blob/9d9fe2273adea818132bd2c5b9710bdecc8c8a85/pkg/util/conc/singleflight.go | pkg/util/conc/singleflight.go | package conc
import "golang.org/x/sync/singleflight"
// Singleflight wraps golang.org/x/sync/singleflight.Group into generic one.
type Singleflight[T any] struct {
internal singleflight.Group
}
// SingleflightResult is a generic Result wrapper for DoChan.
type SingleflightResult[T any] struct {
Val T
Err er... | go | Apache-2.0 | 9d9fe2273adea818132bd2c5b9710bdecc8c8a85 | 2026-01-07T08:35:46.736408Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.