path

package module
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2023 License: Apache-2.0 Imports: 2 Imported by: 16

README

path

CircleCI

path provides support for working with paths and filenames, including cloud storage systems.

  • path/cloudpath: provides utility routines for working with paths across both local and distributed storage systems.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sharder

type Sharder interface {
	Assign(path string) (prefix, suffix string)
}

Sharder is the interface for assigning and managing pathnames to shards.

func NewSharder

func NewSharder(opts ...ShardingOption) Sharder

NewSharder returns an instance of Sharder according to the specified options. If no options are provided it will behave as if the option of WithSHA1PrefixLength(2) was used.

type ShardingOption

type ShardingOption func(o *shardingOptions)

ShardingOption represents an option to NewPathSharder.

func WithSHA1PrefixLength

func WithSHA1PrefixLength(v int) ShardingOption

WithSHA1PrefixLength requests that a SHA1 sharder with a prefix length of v is used. Assigned filenames will be of the form: sha1(path)[:v]/sha1(path)[v:]

Directories

Path Synopsis
Package cloudpath provides utility routines for working with paths across both local and distributed storage systems.
Package cloudpath provides utility routines for working with paths across both local and distributed storage systems.
Package gopkgpath provides support for obtaining and working with go package paths when go modules are used.
Package gopkgpath provides support for obtaining and working with go package paths when go modules are used.

Jump to

Keyboard shortcuts

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