Documentation ¶
Index ¶
- Constants
- func ParseOptions(m map[string]string, s string)
- func ResolveMetadataCacheTTL(statCacheTTL, typeCacheTTL time.Duration, ttlInSeconds int64) (metadataCacheTTL time.Duration)
- func ResolveStatCacheMaxSizeMB(mountConfigStatCacheMaxSizeMB int64, flagStatCacheCapacity int) (statCacheMaxSizeMB uint64, err error)
- type ClientProtocol
Constants ¶
View Source
const ( HTTP1 ClientProtocol = "http1" HTTP2 ClientProtocol = "http2" // DefaultStatOrTypeCacheTTL is the default value used for // stat-cache-ttl or type-cache-ttl if they have not been set // by the user. DefaultStatOrTypeCacheTTL time.Duration = time.Minute // DefaultStatCacheCapacity is the default value for stat-cache-capacity. // This is equivalent of setting metadata-cache: stat-cache-max-size-mb. DefaultStatCacheCapacity = 20460 // DefaultStatCacheMaxSizeMB is the default for stat-cache-max-size-mb // and is to be used when neither stat-cache-max-size-mb nor // stat-cache-capacity is set. DefaultStatCacheMaxSizeMB = 32 // AverageSizeOfPositiveStatCacheEntry is the assumed size of each positive stat-cache-entry, // meant for two purposes. // 1. for conversion from stat-cache-capacity to stat-cache-max-size-mb. // 2. internal testing. AverageSizeOfPositiveStatCacheEntry uint64 = 1400 // AverageSizeOfNegativeStatCacheEntry is the assumed size of each negative stat-cache-entry, // meant for two purposes.. // 1. for conversion from stat-cache-capacity to stat-cache-max-size-mb. // 2. internal testing. AverageSizeOfNegativeStatCacheEntry uint64 = 240 )
Variables ¶
This section is empty.
Functions ¶
func ParseOptions ¶
ParseOptions parse an option string in the format accepted by mount(8) and generated for its external mount helpers.
It is assumed that option name and values do not contain commas, and that the first equals sign in an option is the name/value separator. There is no support for escaping.
For example, if the input is
user,foo=bar=baz,qux
then the following will be inserted into the map.
"user": "", "foo": "bar=baz", "qux": "",
Types ¶
type ClientProtocol ¶
type ClientProtocol string
func (ClientProtocol) IsValid ¶
func (cp ClientProtocol) IsValid() bool
Click to show internal directories.
Click to hide internal directories.