cmd

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const HTTPS = "https"

Variables

This section is empty.

Functions

func Execute

func Execute(projectVersion, projectBuild string)

Types

type CLI

type CLI struct {
	Globals

	Qdrant MigrateFromQdrantCmd `cmd:"" help:"Migrate data from a Qdrant database to Qdrant."`
}

type Globals

type Globals struct {
	Debug               bool             `help:"Enable debug mode."`
	Trace               bool             `help:"Enable trace mode."`
	SkipTlsVerification bool             `help:"Skip TLS verification."`
	Version             kong.VersionFlag `name:"version" help:"Print version information and quit"`
}

type MigrateFromQdrantCmd

type MigrateFromQdrantCmd struct {
	SourceUrl                      string `help:"Source GRPC URL, e.g. https://your-qdrant-hostname:6334" required:"true"`
	SourceCollection               string `help:"Source collection" required:"true"`
	SourceAPIKey                   string `help:"Source API key" env:"SOURCE_API_KEY"`
	TargetUrl                      string `help:"Target GRPC URL, e.g. https://your-qdrant-hostname:6334" required:"true"`
	TargetCollection               string `help:"Target collection" required:"true"`
	TargetAPIKey                   string `help:"Target API key" env:"TARGET_API_KEY"`
	BatchSize                      uint32 `short:"b" help:"Batch size" default:"50"`
	CreateTargetCollection         bool   `short:"c" help:"Create the target collection if it does not exist" default:"false"`
	EnsurePayloadIndexes           bool   `help:"Ensure payload indexes are created" default:"true"`
	MigrationOffsetsCollectionName string `help:"Collection where the current migration offset should be stored" default:"_migration_offsets"`
	RestartMigration               bool   `help:"Restart the migration and do not continue from last offset" default:"false"`
	// contains filtered or unexported fields
}

func (*MigrateFromQdrantCmd) Parse

func (r *MigrateFromQdrantCmd) Parse() error

func (*MigrateFromQdrantCmd) Run

func (r *MigrateFromQdrantCmd) Run(globals *Globals) error

func (*MigrateFromQdrantCmd) StoreOffset added in v0.1.0

func (r *MigrateFromQdrantCmd) StoreOffset(ctx context.Context, sourceClient *qdrant.Client, sourceCollection string, offset *qdrant.PointId, offsetCount uint64) error

func (*MigrateFromQdrantCmd) Validate

func (r *MigrateFromQdrantCmd) Validate() error

func (*MigrateFromQdrantCmd) ValidateParsedValues added in v0.1.0

func (r *MigrateFromQdrantCmd) ValidateParsedValues() error

Jump to

Keyboard shortcuts

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