cmd

package
v0.1.23-oss Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ABFSCmdToCli

func ABFSCmdToCli(cmd ABFSCmd) cli.Command

func IsCacheLocked

func IsCacheLocked(cacheLockPath string) (bool, error)

func MountPoint

func MountPoint(path string) (string, error)

MountPoint finds the mount point for a given path by traversing upwards and comparing device IDs.

func Printf

func Printf(format string, a ...any)

func SetEmbedded

func SetEmbedded[T Provider](o any, newObj func() (T, error)) error

Types

type ABFSClientProvider

type ABFSClientProvider struct {
	ABFSClient *client.ABFSClient
	// contains filtered or unexported fields
}

func (*ABFSClientProvider) Close

func (p *ABFSClientProvider) Close() error

type ABFSCmd

type ABFSCmd interface {
	Spec() CmdSpec
	RegisterFlags(fl *pflag.FlagSet)
	Exec(ctx context.Context, fl *pflag.FlagSet) error
}

type CachemanProvider

type CachemanProvider struct {
	Cacheman *cachemanclient.Client
	// contains filtered or unexported fields
}

func (*CachemanProvider) Close

func (p *CachemanProvider) Close() error

type CliExec

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

func (*CliExec) Fatal

func (c *CliExec) Fatal(err error)

func (CliExec) RegisterFlags

func (c CliExec) RegisterFlags(fl *pflag.FlagSet)

func (*CliExec) Run

func (c *CliExec) Run(fl *pflag.FlagSet)

func (CliExec) Spec

func (c CliExec) Spec() cli.CommandSpec

func (CliExec) Subcommands

func (c CliExec) Subcommands() []cli.Command

type CmdSpec

type CmdSpec struct {

	// Name is the name of the command.
	// It should be the leaf name of the entire command. E.g `run` for the full
	// command `sail run`.
	Name string
	// Usage is the command's usage string.
	// E.g "[flags] <path>"
	Usage string
	// Desc is the description of the command.
	// The first line is used as an abbreviated description.
	Desc string
	// RawArgs indicates that flags should not be parsed, and they should be deferred
	// to the command.
	RawArgs bool
	// Hidden indicates that this command should not show up in it's parent's
	// subcommand help.
	Hidden bool
	// Aliases contains a list of alternative names that can be used for a particular command.
	Aliases []string

	// Extra fields:
	ProviderInjects []any

	Daemon bool

	Subcommands []ABFSCmd
}

type ConfigProvider

type ConfigProvider struct {
	Instance *instance.Instance
	Config   *instance.Config
}

func (*ConfigProvider) Close

func (p *ConfigProvider) Close() error

type InstanceResolver

type InstanceResolver interface {
	ResolveInstance() *instance.Instance
}

type MountClientProvider

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

func (*MountClientProvider) Client

func (p *MountClientProvider) Client(mountPoint string) (*binding.Client, error)

func (*MountClientProvider) Close

func (p *MountClientProvider) Close() error

type Provider

type Provider interface {
	Close() error
}

type StoreProvider

type StoreProvider struct {
	Store entities.CASStore
	// contains filtered or unexported fields
}

func (*StoreProvider) Close

func (p *StoreProvider) Close() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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