utils

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxNameLength = 128
)
View Source
const (
	NotSupportVersionMsg = "milvus version doesn't support backup tool. Lowest support version is 2.2.0"
)
View Source
const (
	PARAMS = "params"
)

Variables

This section is empty.

Functions

func ArrayToMap

func ArrayToMap(strs []int64) map[int64]bool

func Base64MsgPosition

func Base64MsgPosition(position *msgpb.MsgPosition) string

func ComposeTS

func ComposeTS(physical, logical int64) uint64

ComposeTS returns a timestamp composed of physical part and logical part

func GetCreateDBCollections

func GetCreateDBCollections(request *backuppb.CreateBackupRequest) string

func GetRestoreDBCollections

func GetRestoreDBCollections(request *backuppb.RestoreBackupRequest) string

func IsSupportVersion

func IsSupportVersion(versionStr string) (bool, error)

func KVPairToMap

func KVPairToMap(m []*backuppb.KeyValuePair) (map[string]string, error)

kvPairToMap largely copied from internal/proxy/task.go#parseIndexParams

func KvPairsMap

func KvPairsMap(kvps []*backuppb.KeyValuePair) map[string]string

KvPairsMap converts common.KeyValuePair slices into map

func MapKeyArray

func MapKeyArray(dict map[int64]bool) []int64

func MapToKVPair

func MapToKVPair(dict map[string]string) []*backuppb.KeyValuePair

func ParseTS

func ParseTS(ts uint64) (time.Time, uint64)

ParseTS returns a timestamp composed of physical part and logical part

func UUID

func UUID() string

func ValidateType

func ValidateType(entity, entityType string) error

func WrapDBCollections

func WrapDBCollections(dbCollections string) *structpb.Value

Types

type FlakeIdGenerator

type FlakeIdGenerator struct {
	// contains filtered or unexported fields
}

func NewFlakeIdGenerator

func NewFlakeIdGenerator() FlakeIdGenerator

func (FlakeIdGenerator) NextId

func (f FlakeIdGenerator) NextId() (int64, error)

type IdGenerator

type IdGenerator interface {
	NextId() (int64, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL