mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 11:59:00 +08:00
47da9023a6
issue: #36323 Signed-off-by: chyezh <chyezh@outlook.com>
23 lines
337 B
Go
23 lines
337 B
Go
package cgo
|
|
|
|
func getDefaultOpt() *options {
|
|
return &options{
|
|
name: "unknown",
|
|
}
|
|
}
|
|
|
|
type options struct {
|
|
name string
|
|
}
|
|
|
|
// Opt is the option type for future.
|
|
type Opt func(*options)
|
|
|
|
// WithName sets the name of the future.
|
|
// Only used for metrics.
|
|
func WithName(name string) Opt {
|
|
return func(o *options) {
|
|
o.name = name
|
|
}
|
|
}
|