Documentation ¶
Index ¶
- Variables
- type CachePathOption
- type CacheTargetIndexOption
- type CloneStoreCmd
- type CompactOption
- type CompressionOption
- type Context
- type CpCmd
- type CreateVersionStoreIndexCmd
- type DownsyncCmd
- type DumpVersionAssetsCmd
- type EnableFileMappingOption
- type GetCmd
- type HashingOption
- type InitRemoteStoreCmd
- type LsCmd
- type MaxChunksPerBlockOption
- type MinBlockUsagePercentOption
- type MultiSourceUrisOption
- type MultiVersionLocalStoreIndexPathsOption
- type PackCmd
- type PrintStoreCmd
- type PrintVersionCmd
- type PrintVersionUsageCmd
- type PruneStoreBlocksCmd
- type PruneStoreCmd
- type PruneStoreIndexCmd
- type PutCmd
- type ReadStoreIndexAsyncResult
- type RetainPermissionsOption
- type S3EndpointResolverURLOption
- type ScanTargetOption
- type SourcePathExcludeRegExOption
- type SourcePathIncludeRegExOption
- type SourceUriOption
- type StorageURIOption
- type StoreIndexPathOption
- type TargetBlockSizeOption
- type TargetChunkSizeOption
- type TargetIndexUriOption
- type TargetPathExcludeRegExOption
- type TargetPathIncludeRegExOption
- type TargetPathOption
- type UnpackCmd
- type UpsyncCmd
- type UseLegacyWriteOption
- type ValidateTargetOption
- type ValidateVersionCmd
- type VersionCmd
- type VersionIndexPathOption
- type VersionLocalStoreIndexPathOption
Constants ¶
This section is empty.
Variables ¶
View Source
var (
BuildVersion string = "<dev>"
)
View Source
var Cli struct { LogLevel string `name:"log-level" help:"Log level [debug, info, warn, error]" enum:"debug, info, warn, error" default:"warn" ` ShowStats bool `name:"show-stats" help:"Output brief stats summary"` ShowStoreStats bool `name:"show-store-stats" help:"Output detailed stats for block stores"` MemTrace bool `name:"mem-trace" help:"Output summary memory statistics from longtail"` MemTraceDetailed bool `name:"mem-trace-detailed" help:"Output detailed memory statistics from longtail"` MemTraceCSV string `name:"mem-trace-csv" help:"Output path for detailed memory statistics from longtail in csv format"` WorkerCount int `` /* 137-byte string literal not displayed */ LogToConsole bool `name:"log-to-console" help:"Enable logging to console" default:"true" negatable:""` LogFilePath string `name:"log-file-path" help:"Path to log file for json formatted logging"` LogColoring bool `name:"log-coloring" help:"Use colored logging for stdout"` LogConsoleTimestamp bool `name:"log-console-timestamp" help:"Add timestamps to stdout logging"` Upsync UpsyncCmd `cmd:"" name:"upsync" help:"Upload a folder"` Downsync DownsyncCmd `cmd:"" name:"downsync" help:"Download a folder"` Get GetCmd `cmd:"" name:"get" help:"Download a folder using a get-config"` ValidateVersion ValidateVersionCmd `` /* 152-byte string literal not displayed */ PrintVersion PrintVersionCmd `cmd:"" name:"print-version" help:"Print info about a version index" aliases:"printVersionIndex"` PrintStore PrintStoreCmd `cmd:"" name:"print-store" help:"Print info about a store index" aliases:"printStoreIndex"` PrintVersionUsage PrintVersionUsageCmd `` /* 126-byte string literal not displayed */ DumpVersionAssets DumpVersionAssetsCmd `cmd:"" name:"dump-version-assets" help:"Lists all the asset paths inside a version index" aliases:"dump"` Ls LsCmd `cmd:"" name:"ls" help:"List the content of a path inside a version index"` Cp CpCmd `cmd:"" name:"cp" help:"Copies a file from inside a version index"` InitRemoteStore InitRemoteStoreCmd `cmd:"" name:"init-remote-store" help:"Open/create a remote store and force rebuild the store index" aliases:"init"` CreateVersionStoreIndex CreateVersionStoreIndexCmd `` /* 132-byte string literal not displayed */ CloneStore CloneStoreCmd `` /* 138-byte string literal not displayed */ PruneStore PruneStoreCmd `` /* 221-byte string literal not displayed */ PruneStoreIndex PruneStoreIndexCmd `` /* 212-byte string literal not displayed */ PruneStoreBlocks PruneStoreBlocksCmd `` /* 198-byte string literal not displayed */ Version VersionCmd `cmd:"" name:"version" help:"Show version number"` Pack PackCmd `cmd:"" name:"pack" help:"Pack a source to an archive"` Unpack UnpackCmd `cmd:"" name:"unpack" help:"Unpack an archive"` Put PutCmd `cmd:"" name:"put" help:"Upload a folder"` }
Cli ...
Functions ¶
This section is empty.
Types ¶
type CachePathOption ¶
type CachePathOption struct {
CachePath string `name:"cache-path" help:"Location for cached blocks"`
}
type CacheTargetIndexOption ¶
type CacheTargetIndexOption struct {
CacheTargetIndex bool `` /* 161-byte string literal not displayed */
}
type CloneStoreCmd ¶
type CloneStoreCmd struct { SourceStorageURI string `name:"source-storage-uri" help:"Source storage URI (local file system, GCS and S3 bucket URI supported)" required:""` SourceS3EndpointResolverURL string `name:"source-s3-endpoint-resolver-uri" help"Optional URI for source S3 endpoint resolver"` TargetStorageURI string `name:"target-storage-uri" help:"Target storage URI (local file system, GCS and S3 bucket URI supported)" required:""` TargetS3EndpointResolverURL string `name:"target-s3-endpoint-resolver-uri" help"Optional URI for target S3 endpoint resolver"` TargetPath string `name:"target-path" help:"Target folder path" required:""` SourcePaths string `name:"source-paths" help:"File containing list of source longtail uris" required:""` SourceZipPaths string `name:"source-zip-paths" help:"File containing list of source zip uris"` TargetPaths string `name:"target-paths" help:"File containing list of target longtail uris" required:""` CreateVersionLocalStoreIndex bool `name:"create-version-local-store-index" help:"Generate an store index optimized for the versions"` SkipValidate bool `name"skip-validate" help:"Skip validation of already cloned versions"` CachePathOption RetainPermissionsOption MaxChunksPerBlockOption TargetBlockSizeOption HashingOption CompressionOption MinBlockUsagePercentOption EnableFileMappingOption UseLegacyWriteOption }
func (*CloneStoreCmd) Run ¶
func (r *CloneStoreCmd) Run(ctx *Context) error
type CompactOption ¶
type CompactOption struct {
Compact bool `name:"compact" help:"Show info in compact layout"`
}
type CompressionOption ¶
type CompressionOption struct {
Compression string `` /* 329-byte string literal not displayed */
}
type Context ¶
type Context struct { NumWorkerCount int StoreStats []longtailutils.StoreStat TimeStats []longtailutils.TimeStat }
type CpCmd ¶
type CpCmd struct { StorageURIOption S3EndpointResolverURLOption VersionIndexPathOption CachePathOption SourcePath string `name:"source path" arg:"" help:"Source path inside the version index to copy"` TargetPath string `name:"target path" arg:"" help:"Target uri path"` EnableFileMappingOption }
type CreateVersionStoreIndexCmd ¶
type CreateVersionStoreIndexCmd struct { StorageURIOption S3EndpointResolverURLOption SourceUriOption VersionLocalStoreIndexPathOption }
func (*CreateVersionStoreIndexCmd) Run ¶
func (r *CreateVersionStoreIndexCmd) Run(ctx *Context) error
type DownsyncCmd ¶
type DownsyncCmd struct { StorageURIOption S3EndpointResolverURLOption SourceUriOption MultiSourceUrisOption TargetPathOption TargetIndexUriOption CachePathOption RetainPermissionsOption ValidateTargetOption VersionLocalStoreIndexPathOption MultiVersionLocalStoreIndexPathsOption TargetPathIncludeRegExOption TargetPathExcludeRegExOption ScanTargetOption CacheTargetIndexOption EnableFileMappingOption UseLegacyWriteOption }
func (*DownsyncCmd) Run ¶
func (r *DownsyncCmd) Run(ctx *Context) error
type DumpVersionAssetsCmd ¶
type DumpVersionAssetsCmd struct { VersionIndexPathOption S3EndpointResolverURLOption Details bool `name:"details" help:"Show details about assets"` }
func (*DumpVersionAssetsCmd) Run ¶
func (r *DumpVersionAssetsCmd) Run(ctx *Context) error
type EnableFileMappingOption ¶
type EnableFileMappingOption struct {
EnableFileMapping bool `name:"enable-file-mapping" help:"Enabled memory mapped file for file reads"`
}
type GetCmd ¶
type GetCmd struct { GetConfigURI string `name:"source-path" help:"File uri(s) for json formatted get-config file" xor:"source-path,source-paths" required:""` GetConfigURIs []string `name:"source-paths" help:"File uri(s) for json formatted get-config file" xor:"source-path,source-paths" required:"" sep:"|"` S3EndpointResolverURLOption TargetPathOption TargetIndexUriOption ValidateTargetOption VersionLocalStoreIndexPathOption CachePathOption RetainPermissionsOption TargetPathIncludeRegExOption TargetPathExcludeRegExOption ScanTargetOption CacheTargetIndexOption EnableFileMappingOption UseLegacyWriteOption }
type HashingOption ¶
type HashingOption struct {
Hashing string `name:"hash-algorithm" help:"Hash algorithm [meow blake2 blake3]" enum:"meow,blake2,blake3" default:"blake3"`
}
type InitRemoteStoreCmd ¶
type InitRemoteStoreCmd struct { StorageURIOption S3EndpointResolverURLOption HashingOption }
func (*InitRemoteStoreCmd) Run ¶
func (r *InitRemoteStoreCmd) Run(ctx *Context) error
type LsCmd ¶
type LsCmd struct { VersionIndexPathOption S3EndpointResolverURLOption Path string `name:"path" arg:"" optional:"" help:"Path inside the version index to list"` }
type MaxChunksPerBlockOption ¶
type MaxChunksPerBlockOption struct {
MaxChunksPerBlock uint32 `name:"max-chunks-per-block" help:"Max chunks per block" default:"1024"`
}
type MinBlockUsagePercentOption ¶
type MinBlockUsagePercentOption struct {
MinBlockUsagePercent uint32 `` /* 272-byte string literal not displayed */
}
type MultiSourceUrisOption ¶
type MultiSourceUrisOption struct {
SourcePaths []string `name:"source-paths" help:"Source file uri(s)" xor:"source-path,source-paths" required:"" sep:"|"`
}
type MultiVersionLocalStoreIndexPathsOption ¶
type MultiVersionLocalStoreIndexPathsOption struct {
VersionLocalStoreIndexPaths []string `` /* 258-byte string literal not displayed */
}
type PackCmd ¶
type PackCmd struct { SourcePath string `name:"source-path" help:"Source folder path" required:""` SourceIndexPath string `name:"source-index-path" help:"Optional pre-computed index of source-path"` TargetPath string `name:"target-path" help:"Target file uri"` TargetChunkSizeOption MaxChunksPerBlockOption TargetBlockSizeOption CompressionOption HashingOption SourcePathIncludeRegExOption SourcePathExcludeRegExOption EnableFileMappingOption }
type PrintStoreCmd ¶
type PrintStoreCmd struct { StoreIndexPathOption S3EndpointResolverURLOption CompactOption Details bool `name:"details" help:"Show details about data sizes"` }
func (*PrintStoreCmd) Run ¶
func (r *PrintStoreCmd) Run(ctx *Context) error
type PrintVersionCmd ¶
type PrintVersionCmd struct { VersionIndexPathOption S3EndpointResolverURLOption CompactOption }
func (*PrintVersionCmd) Run ¶
func (r *PrintVersionCmd) Run(ctx *Context) error
type PrintVersionUsageCmd ¶
type PrintVersionUsageCmd struct { StorageURIOption S3EndpointResolverURLOption VersionIndexPathOption CachePathOption }
func (*PrintVersionUsageCmd) Run ¶
func (r *PrintVersionUsageCmd) Run(ctx *Context) error
type PruneStoreBlocksCmd ¶
type PruneStoreBlocksCmd struct { StoreIndexPathOption S3EndpointResolverURLOption BlocksRootPath string `name:"blocks-root-path" help:"Root path uri for all blocks to check" required:""` BlockExtension string `name:"block-extension" help:"The file extension to use when finding blocks" default:".lsb"` DryRun bool `name:"dry-run" help:"Don't prune, just show how many blocks would be deleted if prune was run"` }
func (*PruneStoreBlocksCmd) Run ¶
func (r *PruneStoreBlocksCmd) Run(ctx *Context) error
type PruneStoreCmd ¶
type PruneStoreCmd struct { StorageURIOption S3EndpointResolverURLOption SourcePaths string `name:"source-paths" help:"File containing list of source longtail uris" required:""` VersionLocalStoreIndexPaths string `name:"version-local-store-index-paths" help:"File containing list of version local store index longtail uris"` DryRun bool `name:"dry-run" help:"Don't prune, just show how many blocks would be kept if prune was run"` WriteVersionLocalStoreIndex bool `` /* 171-byte string literal not displayed */ ValidateVersions bool `name:"validate-versions" help:"Verify that all content needed for a version is available in the store"` SkipInvalidVersions bool `` /* 170-byte string literal not displayed */ }
func (*PruneStoreCmd) Run ¶
func (r *PruneStoreCmd) Run(ctx *Context) error
type PruneStoreIndexCmd ¶
type PruneStoreIndexCmd struct { StoreIndexPathOption S3EndpointResolverURLOption SourcePaths string `name:"source-paths" help:"File containing list of source longtail uris" required:""` VersionLocalStoreIndexPaths string `name:"version-local-store-index-paths" help:"File containing list of version local store index longtail uris"` DryRun bool `name:"dry-run" help:"Don't prune, just show how many blocks would be kept if prune was run"` WriteVersionLocalStoreIndex bool `` /* 171-byte string literal not displayed */ ValidateVersions bool `name:"validate-versions" help:"Verify that all content needed for a version is available in the store"` SkipInvalidVersions bool `` /* 170-byte string literal not displayed */ }
func (*PruneStoreIndexCmd) Run ¶
func (r *PruneStoreIndexCmd) Run(ctx *Context) error
type PutCmd ¶
type PutCmd struct { GetConfigURI string `name:"target-path" help:"File uri for json formatted get-config file" required:""` TargetFileIndexPath string `name:"target-version-index-path" help:"Target version index file uri"` VersionLocalStoreIndexPath string `name:"version-local-store-index-path" help:"Target file uri for a store index optimized for this particular version"` OptionalStorageURI string `name:"storage-uri" help"Storage URI (local file system, GCS and S3 bucket URI supported)"` S3EndpointResolverURLOption SourcePath string `name:"source-path" help:"Source folder path" required:""` SourceIndexPath string `name:"source-index-path" help:"Optional pre-computed index of source-path"` DisableVersionLocalStoreIndex bool `name:"no-version-local-store-index" help:"Disable saving of store index optimized for this particular version"` TargetChunkSizeOption TargetBlockSizeOption MaxChunksPerBlockOption CompressionOption HashingOption SourcePathIncludeRegExOption SourcePathExcludeRegExOption MinBlockUsagePercentOption EnableFileMappingOption }
type ReadStoreIndexAsyncResult ¶
type ReadStoreIndexAsyncResult struct {
// contains filtered or unexported fields
}
type RetainPermissionsOption ¶
type RetainPermissionsOption struct {
RetainPermissions bool `name:"retain-permissions" negatable:"" help:"Set permission on file/directories from source" default:"true"`
}
type S3EndpointResolverURLOption ¶
type S3EndpointResolverURLOption struct {
S3EndpointResolverURL string `name:"s3-endpoint-resolver-uri" help:"Optional URI for S3 endpoint resolver"`
}
type ScanTargetOption ¶
type ScanTargetOption struct {
ScanTarget bool `` /* 150-byte string literal not displayed */
}
type SourcePathExcludeRegExOption ¶
type SourcePathExcludeRegExOption struct {
ExcludeFilterRegEx string `` /* 128-byte string literal not displayed */
}
type SourcePathIncludeRegExOption ¶
type SourcePathIncludeRegExOption struct {
IncludeFilterRegEx string `name:"include-filter-regex" help:"Optional include regex filter for assets in --source-path. Separate regexes with **"`
}
type SourceUriOption ¶
type SourceUriOption struct {
SourcePath string `name:"source-path" help:"Source file uri" xor:"source-path,source-paths" required:""`
}
type StorageURIOption ¶
type StorageURIOption struct {
StorageURI string `name:"storage-uri" help:"Storage URI (local file system, GCS and S3 bucket URI supported)" required:""`
}
type StoreIndexPathOption ¶
type StoreIndexPathOption struct {
StoreIndexPath string `name:"store-index-path" required:"" help:"URI to store index (local file system, GCS and S3 bucket URI supported)"`
}
type TargetBlockSizeOption ¶
type TargetBlockSizeOption struct {
TargetBlockSize uint32 `name:"target-block-size" help:"Target block size" default:"8388608"`
}
type TargetChunkSizeOption ¶
type TargetChunkSizeOption struct {
TargetChunkSize uint32 `name:"target-chunk-size" help:"Target chunk size" default:"32768"`
}
type TargetIndexUriOption ¶
type TargetIndexUriOption struct {
TargetIndexPath string `name:"target-index-path" help:"Optional pre-computed index of target-path"`
}
type TargetPathExcludeRegExOption ¶
type TargetPathExcludeRegExOption struct {
ExcludeFilterRegEx string `` /* 130-byte string literal not displayed */
}
type TargetPathIncludeRegExOption ¶
type TargetPathIncludeRegExOption struct {
IncludeFilterRegEx string `` /* 130-byte string literal not displayed */
}
type TargetPathOption ¶
type TargetPathOption struct {
TargetPath string `name:"target-path" help:"Target folder path"`
}
type UnpackCmd ¶
type UnpackCmd struct { SourcePath string `name:"source-path" help:"Source folder path" required:""` TargetPath string `name:"target-path" help:"Target file uri"` TargetIndexPath string `name:"target-index-path" help:"Optional pre-computed index of target-path"` RetainPermissionsOption ValidateTargetOption TargetPathIncludeRegExOption TargetPathExcludeRegExOption ScanTargetOption CacheTargetIndexOption EnableFileMappingOption UseLegacyWriteOption }
type UpsyncCmd ¶
type UpsyncCmd struct { SourcePath string `name:"source-path" help:"Source folder path" required:""` SourceIndexPath string `name:"source-index-path" help:"Optional pre-computed index of source-path"` TargetPath string `name:"target-path" help:"Target file uri" required:""` VersionLocalStoreIndexPath string `name:"version-local-store-index-path" help:"Target file uri for a store index optimized for this particular version"` TargetChunkSizeOption MaxChunksPerBlockOption TargetBlockSizeOption MinBlockUsagePercentOption StorageURIOption S3EndpointResolverURLOption CompressionOption HashingOption SourcePathIncludeRegExOption SourcePathExcludeRegExOption EnableFileMappingOption }
type UseLegacyWriteOption ¶
type UseLegacyWriteOption struct {
UseLegacyWrite bool `name:"use-legacy-write" help:"Uses legacy algorithm to update a version"`
}
type ValidateTargetOption ¶
type ValidateTargetOption struct {
Validate bool `name:"validate" help:"Validate target path once completed"`
}
type ValidateVersionCmd ¶
type ValidateVersionCmd struct { StorageURIOption S3EndpointResolverURLOption VersionIndexPathOption }
func (*ValidateVersionCmd) Run ¶
func (r *ValidateVersionCmd) Run(ctx *Context) error
type VersionCmd ¶
type VersionCmd struct { }
func (*VersionCmd) Run ¶
func (r *VersionCmd) Run(ctx *Context) error
type VersionIndexPathOption ¶
type VersionIndexPathOption struct {
VersionIndexPath string `name:"version-index-path" required:"" help:"URI to version index (local file system, GCS and S3 bucket URI supported)"`
}
type VersionLocalStoreIndexPathOption ¶
type VersionLocalStoreIndexPathOption struct {
VersionLocalStoreIndexPath string `` /* 244-byte string literal not displayed */
}
Source Files ¶
- cmd_clonestore.go
- cmd_cp.go
- cmd_createversionstoreindex.go
- cmd_downsync.go
- cmd_dumpversionassets.go
- cmd_get.go
- cmd_initremotestore.go
- cmd_ls.go
- cmd_pack.go
- cmd_printVersionUsage.go
- cmd_printstore.go
- cmd_printversion.go
- cmd_prunestore.go
- cmd_prunestore_blocks.go
- cmd_prunestore_index.go
- cmd_put.go
- cmd_unpack.go
- cmd_upsync.go
- cmd_validateversion.go
- cmd_version.go
- commands.go
- options.go
Click to show internal directories.
Click to hide internal directories.