launchcmd

package
v0.0.0-...-2b29d23 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: GPL-3.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PNameStorageStatus = ps.Name("storage-status")
View Source
var PNameValidateBlocks = ps.Name("validate-blocks")

Functions

This section is empty.

Types

type BaseCommand

type BaseCommand struct {
	Encoders    *encoder.Encoders `kong:"-"`
	JSONEncoder encoder.Encoder   `kong:"-"`
	Log         *zerolog.Logger   `kong:"-"`
}

type BaseNetworkClientCommand

type BaseNetworkClientCommand struct {
	BaseCommand
	BaseNetworkClientNodeInfoFlags
	Client   *isaacnetwork.BaseClient `kong:"-"`
	ClientID string                   `name:"client-id" help:"client id"`
}

func (*BaseNetworkClientCommand) Prepare

func (cmd *BaseNetworkClientCommand) Prepare(pctx context.Context) error

func (*BaseNetworkClientCommand) Print

func (cmd *BaseNetworkClientCommand) Print(v interface{}, out io.Writer) error

type BaseNetworkClientNodeInfoFlags

type BaseNetworkClientNodeInfoFlags struct {
	//revive:disable:line-length-limit
	NetworkID string              `arg:"" name:"network-id" help:"network-id"`
	Remote    launch.ConnInfoFlag `arg:"" help:"remote node conn info" placeholder:"ConnInfo"`
	Timeout   time.Duration       `help:"timeout" placeholder:"duration" default:"9s"`
}

type CancelHandoverCommand

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

func (*CancelHandoverCommand) Run

func (cmd *CancelHandoverCommand) Run(pctx context.Context) error

type CheckHandoverCommand

type CheckHandoverCommand struct {
	Node launch.AddressFlag `arg:"" name:"node" help:"node address"`
	// contains filtered or unexported fields
}

func (*CheckHandoverCommand) Run

func (cmd *CheckHandoverCommand) Run(pctx context.Context) error

type CleanCommand

type CleanCommand struct {
	launch.DesignFlag
	launch.PrivatekeyFlags

	launch.DevFlags `embed:"" prefix:"dev."`
	// contains filtered or unexported fields
}

func (*CleanCommand) Run

func (cmd *CleanCommand) Run(pctx context.Context) error

type DatabaseCommand

type DatabaseCommand struct {
	Extract DatabaseExtractCommand `cmd:"" help:"extract and print database(only leveldb supported)"`
}

type DatabaseExtractCommand

type DatabaseExtractCommand struct {
	// revive:disable:line-length-limit
	Storage  string   `arg:"" name:"storage" help:"storage base directory" type:"existingdir" default:"./"`
	Database string   `arg:"" name:"database" help:"database directory" type:"existingdir" default:"./db"`
	Count    bool     `name:"count" help:"count by prefix"`
	Label    []string `name:"label" help:"label"`
	Prefix   []string `name:"prefix" help:"prefix"`
	Limit    uint64   `name:"limit" help:"limit result"`
	Raw      bool     `name:"raw" help:"raw result"`
	Bytes    string   `name:"bytes" help:"bytes encoder" default:"hex"`
	// contains filtered or unexported fields
}

func (*DatabaseExtractCommand) Help

func (*DatabaseExtractCommand) Run

type DevCommands

type DevCommands struct {
	//revive:disable:line-length-limit
	GenerateBlocks GenerateBlocksCommand `cmd:"" name:"generate-blocks"`
}

type GenerateBlocksCommand

type GenerateBlocksCommand struct {
	GenesisDesign string `arg:"" name:"genesis design" help:"genesis design" type:"filepath"`
	launch.DesignFlag
	Height                  base.Height   `arg:""`
	SleepPerHeights         uint64        `name:"sleep-per-heights" help:"sleep per heights"`
	SleepDurationPerHeights time.Duration `name:"sleep-duration-per-heights" help:"duration for sleep per heights"`
	launch.PrivatekeyFlags
}

func (*GenerateBlocksCommand) Run

func (cmd *GenerateBlocksCommand) Run(pctx context.Context) error

type HandoverCommands

type HandoverCommands struct {
	//revive:disable:line-length-limit
	Start  StartHandoverCommand  `cmd:"" name:"start" help:"start handover"`
	Cancel CancelHandoverCommand `cmd:"" name:"cancel" help:"cancel handover"`
	Check  CheckHandoverCommand  `cmd:"" name:"check" help:"check current consensus node for handover"`
}

type INITCommand

type INITCommand struct {
	GenesisDesign string `arg:"" name:"genesis design" help:"genesis design" type:"filepath"`
	launch.PrivatekeyFlags
	launch.DesignFlag
	launch.DevFlags `embed:"" prefix:"dev."`
}

func (*INITCommand) Run

func (cmd *INITCommand) Run(pctx context.Context) error

type ImportCommand

type ImportCommand struct {
	// revive:disable:line-length-limit
	launch.DesignFlag
	Source      string           `arg:"" name:"source directory" help:"block data directory to import" type:"existingdir"`
	HeightRange launch.RangeFlag `name:"range" help:"<from>-<to>" default:""`
	launch.PrivatekeyFlags
	Do             bool   `name:"do" help:"really do import"`
	CacheDirectory string `name:"cache-directory" help:"directory for remote block item file"`

	launch.DevFlags `embed:"" prefix:"dev."`
	// contains filtered or unexported fields
}

func (*ImportCommand) Run

func (cmd *ImportCommand) Run(pctx context.Context) error

type KeyLoadCommand

type KeyLoadCommand struct {
	BaseCommand
	KeyString string `arg:"" name:"key string" help:"key string"`
}

func (*KeyLoadCommand) Run

func (cmd *KeyLoadCommand) Run(pctx context.Context) error

type KeyNewCommand

type KeyNewCommand struct {
	BaseCommand
	Seed string `arg:"" name:"seed" optional:"" help:"seed for generating key"`
}

func (*KeyNewCommand) Run

func (cmd *KeyNewCommand) Run(pctx context.Context) error

type KeySignCommand

type KeySignCommand struct {
	BaseCommand
	Privatekey string             `arg:"" name:"privatekey" help:"privatekey string"`
	NetworkID  string             `arg:"" name:"network-id" help:"network-id"`
	Body       *os.File           `arg:"" help:"body"`
	Node       launch.AddressFlag `help:"node address"`
	Token      string             `help:"set fact token"`
	// contains filtered or unexported fields
}

func (*KeySignCommand) Run

func (cmd *KeySignCommand) Run(pctx context.Context) error

type NetworkClientBlockItemFileCommand

type NetworkClientBlockItemFileCommand struct {
	BaseNetworkClientCommand
	Height   launch.HeightFlag  `arg:""`
	Item     base.BlockItemType `arg:"item" help:"item type"`
	Validate bool               `name:"validate" negatable:"" help:"validate by default" default:"true"`
}

func (*NetworkClientBlockItemFileCommand) Run

type NetworkClientBlockItemFilesCommand

type NetworkClientBlockItemFilesCommand struct {
	BaseNetworkClientCommand
	Privatekey         string            `arg:"" name:"privatekey" help:"privatekey string"`
	Height             launch.HeightFlag `arg:""`
	OutputDirectory    string            `arg:"" name:"output directory" default:""`
	DownloadRemoteItem bool              `name:"download-remote-item"`
	DownloadAllItems   bool              `name:"download-all-items"`
	// contains filtered or unexported fields
}

func (*NetworkClientBlockItemFilesCommand) Run

type NetworkClientCommand

type NetworkClientCommand struct {
	//revive:disable:line-length-limit
	//revive:disable:nested-structs
	NodeInfo       NetworkClientNodeInfoCommand       `cmd:"" name:"node-info" help:"remote node info"`
	SendOperation  NetworkClientSendOperationCommand  `cmd:"" name:"send-operation" help:"send operation"`
	State          NetworkClientStateCommand          `cmd:"" name:"state" help:"get state"`
	LastBlockMap   NetworkClientLastBlockMapCommand   `cmd:"" name:"last-blockmap" help:"get last blockmap"`
	BlockItemFiles NetworkClientBlockItemFilesCommand `cmd:"" name:"block-item-files" help:"download block item files"`
	BlockItemFile  NetworkClientBlockItemFileCommand  `cmd:"" name:"block-item-file" help:"download block item file"`
	Node           struct {
		Read  NetworkClientReadNodeCommand  `cmd:"" name:"read" help:"read node value"`
		Write NetworkClientWriteNodeCommand `cmd:"" name:"write" help:"write node value"`
	} `cmd:"" name:"node" help:""`
	Event NetworkClientEventLoggingCommand `cmd:"" name:"event" help:"event log"`
}

type NetworkClientEventLoggingCommand

type NetworkClientEventLoggingCommand struct {
	BaseNetworkClientCommand
	Privatekey string                 `arg:"" name:"privatekey" help:"privatekey string"`
	Logger     launch.EventLoggerName `arg:"" name:"logger" help:"logger name" default:""`
	Offsets    launch.RangeFlag       `name:"offsets" help:"offset, '<start-end>'"`
	Limit      uint64                 `name:"limit" help:"limit" default:"9"`
	Sort       bool                   `name:"sort" help:"sort, true means latest first"`
	// contains filtered or unexported fields
}

func (*NetworkClientEventLoggingCommand) Help

func (*NetworkClientEventLoggingCommand) Prepare

func (*NetworkClientEventLoggingCommand) Run

type NetworkClientLastBlockMapCommand

type NetworkClientLastBlockMapCommand struct {
	BaseNetworkClientCommand
	Hash string `arg:"" name:"manifest hash" help:"manifest hash" default:""`
}

func (*NetworkClientLastBlockMapCommand) Run

type NetworkClientNodeInfoCommand

type NetworkClientNodeInfoCommand struct {
	BaseNetworkClientCommand
}

func (*NetworkClientNodeInfoCommand) Run

type NetworkClientReadNodeCommand

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

func (*NetworkClientReadNodeCommand) Help

func (*NetworkClientReadNodeCommand) Prepare

func (cmd *NetworkClientReadNodeCommand) Prepare(pctx context.Context) error

func (*NetworkClientReadNodeCommand) Run

type NetworkClientSendOperationCommand

type NetworkClientSendOperationCommand struct {
	BaseNetworkClientCommand
	Input    string `arg:"" name:"input" help:"input; default is stdin" default:"-"`
	IsString bool   `name:"input.is-string" help:"input is string, not file"`
}

func (*NetworkClientSendOperationCommand) Run

type NetworkClientStateCommand

type NetworkClientStateCommand struct {
	BaseNetworkClientCommand
	Key  string `arg:"" name:"state key" help:"state key"`
	Hash string `arg:"" name:"state hash" help:"state hash" default:""`
}

func (*NetworkClientStateCommand) Run

type NetworkClientWriteNodeCommand

type NetworkClientWriteNodeCommand struct {
	Input  string `arg:"" name:"input" help:"input"`
	IsFile bool   `name:"input.is-file" help:"input is file"`
	// contains filtered or unexported fields
}

func (*NetworkClientWriteNodeCommand) Help

func (*NetworkClientWriteNodeCommand) Prepare

func (cmd *NetworkClientWriteNodeCommand) Prepare(pctx context.Context) error

func (*NetworkClientWriteNodeCommand) Run

type NetworkCommand

type NetworkCommand struct {
	Client NetworkClientCommand `cmd:"" help:"network client"`
}

type RunCommand

type RunCommand struct {
	//revive:disable:line-length-limit
	launch.DesignFlag
	launch.DevFlags `embed:"" prefix:"dev."`
	launch.PrivatekeyFlags
	Discovery []launch.ConnInfoFlag `help:"member discovery" placeholder:"connection info"`
	Hold      launch.HeightFlag     `help:"hold consensus states" placeholder:"height"`
	HTTPState string                `name:"http-state" help:"runtime statistics thru https" placeholder:"bind address"`
	launch.ACLFlags
	// contains filtered or unexported fields
}

func (*RunCommand) Run

func (cmd *RunCommand) Run(pctx context.Context) error

type StartHandoverCommand

type StartHandoverCommand struct {
	Node launch.AddressFlag  `arg:"" name:"node" help:"node address"`
	X    launch.ConnInfoFlag `arg:"" help:"current consensus node" placeholder:"ConnInfo"`
	// contains filtered or unexported fields
}

func (*StartHandoverCommand) Run

func (cmd *StartHandoverCommand) Run(pctx context.Context) error

type StorageCommand

type StorageCommand struct {
	Import         ImportCommand         `cmd:"" help:"import block data files"`
	Clean          CleanCommand          `cmd:"" help:"clean storage"`
	ValidateBlocks ValidateBlocksCommand `cmd:"" help:"validate blocks in storage"`
	Status         StorageStatusCommand  `cmd:"" help:"storage status"`
	Database       DatabaseCommand       `cmd:"" help:""`
}

type StorageStatusCommand

type StorageStatusCommand struct {
	launch.DesignFlag
	launch.PrivatekeyFlags

	launch.DevFlags `embed:"" prefix:"dev."`
	// contains filtered or unexported fields
}

func (*StorageStatusCommand) Run

func (cmd *StorageStatusCommand) Run(pctx context.Context) (err error)

type ValidateBlocksCommand

type ValidateBlocksCommand struct {
	launch.DesignFlag
	launch.PrivatekeyFlags
	HeightRange launch.RangeFlag `name:"range" help:"<from>-<to>" default:""`

	launch.DevFlags `embed:"" prefix:"dev."`
	// contains filtered or unexported fields
}

func (*ValidateBlocksCommand) Run

func (cmd *ValidateBlocksCommand) Run(pctx context.Context) error

Jump to

Keyboard shortcuts

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