Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sharder ¶
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. |
Click to show internal directories.
Click to hide internal directories.