commands

package
v0.0.0-...-d869f00 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: Apache-2.0, MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const DAG_MAX = 3200000

Variables

View Source
var DaemonCmd = &cli.Command{
	Name:   "daemon",
	Usage:  "Start an indexer daemon, accepting http requests",
	Flags:  DaemonFlags,
	Action: daemonCommand,
}
View Source
var DaemonFlags = []cli.Flag{
	&cli.BoolFlag{
		Name:    "persistence",
		Usage:   "Enable persistence storage",
		Aliases: []string{"p"},
		EnvVars: []string{"ENABLE_PERSISTENCE"},
		Value:   true,
	},
	EndpointFlag,
}
View Source
var DirFlag = &cli.StringFlag{
	Name:     "dir",
	Usage:    "Source directory for import",
	Aliases:  []string{"d"},
	Required: true,
}
View Source
var EndpointFlag = altsrc.NewStringFlag(&cli.StringFlag{
	Name:     "endpoint",
	Usage:    "Node API endpoint",
	Aliases:  []string{"e"},
	EnvVars:  []string{"NODE_ENDPOINT"},
	Required: true,
})
View Source
var GetCmd = &cli.Command{
	Name:   "get",
	Usage:  "Get single Cid from idexer",
	Flags:  DaemonFlags,
	Action: getCidCmd,
}
View Source
var ImportCmd = &cli.Command{
	Name:  "import",
	Usage: "Imports data to indexer from different sources",
	Subcommands: []*cli.Command{
		importCidList,
		importCar,
		importManifest,
	},
}
View Source
var ImportFlags = []cli.Flag{
	&cli.StringFlag{
		Name:     "provider",
		Usage:    "Provider of the data imported",
		Aliases:  []string{"prov"},
		Required: true,
	},
	&cli.StringFlag{
		Name:     "piece",
		Usage:    "Piece ID where the CIDs are sealed at provider",
		Aliases:  []string{"pc"},
		Required: false,
	},
	DirFlag,
	EndpointFlag,
}
View Source
var MockCmd = &cli.Command{
	Name:  "mock",
	Usage: "Mock command for test purposes",

	Action: mockCommand,
}
View Source
var MockFlags []cli.Flag = []cli.Flag{
	altsrc.NewStringFlag(&cli.StringFlag{
		Name:    "mock",
		Usage:   "mocking flag to test flag operation",
		Aliases: []string{"mck"},
	}),
}
View Source
var SyntheticCmd = &cli.Command{
	Name:   "synthetic",
	Usage:  "Generate synthetic load to import in indexer",
	Flags:  SyntheticFlags,
	Action: syntheticCmd,
}
View Source
var SyntheticFlags = []cli.Flag{
	DirFlag,
	&cli.StringFlag{
		Name:     "type",
		Usage:    "Type of synthetic load to generate (manifest, cidlist, car)",
		Aliases:  []string{"t"},
		Required: true,
	},
	&cli.IntFlag{
		Name:     "num",
		Usage:    "Number of entries to generate",
		Aliases:  []string{"n"},
		Value:    1000,
		Required: false,
	},
}

Functions

func ProcessContext

func ProcessContext() context.Context

Types

This section is empty.

Jump to

Keyboard shortcuts

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