cli

package
v0.50.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const CLIVolumeIDAlias = "default"

CLIVolumeIDAlias is an alias applied to match the default CLI volume.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientArgs

type ClientArgs struct {
	// ListBucketsConf configures listing buckets.
	ListBucketsConf ListBucketsConf
	// BucketOpArgs are bucket operation arguments.
	BucketOpArgs bucket.BucketOpArgs
	// ObjectStoreOpReq configures object store operations.
	ObjectStoreOpReq api.ObjectStoreOpRequest
	// ApplyBucketConfigReq configures applying a bucket config.
	ApplyBucketConfigReq api.ApplyBucketConfigRequest
	// ApplyBucketConfigReqVolumeIDs is the list of volume IDs to apply to.
	ApplyBucketConfigReqVolumeIDs ucli.StringSlice
	// ListBucketsRequest configures listing buckets.
	ListBucketsReq volume.ListBucketsRequest
	// ListBucketsReqVolumeIDs is the list of volume IDs to list.
	ListBucketsReqVolumeIDs ucli.StringSlice
	// CbusConf is the controller-bus configuration.
	CbusConf cbus_cli.ClientArgs
	// BifrostConf is the controller-bus configuration.
	BifrostConf bifrost_cli.ClientArgs

	// DialAddr is the address to dial.
	DialAddr string

	// RemotePeerIdsCsv are the set of remote peer IDs to connect to.
	RemotePeerIdsCsv string

	// BlockDataFile is the path to the file to load/store for blocks.
	BlockDataFile string
	// ObjectStoreFile is the path used for object store ops.
	ObjectStoreFile string
	// GetBlockRef is the block reference to get.
	GetBlockRef string
	// ApplyBucketConfigFile is the path used for bucket config.
	ApplyBucketConfigFile string
	// contains filtered or unexported fields
}

ClientArgs contains the client arguments and functions.

func (*ClientArgs) BuildClient

func (a *ClientArgs) BuildClient() (api.HydraDaemonClient, error)

BuildClient builds the client or returns it if it has been set.

func (*ClientArgs) BuildCommands

func (a *ClientArgs) BuildCommands() []*ucli.Command

BuildCommands attaches the commands.

func (*ClientArgs) BuildFlags

func (a *ClientArgs) BuildFlags() []ucli.Flag

BuildFlags attaches the flags to a flag set.

func (*ClientArgs) BuildHydraCommand

func (a *ClientArgs) BuildHydraCommand() *ucli.Command

BuildHydraCommand returns the hydra sub-command set.

func (*ClientArgs) GetContext

func (a *ClientArgs) GetContext() context.Context

GetContext returns the context.

func (*ClientArgs) GetLogger

func (a *ClientArgs) GetLogger() *logrus.Entry

GetLogger returns the log entry

func (*ClientArgs) ParseRemotePeerIdsCsv

func (a *ClientArgs) ParseRemotePeerIdsCsv() []string

ParseRemotePeerIdsCsv parses the RemotePeerIdsCsv field.

func (*ClientArgs) RunApplyBucketConf

func (a *ClientArgs) RunApplyBucketConf(_ *cli.Context) error

RunApplyBucketConf runs applying a bucket configuration.

func (*ClientArgs) RunGetBlock

func (a *ClientArgs) RunGetBlock(_ *cli.Context) error

RunGetBlock runs getting a block from a bucket.

func (*ClientArgs) RunGetObject

func (a *ClientArgs) RunGetObject(_ *cli.Context) error

RunGetObject returns an object from the store.

func (*ClientArgs) RunListBuckets

func (a *ClientArgs) RunListBuckets(_ *cli.Context) error

RunListBuckets runs listing buckets.

func (*ClientArgs) RunListObjectKeys

func (a *ClientArgs) RunListObjectKeys(_ *cli.Context) error

RunListObjectKeys lists object keys in a store.

func (*ClientArgs) RunListVolumes

func (a *ClientArgs) RunListVolumes(_ *cli.Context) error

RunListVolumes runs listing volumes.

func (*ClientArgs) RunPutBlock

func (a *ClientArgs) RunPutBlock(_ *cli.Context) error

RunPutBlock runs putting a block into a bucket.

func (*ClientArgs) RunPutObject

func (a *ClientArgs) RunPutObject(_ *cli.Context) error

RunPutObject puts an object to the store.

func (*ClientArgs) RunRmBlock

func (a *ClientArgs) RunRmBlock(_ *cli.Context) error

RunRmBlock runs removing a block from a bucket.

func (*ClientArgs) RunRmObject

func (a *ClientArgs) RunRmObject(_ *cli.Context) error

RunRmObject removes an object from the store.

func (*ClientArgs) SetClient

func (a *ClientArgs) SetClient(client api.HydraDaemonClient)

SetClient sets the client instance.

func (*ClientArgs) SetContext

func (a *ClientArgs) SetContext(c context.Context)

SetContext sets the context.

func (*ClientArgs) SetLogger

func (a *ClientArgs) SetLogger(le *logrus.Entry)

SetLogger sets the root log entry.

type DaemonArgs

type DaemonArgs struct {
	// BadgerDBs contains a list of badger db paths (directories)
	// use a YAML configuration file if you want to adjust options.
	BadgerDBs cli.StringSlice
	// BoltDBs contains a list of bolt db paths (files)
	// use a YAML configuration file if you want to adjust options.
	BoltDBs        cli.StringSlice
	BoltDBVerbose  bool
	InmemDB        bool
	InmemDBVerbose bool
	RedisURL       string
}

DaemonArgs contains common flags for hydra daemons.

func (*DaemonArgs) ApplyToConfigSet

func (a *DaemonArgs) ApplyToConfigSet(confSet configset.ConfigSet, overwrite bool, baseVolCtrlConf *volume_controller.Config) error

ApplyToConfigSet applies the configured values to the configset.

baseVolCtrlConf can be nil

func (*DaemonArgs) BuildFlags

func (a *DaemonArgs) BuildFlags() []cli.Flag

BuildFlags attaches the flags to a flag set.

func (*DaemonArgs) BuildSingleVolume

func (a *DaemonArgs) BuildSingleVolume(id string, baseVolCtrlConf *volume_controller.Config) config.Config

BuildSingleVolume builds a single volume from the given flags.

id is optional and specifies a prefix to use for the volume.

baseVolCtrlConf can be nil

type ListBucketsConf

type ListBucketsConf = volume.ListBucketsRequest

ListBucketsConf is the list buckets request

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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