importer

package
v0.0.0-...-f5df03c Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "import",
	Short: "Import objects into registry",
	Long:  "Import objects into registry from pregenerated files",
	Example: `xk6-registry import registry.bolt preset.json
xk6-registry import registry.bolt preset.json another_preset.json`,
	RunE: runCmd,
	Args: cobra.MinimumNArgs(2),
}

Cmd represents the import command.

Functions

func ImportJSONPreGen

func ImportJSONPreGen(o *registry.ObjRegistry, filename string) error

ImportJSONPreGen writes objects from pregenerated JSON file to the registry. Note that ImportJSONPreGen does not check if object already exists in the registry so in case of re-entry the registry will have two entities representing the same object.

Types

type PreGenObj

type PreGenObj struct {
	Bucket    string `json:"bucket"`
	Object    string `json:"object"`
	Container string `json:"container"`
}

type PreGenerateInfo

type PreGenerateInfo struct {
	Buckets    []string    `json:"buckets"`
	Containers []string    `json:"containers"`
	Objects    []PreGenObj `json:"objects"`
	ObjSize    string      `json:"obj_size"`
}

Jump to

Keyboard shortcuts

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