id
int32 0
167k
| repo
stringlengths 5
54
| path
stringlengths 4
155
| func_name
stringlengths 1
118
| original_string
stringlengths 52
85.5k
| language
stringclasses 1
value | code
stringlengths 52
85.5k
| code_tokens
sequencelengths 21
1.41k
| docstring
stringlengths 6
2.61k
| docstring_tokens
sequencelengths 3
215
| sha
stringlengths 40
40
| url
stringlengths 85
252
|
---|---|---|---|---|---|---|---|---|---|---|---|
159,500 | keybase/client | go/kbfs/libkbfs/config_local.go | SetKeyManager | func (c *ConfigLocal) SetKeyManager(k KeyManager) {
c.lock.Lock()
defer c.lock.Unlock()
c.keyman = k
} | go | func (c *ConfigLocal) SetKeyManager(k KeyManager) {
c.lock.Lock()
defer c.lock.Unlock()
c.keyman = k
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetKeyManager",
"(",
"k",
"KeyManager",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"keyman",
"=",
"k",
"\n",
"}"
] | // SetKeyManager implements the Config interface for ConfigLocal. | [
"SetKeyManager",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L340-L344 |
159,501 | keybase/client | go/kbfs/libkbfs/config_local.go | keyGetter | func (c *ConfigLocal) keyGetter() blockKeyGetter {
c.lock.RLock()
defer c.lock.RUnlock()
return c.keyman
} | go | func (c *ConfigLocal) keyGetter() blockKeyGetter {
c.lock.RLock()
defer c.lock.RUnlock()
return c.keyman
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"keyGetter",
"(",
")",
"blockKeyGetter",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"keyman",
"\n",
"}"
] | // KeyGetter implements the Config interface for ConfigLocal. | [
"KeyGetter",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L347-L351 |
159,502 | keybase/client | go/kbfs/libkbfs/config_local.go | Reporter | func (c *ConfigLocal) Reporter() Reporter {
c.lock.RLock()
defer c.lock.RUnlock()
return c.rep
} | go | func (c *ConfigLocal) Reporter() Reporter {
c.lock.RLock()
defer c.lock.RUnlock()
return c.rep
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"Reporter",
"(",
")",
"Reporter",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"rep",
"\n",
"}"
] | // Reporter implements the Config interface for ConfigLocal. | [
"Reporter",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L354-L358 |
159,503 | keybase/client | go/kbfs/libkbfs/config_local.go | SetReporter | func (c *ConfigLocal) SetReporter(r Reporter) {
c.lock.Lock()
defer c.lock.Unlock()
c.rep = r
} | go | func (c *ConfigLocal) SetReporter(r Reporter) {
c.lock.Lock()
defer c.lock.Unlock()
c.rep = r
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetReporter",
"(",
"r",
"Reporter",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"rep",
"=",
"r",
"\n",
"}"
] | // SetReporter implements the Config interface for ConfigLocal. | [
"SetReporter",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L361-L365 |
159,504 | keybase/client | go/kbfs/libkbfs/config_local.go | KeyCache | func (c *ConfigLocal) KeyCache() KeyCache {
c.lock.RLock()
defer c.lock.RUnlock()
return c.kcache
} | go | func (c *ConfigLocal) KeyCache() KeyCache {
c.lock.RLock()
defer c.lock.RUnlock()
return c.kcache
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"KeyCache",
"(",
")",
"KeyCache",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"kcache",
"\n",
"}"
] | // KeyCache implements the Config interface for ConfigLocal. | [
"KeyCache",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L368-L372 |
159,505 | keybase/client | go/kbfs/libkbfs/config_local.go | SetKeyCache | func (c *ConfigLocal) SetKeyCache(k KeyCache) {
c.lock.Lock()
defer c.lock.Unlock()
c.kcache = k
} | go | func (c *ConfigLocal) SetKeyCache(k KeyCache) {
c.lock.Lock()
defer c.lock.Unlock()
c.kcache = k
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetKeyCache",
"(",
"k",
"KeyCache",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"kcache",
"=",
"k",
"\n",
"}"
] | // SetKeyCache implements the Config interface for ConfigLocal. | [
"SetKeyCache",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L375-L379 |
159,506 | keybase/client | go/kbfs/libkbfs/config_local.go | KeyBundleCache | func (c *ConfigLocal) KeyBundleCache() kbfsmd.KeyBundleCache {
c.lock.RLock()
defer c.lock.RUnlock()
return c.kbcache
} | go | func (c *ConfigLocal) KeyBundleCache() kbfsmd.KeyBundleCache {
c.lock.RLock()
defer c.lock.RUnlock()
return c.kbcache
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"KeyBundleCache",
"(",
")",
"kbfsmd",
".",
"KeyBundleCache",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"kbcache",
"\n",
"}"
] | // KeyBundleCache implements the Config interface for ConfigLocal. | [
"KeyBundleCache",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L382-L386 |
159,507 | keybase/client | go/kbfs/libkbfs/config_local.go | SetKeyBundleCache | func (c *ConfigLocal) SetKeyBundleCache(k kbfsmd.KeyBundleCache) {
c.lock.Lock()
defer c.lock.Unlock()
c.kbcache = k
} | go | func (c *ConfigLocal) SetKeyBundleCache(k kbfsmd.KeyBundleCache) {
c.lock.Lock()
defer c.lock.Unlock()
c.kbcache = k
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetKeyBundleCache",
"(",
"k",
"kbfsmd",
".",
"KeyBundleCache",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"kbcache",
"=",
"k",
"\n",
"}"
] | // SetKeyBundleCache implements the Config interface for ConfigLocal. | [
"SetKeyBundleCache",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L389-L393 |
159,508 | keybase/client | go/kbfs/libkbfs/config_local.go | BlockCache | func (c *ConfigLocal) BlockCache() data.BlockCache {
c.lock.RLock()
defer c.lock.RUnlock()
return c.bcache
} | go | func (c *ConfigLocal) BlockCache() data.BlockCache {
c.lock.RLock()
defer c.lock.RUnlock()
return c.bcache
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"BlockCache",
"(",
")",
"data",
".",
"BlockCache",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"bcache",
"\n",
"}"
] | // BlockCache implements the Config interface for ConfigLocal. | [
"BlockCache",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L396-L400 |
159,509 | keybase/client | go/kbfs/libkbfs/config_local.go | SetBlockCache | func (c *ConfigLocal) SetBlockCache(b data.BlockCache) {
c.lock.Lock()
defer c.lock.Unlock()
c.bcache = b
} | go | func (c *ConfigLocal) SetBlockCache(b data.BlockCache) {
c.lock.Lock()
defer c.lock.Unlock()
c.bcache = b
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetBlockCache",
"(",
"b",
"data",
".",
"BlockCache",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"bcache",
"=",
"b",
"\n",
"}"
] | // SetBlockCache implements the Config interface for ConfigLocal. | [
"SetBlockCache",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L403-L407 |
159,510 | keybase/client | go/kbfs/libkbfs/config_local.go | DirtyBlockCache | func (c *ConfigLocal) DirtyBlockCache() data.DirtyBlockCache {
c.lock.RLock()
defer c.lock.RUnlock()
return c.dirtyBcache
} | go | func (c *ConfigLocal) DirtyBlockCache() data.DirtyBlockCache {
c.lock.RLock()
defer c.lock.RUnlock()
return c.dirtyBcache
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"DirtyBlockCache",
"(",
")",
"data",
".",
"DirtyBlockCache",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"dirtyBcache",
"\n",
"}"
] | // DirtyBlockCache implements the Config interface for ConfigLocal. | [
"DirtyBlockCache",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L410-L414 |
159,511 | keybase/client | go/kbfs/libkbfs/config_local.go | SetDirtyBlockCache | func (c *ConfigLocal) SetDirtyBlockCache(d data.DirtyBlockCache) {
c.lock.Lock()
defer c.lock.Unlock()
c.dirtyBcache = d
} | go | func (c *ConfigLocal) SetDirtyBlockCache(d data.DirtyBlockCache) {
c.lock.Lock()
defer c.lock.Unlock()
c.dirtyBcache = d
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetDirtyBlockCache",
"(",
"d",
"data",
".",
"DirtyBlockCache",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"dirtyBcache",
"=",
"d",
"\n",
"}"
] | // SetDirtyBlockCache implements the Config interface for ConfigLocal. | [
"SetDirtyBlockCache",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L417-L421 |
159,512 | keybase/client | go/kbfs/libkbfs/config_local.go | DiskBlockCache | func (c *ConfigLocal) DiskBlockCache() DiskBlockCache {
c.lock.RLock()
defer c.lock.RUnlock()
return c.diskBlockCache
} | go | func (c *ConfigLocal) DiskBlockCache() DiskBlockCache {
c.lock.RLock()
defer c.lock.RUnlock()
return c.diskBlockCache
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"DiskBlockCache",
"(",
")",
"DiskBlockCache",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"diskBlockCache",
"\n",
"}"
] | // DiskBlockCache implements the Config interface for ConfigLocal. | [
"DiskBlockCache",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L424-L428 |
159,513 | keybase/client | go/kbfs/libkbfs/config_local.go | SetDiskBlockCacheFraction | func (c *ConfigLocal) SetDiskBlockCacheFraction(fraction float64) {
c.lock.Lock()
defer c.lock.Unlock()
c.diskBlockCacheFraction = fraction
} | go | func (c *ConfigLocal) SetDiskBlockCacheFraction(fraction float64) {
c.lock.Lock()
defer c.lock.Unlock()
c.diskBlockCacheFraction = fraction
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetDiskBlockCacheFraction",
"(",
"fraction",
"float64",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"diskBlockCacheFraction",
"=",
"fraction",
"\n",
"}"
] | // SetDiskBlockCacheFraction implements the Config interface for ConfigLocal. | [
"SetDiskBlockCacheFraction",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L431-L435 |
159,514 | keybase/client | go/kbfs/libkbfs/config_local.go | SetSyncBlockCacheFraction | func (c *ConfigLocal) SetSyncBlockCacheFraction(fraction float64) {
c.lock.Lock()
defer c.lock.Unlock()
c.syncBlockCacheFraction = fraction
} | go | func (c *ConfigLocal) SetSyncBlockCacheFraction(fraction float64) {
c.lock.Lock()
defer c.lock.Unlock()
c.syncBlockCacheFraction = fraction
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetSyncBlockCacheFraction",
"(",
"fraction",
"float64",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"syncBlockCacheFraction",
"=",
"fraction",
"\n",
"}"
] | // SetSyncBlockCacheFraction implements the Config interface for ConfigLocal. | [
"SetSyncBlockCacheFraction",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L438-L442 |
159,515 | keybase/client | go/kbfs/libkbfs/config_local.go | DiskMDCache | func (c *ConfigLocal) DiskMDCache() DiskMDCache {
c.lock.RLock()
defer c.lock.RUnlock()
return c.diskMDCache
} | go | func (c *ConfigLocal) DiskMDCache() DiskMDCache {
c.lock.RLock()
defer c.lock.RUnlock()
return c.diskMDCache
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"DiskMDCache",
"(",
")",
"DiskMDCache",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"diskMDCache",
"\n",
"}"
] | // DiskMDCache implements the Config interface for ConfigLocal. | [
"DiskMDCache",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L445-L449 |
159,516 | keybase/client | go/kbfs/libkbfs/config_local.go | DiskQuotaCache | func (c *ConfigLocal) DiskQuotaCache() DiskQuotaCache {
c.lock.RLock()
defer c.lock.RUnlock()
return c.diskQuotaCache
} | go | func (c *ConfigLocal) DiskQuotaCache() DiskQuotaCache {
c.lock.RLock()
defer c.lock.RUnlock()
return c.diskQuotaCache
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"DiskQuotaCache",
"(",
")",
"DiskQuotaCache",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"diskQuotaCache",
"\n",
"}"
] | // DiskQuotaCache implements the Config interface for ConfigLocal. | [
"DiskQuotaCache",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L452-L456 |
159,517 | keybase/client | go/kbfs/libkbfs/config_local.go | XattrStore | func (c *ConfigLocal) XattrStore() XattrStore {
c.lock.RLock()
defer c.lock.RUnlock()
return c.xattrStore
} | go | func (c *ConfigLocal) XattrStore() XattrStore {
c.lock.RLock()
defer c.lock.RUnlock()
return c.xattrStore
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"XattrStore",
"(",
")",
"XattrStore",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"xattrStore",
"\n",
"}"
] | // XattrStore implements the Config interface for ConfigLocal. | [
"XattrStore",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L459-L463 |
159,518 | keybase/client | go/kbfs/libkbfs/config_local.go | DiskLimiter | func (c *ConfigLocal) DiskLimiter() DiskLimiter {
c.lock.RLock()
defer c.lock.RUnlock()
return c.diskLimiter
} | go | func (c *ConfigLocal) DiskLimiter() DiskLimiter {
c.lock.RLock()
defer c.lock.RUnlock()
return c.diskLimiter
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"DiskLimiter",
"(",
")",
"DiskLimiter",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"diskLimiter",
"\n",
"}"
] | // DiskLimiter implements the Config interface for ConfigLocal. | [
"DiskLimiter",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L466-L470 |
159,519 | keybase/client | go/kbfs/libkbfs/config_local.go | Crypto | func (c *ConfigLocal) Crypto() Crypto {
c.lock.RLock()
defer c.lock.RUnlock()
return c.crypto
} | go | func (c *ConfigLocal) Crypto() Crypto {
c.lock.RLock()
defer c.lock.RUnlock()
return c.crypto
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"Crypto",
"(",
")",
"Crypto",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"crypto",
"\n",
"}"
] | // Crypto implements the Config interface for ConfigLocal. | [
"Crypto",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L473-L477 |
159,520 | keybase/client | go/kbfs/libkbfs/config_local.go | Chat | func (c *ConfigLocal) Chat() Chat {
c.lock.RLock()
defer c.lock.RUnlock()
return c.chat
} | go | func (c *ConfigLocal) Chat() Chat {
c.lock.RLock()
defer c.lock.RUnlock()
return c.chat
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"Chat",
"(",
")",
"Chat",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"chat",
"\n",
"}"
] | // Chat implements the Config interface for ConfigLocal. | [
"Chat",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L480-L484 |
159,521 | keybase/client | go/kbfs/libkbfs/config_local.go | Signer | func (c *ConfigLocal) Signer() kbfscrypto.Signer {
c.lock.RLock()
defer c.lock.RUnlock()
return c.crypto
} | go | func (c *ConfigLocal) Signer() kbfscrypto.Signer {
c.lock.RLock()
defer c.lock.RUnlock()
return c.crypto
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"Signer",
"(",
")",
"kbfscrypto",
".",
"Signer",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"crypto",
"\n",
"}"
] | // Signer implements the Config interface for ConfigLocal. | [
"Signer",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L487-L491 |
159,522 | keybase/client | go/kbfs/libkbfs/config_local.go | SetCrypto | func (c *ConfigLocal) SetCrypto(cr Crypto) {
c.lock.Lock()
defer c.lock.Unlock()
c.crypto = cr
} | go | func (c *ConfigLocal) SetCrypto(cr Crypto) {
c.lock.Lock()
defer c.lock.Unlock()
c.crypto = cr
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetCrypto",
"(",
"cr",
"Crypto",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"crypto",
"=",
"cr",
"\n",
"}"
] | // SetCrypto implements the Config interface for ConfigLocal. | [
"SetCrypto",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L494-L498 |
159,523 | keybase/client | go/kbfs/libkbfs/config_local.go | SetChat | func (c *ConfigLocal) SetChat(ch Chat) {
c.lock.Lock()
defer c.lock.Unlock()
c.chat = ch
} | go | func (c *ConfigLocal) SetChat(ch Chat) {
c.lock.Lock()
defer c.lock.Unlock()
c.chat = ch
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetChat",
"(",
"ch",
"Chat",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"chat",
"=",
"ch",
"\n",
"}"
] | // SetChat implements the Config interface for ConfigLocal. | [
"SetChat",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L501-L505 |
159,524 | keybase/client | go/kbfs/libkbfs/config_local.go | cryptoPure | func (c *ConfigLocal) cryptoPure() cryptoPure {
c.lock.RLock()
defer c.lock.RUnlock()
return c.crypto
} | go | func (c *ConfigLocal) cryptoPure() cryptoPure {
c.lock.RLock()
defer c.lock.RUnlock()
return c.crypto
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"cryptoPure",
"(",
")",
"cryptoPure",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"crypto",
"\n",
"}"
] | // CryptoPure implements the Config interface for ConfigLocal. | [
"CryptoPure",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L508-L512 |
159,525 | keybase/client | go/kbfs/libkbfs/config_local.go | Codec | func (c *ConfigLocal) Codec() kbfscodec.Codec {
c.lock.RLock()
defer c.lock.RUnlock()
return c.codec
} | go | func (c *ConfigLocal) Codec() kbfscodec.Codec {
c.lock.RLock()
defer c.lock.RUnlock()
return c.codec
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"Codec",
"(",
")",
"kbfscodec",
".",
"Codec",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"codec",
"\n",
"}"
] | // Codec implements the Config interface for ConfigLocal. | [
"Codec",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L515-L519 |
159,526 | keybase/client | go/kbfs/libkbfs/config_local.go | SetCodec | func (c *ConfigLocal) SetCodec(co kbfscodec.Codec) {
c.lock.Lock()
defer c.lock.Unlock()
c.codec = co
RegisterOps(c.codec)
} | go | func (c *ConfigLocal) SetCodec(co kbfscodec.Codec) {
c.lock.Lock()
defer c.lock.Unlock()
c.codec = co
RegisterOps(c.codec)
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetCodec",
"(",
"co",
"kbfscodec",
".",
"Codec",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"codec",
"=",
"co",
"\n",
"RegisterOps",
"(",
"c",
".",
"codec",
")",
"\n",
"}"
] | // SetCodec implements the Config interface for ConfigLocal. | [
"SetCodec",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L522-L527 |
159,527 | keybase/client | go/kbfs/libkbfs/config_local.go | MDOps | func (c *ConfigLocal) MDOps() MDOps {
c.lock.RLock()
defer c.lock.RUnlock()
return c.mdops
} | go | func (c *ConfigLocal) MDOps() MDOps {
c.lock.RLock()
defer c.lock.RUnlock()
return c.mdops
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"MDOps",
"(",
")",
"MDOps",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"mdops",
"\n",
"}"
] | // MDOps implements the Config interface for ConfigLocal. | [
"MDOps",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L530-L534 |
159,528 | keybase/client | go/kbfs/libkbfs/config_local.go | SetMDOps | func (c *ConfigLocal) SetMDOps(m MDOps) {
c.lock.Lock()
defer c.lock.Unlock()
c.mdops = m
} | go | func (c *ConfigLocal) SetMDOps(m MDOps) {
c.lock.Lock()
defer c.lock.Unlock()
c.mdops = m
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetMDOps",
"(",
"m",
"MDOps",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"mdops",
"=",
"m",
"\n",
"}"
] | // SetMDOps implements the Config interface for ConfigLocal. | [
"SetMDOps",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L537-L541 |
159,529 | keybase/client | go/kbfs/libkbfs/config_local.go | KeyOps | func (c *ConfigLocal) KeyOps() libkey.KeyOps {
c.lock.RLock()
defer c.lock.RUnlock()
return c.kops
} | go | func (c *ConfigLocal) KeyOps() libkey.KeyOps {
c.lock.RLock()
defer c.lock.RUnlock()
return c.kops
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"KeyOps",
"(",
")",
"libkey",
".",
"KeyOps",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"kops",
"\n",
"}"
] | // KeyOps implements the Config interface for ConfigLocal. | [
"KeyOps",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L544-L548 |
159,530 | keybase/client | go/kbfs/libkbfs/config_local.go | SetKeyOps | func (c *ConfigLocal) SetKeyOps(k libkey.KeyOps) {
c.lock.Lock()
defer c.lock.Unlock()
c.kops = k
} | go | func (c *ConfigLocal) SetKeyOps(k libkey.KeyOps) {
c.lock.Lock()
defer c.lock.Unlock()
c.kops = k
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetKeyOps",
"(",
"k",
"libkey",
".",
"KeyOps",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"kops",
"=",
"k",
"\n",
"}"
] | // SetKeyOps implements the Config interface for ConfigLocal. | [
"SetKeyOps",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L551-L555 |
159,531 | keybase/client | go/kbfs/libkbfs/config_local.go | MDCache | func (c *ConfigLocal) MDCache() MDCache {
c.lock.RLock()
defer c.lock.RUnlock()
return c.mdcache
} | go | func (c *ConfigLocal) MDCache() MDCache {
c.lock.RLock()
defer c.lock.RUnlock()
return c.mdcache
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"MDCache",
"(",
")",
"MDCache",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"mdcache",
"\n",
"}"
] | // MDCache implements the Config interface for ConfigLocal. | [
"MDCache",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L558-L562 |
159,532 | keybase/client | go/kbfs/libkbfs/config_local.go | SetMDCache | func (c *ConfigLocal) SetMDCache(m MDCache) {
c.lock.Lock()
defer c.lock.Unlock()
c.mdcache = m
} | go | func (c *ConfigLocal) SetMDCache(m MDCache) {
c.lock.Lock()
defer c.lock.Unlock()
c.mdcache = m
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetMDCache",
"(",
"m",
"MDCache",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"mdcache",
"=",
"m",
"\n",
"}"
] | // SetMDCache implements the Config interface for ConfigLocal. | [
"SetMDCache",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L565-L569 |
159,533 | keybase/client | go/kbfs/libkbfs/config_local.go | BlockOps | func (c *ConfigLocal) BlockOps() BlockOps {
c.lock.RLock()
defer c.lock.RUnlock()
return c.bops
} | go | func (c *ConfigLocal) BlockOps() BlockOps {
c.lock.RLock()
defer c.lock.RUnlock()
return c.bops
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"BlockOps",
"(",
")",
"BlockOps",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"bops",
"\n",
"}"
] | // BlockOps implements the Config interface for ConfigLocal. | [
"BlockOps",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L572-L576 |
159,534 | keybase/client | go/kbfs/libkbfs/config_local.go | SetBlockOps | func (c *ConfigLocal) SetBlockOps(b BlockOps) {
c.lock.Lock()
defer c.lock.Unlock()
c.bops = b
} | go | func (c *ConfigLocal) SetBlockOps(b BlockOps) {
c.lock.Lock()
defer c.lock.Unlock()
c.bops = b
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetBlockOps",
"(",
"b",
"BlockOps",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"bops",
"=",
"b",
"\n",
"}"
] | // SetBlockOps implements the Config interface for ConfigLocal. | [
"SetBlockOps",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L579-L583 |
159,535 | keybase/client | go/kbfs/libkbfs/config_local.go | MDServer | func (c *ConfigLocal) MDServer() MDServer {
c.lock.RLock()
defer c.lock.RUnlock()
return c.mdserv
} | go | func (c *ConfigLocal) MDServer() MDServer {
c.lock.RLock()
defer c.lock.RUnlock()
return c.mdserv
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"MDServer",
"(",
")",
"MDServer",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"mdserv",
"\n",
"}"
] | // MDServer implements the Config interface for ConfigLocal. | [
"MDServer",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L586-L590 |
159,536 | keybase/client | go/kbfs/libkbfs/config_local.go | SetMDServer | func (c *ConfigLocal) SetMDServer(m MDServer) {
c.lock.Lock()
defer c.lock.Unlock()
c.mdserv = m
} | go | func (c *ConfigLocal) SetMDServer(m MDServer) {
c.lock.Lock()
defer c.lock.Unlock()
c.mdserv = m
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetMDServer",
"(",
"m",
"MDServer",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"mdserv",
"=",
"m",
"\n",
"}"
] | // SetMDServer implements the Config interface for ConfigLocal. | [
"SetMDServer",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L593-L597 |
159,537 | keybase/client | go/kbfs/libkbfs/config_local.go | BlockServer | func (c *ConfigLocal) BlockServer() BlockServer {
c.lock.RLock()
defer c.lock.RUnlock()
return c.bserv
} | go | func (c *ConfigLocal) BlockServer() BlockServer {
c.lock.RLock()
defer c.lock.RUnlock()
return c.bserv
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"BlockServer",
"(",
")",
"BlockServer",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"bserv",
"\n",
"}"
] | // BlockServer implements the Config interface for ConfigLocal. | [
"BlockServer",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L600-L604 |
159,538 | keybase/client | go/kbfs/libkbfs/config_local.go | SetBlockServer | func (c *ConfigLocal) SetBlockServer(b BlockServer) {
c.lock.Lock()
defer c.lock.Unlock()
c.bserv = b
} | go | func (c *ConfigLocal) SetBlockServer(b BlockServer) {
c.lock.Lock()
defer c.lock.Unlock()
c.bserv = b
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetBlockServer",
"(",
"b",
"BlockServer",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"bserv",
"=",
"b",
"\n",
"}"
] | // SetBlockServer implements the Config interface for ConfigLocal. | [
"SetBlockServer",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L607-L611 |
159,539 | keybase/client | go/kbfs/libkbfs/config_local.go | KeyServer | func (c *ConfigLocal) KeyServer() libkey.KeyServer {
c.lock.RLock()
defer c.lock.RUnlock()
return c.keyserv
} | go | func (c *ConfigLocal) KeyServer() libkey.KeyServer {
c.lock.RLock()
defer c.lock.RUnlock()
return c.keyserv
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"KeyServer",
"(",
")",
"libkey",
".",
"KeyServer",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"keyserv",
"\n",
"}"
] | // KeyServer implements the Config interface for ConfigLocal. | [
"KeyServer",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L614-L618 |
159,540 | keybase/client | go/kbfs/libkbfs/config_local.go | SetKeyServer | func (c *ConfigLocal) SetKeyServer(k libkey.KeyServer) {
c.lock.Lock()
defer c.lock.Unlock()
c.keyserv = k
} | go | func (c *ConfigLocal) SetKeyServer(k libkey.KeyServer) {
c.lock.Lock()
defer c.lock.Unlock()
c.keyserv = k
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetKeyServer",
"(",
"k",
"libkey",
".",
"KeyServer",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"keyserv",
"=",
"k",
"\n",
"}"
] | // SetKeyServer implements the Config interface for ConfigLocal. | [
"SetKeyServer",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L621-L625 |
159,541 | keybase/client | go/kbfs/libkbfs/config_local.go | KeybaseService | func (c *ConfigLocal) KeybaseService() KeybaseService {
c.lock.RLock()
defer c.lock.RUnlock()
return c.service
} | go | func (c *ConfigLocal) KeybaseService() KeybaseService {
c.lock.RLock()
defer c.lock.RUnlock()
return c.service
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"KeybaseService",
"(",
")",
"KeybaseService",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"service",
"\n",
"}"
] | // KeybaseService implements the Config interface for ConfigLocal. | [
"KeybaseService",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L628-L632 |
159,542 | keybase/client | go/kbfs/libkbfs/config_local.go | SetKeybaseService | func (c *ConfigLocal) SetKeybaseService(k KeybaseService) {
c.lock.Lock()
defer c.lock.Unlock()
c.service = k
} | go | func (c *ConfigLocal) SetKeybaseService(k KeybaseService) {
c.lock.Lock()
defer c.lock.Unlock()
c.service = k
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetKeybaseService",
"(",
"k",
"KeybaseService",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"service",
"=",
"k",
"\n",
"}"
] | // SetKeybaseService implements the Config interface for ConfigLocal. | [
"SetKeybaseService",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L635-L639 |
159,543 | keybase/client | go/kbfs/libkbfs/config_local.go | BlockSplitter | func (c *ConfigLocal) BlockSplitter() data.BlockSplitter {
c.lock.RLock()
defer c.lock.RUnlock()
return c.bsplit
} | go | func (c *ConfigLocal) BlockSplitter() data.BlockSplitter {
c.lock.RLock()
defer c.lock.RUnlock()
return c.bsplit
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"BlockSplitter",
"(",
")",
"data",
".",
"BlockSplitter",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"bsplit",
"\n",
"}"
] | // BlockSplitter implements the Config interface for ConfigLocal. | [
"BlockSplitter",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L642-L646 |
159,544 | keybase/client | go/kbfs/libkbfs/config_local.go | SetBlockSplitter | func (c *ConfigLocal) SetBlockSplitter(b data.BlockSplitter) {
c.lock.Lock()
defer c.lock.Unlock()
c.bsplit = b
} | go | func (c *ConfigLocal) SetBlockSplitter(b data.BlockSplitter) {
c.lock.Lock()
defer c.lock.Unlock()
c.bsplit = b
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetBlockSplitter",
"(",
"b",
"data",
".",
"BlockSplitter",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"bsplit",
"=",
"b",
"\n",
"}"
] | // SetBlockSplitter implements the Config interface for ConfigLocal. | [
"SetBlockSplitter",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L649-L653 |
159,545 | keybase/client | go/kbfs/libkbfs/config_local.go | Notifier | func (c *ConfigLocal) Notifier() Notifier {
c.lock.RLock()
defer c.lock.RUnlock()
return c.notifier
} | go | func (c *ConfigLocal) Notifier() Notifier {
c.lock.RLock()
defer c.lock.RUnlock()
return c.notifier
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"Notifier",
"(",
")",
"Notifier",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"notifier",
"\n",
"}"
] | // Notifier implements the Config interface for ConfigLocal. | [
"Notifier",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L656-L660 |
159,546 | keybase/client | go/kbfs/libkbfs/config_local.go | SetNotifier | func (c *ConfigLocal) SetNotifier(n Notifier) {
c.lock.Lock()
defer c.lock.Unlock()
c.notifier = n
} | go | func (c *ConfigLocal) SetNotifier(n Notifier) {
c.lock.Lock()
defer c.lock.Unlock()
c.notifier = n
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetNotifier",
"(",
"n",
"Notifier",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"notifier",
"=",
"n",
"\n",
"}"
] | // SetNotifier implements the Config interface for ConfigLocal. | [
"SetNotifier",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L663-L667 |
159,547 | keybase/client | go/kbfs/libkbfs/config_local.go | Clock | func (c *ConfigLocal) Clock() Clock {
c.lock.RLock()
defer c.lock.RUnlock()
return c.clock
} | go | func (c *ConfigLocal) Clock() Clock {
c.lock.RLock()
defer c.lock.RUnlock()
return c.clock
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"Clock",
"(",
")",
"Clock",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"clock",
"\n",
"}"
] | // Clock implements the Config interface for ConfigLocal. | [
"Clock",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L670-L674 |
159,548 | keybase/client | go/kbfs/libkbfs/config_local.go | SetClock | func (c *ConfigLocal) SetClock(cl Clock) {
c.lock.Lock()
defer c.lock.Unlock()
c.clock = cl
} | go | func (c *ConfigLocal) SetClock(cl Clock) {
c.lock.Lock()
defer c.lock.Unlock()
c.clock = cl
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetClock",
"(",
"cl",
"Clock",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"clock",
"=",
"cl",
"\n",
"}"
] | // SetClock implements the Config interface for ConfigLocal. | [
"SetClock",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L677-L681 |
159,549 | keybase/client | go/kbfs/libkbfs/config_local.go | ConflictRenamer | func (c *ConfigLocal) ConflictRenamer() ConflictRenamer {
c.lock.RLock()
defer c.lock.RUnlock()
return c.renamer
} | go | func (c *ConfigLocal) ConflictRenamer() ConflictRenamer {
c.lock.RLock()
defer c.lock.RUnlock()
return c.renamer
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"ConflictRenamer",
"(",
")",
"ConflictRenamer",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"renamer",
"\n",
"}"
] | // ConflictRenamer implements the Config interface for ConfigLocal. | [
"ConflictRenamer",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L684-L688 |
159,550 | keybase/client | go/kbfs/libkbfs/config_local.go | SetConflictRenamer | func (c *ConfigLocal) SetConflictRenamer(cr ConflictRenamer) {
c.lock.Lock()
defer c.lock.Unlock()
c.renamer = cr
} | go | func (c *ConfigLocal) SetConflictRenamer(cr ConflictRenamer) {
c.lock.Lock()
defer c.lock.Unlock()
c.renamer = cr
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetConflictRenamer",
"(",
"cr",
"ConflictRenamer",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"renamer",
"=",
"cr",
"\n",
"}"
] | // SetConflictRenamer implements the Config interface for ConfigLocal. | [
"SetConflictRenamer",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L691-L695 |
159,551 | keybase/client | go/kbfs/libkbfs/config_local.go | UserHistory | func (c *ConfigLocal) UserHistory() *kbfsedits.UserHistory {
c.lock.RLock()
defer c.lock.RUnlock()
return c.userHistory
} | go | func (c *ConfigLocal) UserHistory() *kbfsedits.UserHistory {
c.lock.RLock()
defer c.lock.RUnlock()
return c.userHistory
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"UserHistory",
"(",
")",
"*",
"kbfsedits",
".",
"UserHistory",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"userHistory",
"\n",
"}"
] | // UserHistory implements the Config interface for ConfigLocal. | [
"UserHistory",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L698-L702 |
159,552 | keybase/client | go/kbfs/libkbfs/config_local.go | SetUserHistory | func (c *ConfigLocal) SetUserHistory(uh *kbfsedits.UserHistory) {
c.lock.Lock()
defer c.lock.Unlock()
c.userHistory = uh
} | go | func (c *ConfigLocal) SetUserHistory(uh *kbfsedits.UserHistory) {
c.lock.Lock()
defer c.lock.Unlock()
c.userHistory = uh
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetUserHistory",
"(",
"uh",
"*",
"kbfsedits",
".",
"UserHistory",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"userHistory",
"=",
"uh",
"\n",
"}"
] | // SetUserHistory implements the Config interface for ConfigLocal. | [
"SetUserHistory",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L705-L709 |
159,553 | keybase/client | go/kbfs/libkbfs/config_local.go | MetadataVersion | func (c *ConfigLocal) MetadataVersion() kbfsmd.MetadataVer {
c.lock.RLock()
defer c.lock.RUnlock()
return c.metadataVersion
} | go | func (c *ConfigLocal) MetadataVersion() kbfsmd.MetadataVer {
c.lock.RLock()
defer c.lock.RUnlock()
return c.metadataVersion
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"MetadataVersion",
"(",
")",
"kbfsmd",
".",
"MetadataVer",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"metadataVersion",
"\n",
"}"
] | // MetadataVersion implements the Config interface for ConfigLocal. | [
"MetadataVersion",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L712-L716 |
159,554 | keybase/client | go/kbfs/libkbfs/config_local.go | SetMetadataVersion | func (c *ConfigLocal) SetMetadataVersion(mdVer kbfsmd.MetadataVer) {
c.lock.Lock()
defer c.lock.Unlock()
c.metadataVersion = mdVer
} | go | func (c *ConfigLocal) SetMetadataVersion(mdVer kbfsmd.MetadataVer) {
c.lock.Lock()
defer c.lock.Unlock()
c.metadataVersion = mdVer
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetMetadataVersion",
"(",
"mdVer",
"kbfsmd",
".",
"MetadataVer",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"metadataVersion",
"=",
"mdVer",
"\n",
"}"
] | // SetMetadataVersion implements the Config interface for ConfigLocal. | [
"SetMetadataVersion",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L719-L723 |
159,555 | keybase/client | go/kbfs/libkbfs/config_local.go | BlockCryptVersion | func (c *ConfigLocal) BlockCryptVersion() kbfscrypto.EncryptionVer {
c.lock.RLock()
defer c.lock.RUnlock()
return c.blockCryptVersion
} | go | func (c *ConfigLocal) BlockCryptVersion() kbfscrypto.EncryptionVer {
c.lock.RLock()
defer c.lock.RUnlock()
return c.blockCryptVersion
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"BlockCryptVersion",
"(",
")",
"kbfscrypto",
".",
"EncryptionVer",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"blockCryptVersion",
"\n",
"}"
] | // BlockCryptVersion implements the Config interface for ConfigLocal. | [
"BlockCryptVersion",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L731-L735 |
159,556 | keybase/client | go/kbfs/libkbfs/config_local.go | SetBlockCryptVersion | func (c *ConfigLocal) SetBlockCryptVersion(ver kbfscrypto.EncryptionVer) {
c.lock.Lock()
defer c.lock.Unlock()
c.blockCryptVersion = ver
} | go | func (c *ConfigLocal) SetBlockCryptVersion(ver kbfscrypto.EncryptionVer) {
c.lock.Lock()
defer c.lock.Unlock()
c.blockCryptVersion = ver
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetBlockCryptVersion",
"(",
"ver",
"kbfscrypto",
".",
"EncryptionVer",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"blockCryptVersion",
"=",
"ver",
"\n",
"}"
] | // SetBlockCryptVersion implements the Config interface for ConfigLocal. | [
"SetBlockCryptVersion",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L738-L742 |
159,557 | keybase/client | go/kbfs/libkbfs/config_local.go | DefaultBlockType | func (c *ConfigLocal) DefaultBlockType() keybase1.BlockType {
c.lock.RLock()
defer c.lock.RUnlock()
return c.defaultBlockType
} | go | func (c *ConfigLocal) DefaultBlockType() keybase1.BlockType {
c.lock.RLock()
defer c.lock.RUnlock()
return c.defaultBlockType
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"DefaultBlockType",
"(",
")",
"keybase1",
".",
"BlockType",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"defaultBlockType",
"\n",
"}"
] | // DefaultBlockType implements the Config interface for ConfigLocal. | [
"DefaultBlockType",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L745-L749 |
159,558 | keybase/client | go/kbfs/libkbfs/config_local.go | SetDefaultBlockType | func (c *ConfigLocal) SetDefaultBlockType(blockType keybase1.BlockType) {
c.lock.Lock()
defer c.lock.Unlock()
c.defaultBlockType = blockType
} | go | func (c *ConfigLocal) SetDefaultBlockType(blockType keybase1.BlockType) {
c.lock.Lock()
defer c.lock.Unlock()
c.defaultBlockType = blockType
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetDefaultBlockType",
"(",
"blockType",
"keybase1",
".",
"BlockType",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"defaultBlockType",
"=",
"blockType",
"\n",
"}"
] | // SetDefaultBlockType implements the Config interface for ConfigLocal. | [
"SetDefaultBlockType",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L752-L756 |
159,559 | keybase/client | go/kbfs/libkbfs/config_local.go | DoBackgroundFlushes | func (c *ConfigLocal) DoBackgroundFlushes() bool {
if !c.Mode().BackgroundFlushesEnabled() {
return false
}
c.lock.RLock()
defer c.lock.RUnlock()
return !c.noBGFlush
} | go | func (c *ConfigLocal) DoBackgroundFlushes() bool {
if !c.Mode().BackgroundFlushesEnabled() {
return false
}
c.lock.RLock()
defer c.lock.RUnlock()
return !c.noBGFlush
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"DoBackgroundFlushes",
"(",
")",
"bool",
"{",
"if",
"!",
"c",
".",
"Mode",
"(",
")",
".",
"BackgroundFlushesEnabled",
"(",
")",
"{",
"return",
"false",
"\n",
"}",
"\n\n",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"!",
"c",
".",
"noBGFlush",
"\n",
"}"
] | // DoBackgroundFlushes implements the Config interface for ConfigLocal. | [
"DoBackgroundFlushes",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L759-L767 |
159,560 | keybase/client | go/kbfs/libkbfs/config_local.go | SetDoBackgroundFlushes | func (c *ConfigLocal) SetDoBackgroundFlushes(doBGFlush bool) {
c.lock.Lock()
defer c.lock.Unlock()
c.noBGFlush = !doBGFlush
} | go | func (c *ConfigLocal) SetDoBackgroundFlushes(doBGFlush bool) {
c.lock.Lock()
defer c.lock.Unlock()
c.noBGFlush = !doBGFlush
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetDoBackgroundFlushes",
"(",
"doBGFlush",
"bool",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"noBGFlush",
"=",
"!",
"doBGFlush",
"\n",
"}"
] | // SetDoBackgroundFlushes implements the Config interface for ConfigLocal. | [
"SetDoBackgroundFlushes",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L770-L774 |
159,561 | keybase/client | go/kbfs/libkbfs/config_local.go | RekeyWithPromptWaitTime | func (c *ConfigLocal) RekeyWithPromptWaitTime() time.Duration {
c.lock.Lock()
defer c.lock.Unlock()
return c.rwpWaitTime
} | go | func (c *ConfigLocal) RekeyWithPromptWaitTime() time.Duration {
c.lock.Lock()
defer c.lock.Unlock()
return c.rwpWaitTime
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"RekeyWithPromptWaitTime",
"(",
")",
"time",
".",
"Duration",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"return",
"c",
".",
"rwpWaitTime",
"\n",
"}"
] | // RekeyWithPromptWaitTime implements the Config interface for
// ConfigLocal. | [
"RekeyWithPromptWaitTime",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L778-L782 |
159,562 | keybase/client | go/kbfs/libkbfs/config_local.go | SetRekeyWithPromptWaitTime | func (c *ConfigLocal) SetRekeyWithPromptWaitTime(d time.Duration) {
c.lock.RLock()
defer c.lock.RUnlock()
c.rwpWaitTime = d
} | go | func (c *ConfigLocal) SetRekeyWithPromptWaitTime(d time.Duration) {
c.lock.RLock()
defer c.lock.RUnlock()
c.rwpWaitTime = d
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetRekeyWithPromptWaitTime",
"(",
"d",
"time",
".",
"Duration",
")",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"c",
".",
"rwpWaitTime",
"=",
"d",
"\n",
"}"
] | // SetRekeyWithPromptWaitTime implements the Config interface for
// ConfigLocal. | [
"SetRekeyWithPromptWaitTime",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L786-L790 |
159,563 | keybase/client | go/kbfs/libkbfs/config_local.go | Mode | func (c *ConfigLocal) Mode() InitMode {
c.lock.RLock()
defer c.lock.RUnlock()
return c.mode
} | go | func (c *ConfigLocal) Mode() InitMode {
c.lock.RLock()
defer c.lock.RUnlock()
return c.mode
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"Mode",
"(",
")",
"InitMode",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"mode",
"\n",
"}"
] | // Mode implements the Config interface for ConfigLocal. | [
"Mode",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L793-L797 |
159,564 | keybase/client | go/kbfs/libkbfs/config_local.go | SetMode | func (c *ConfigLocal) SetMode(mode InitMode) {
c.lock.Lock()
defer c.lock.Unlock()
c.mode = mode
} | go | func (c *ConfigLocal) SetMode(mode InitMode) {
c.lock.Lock()
defer c.lock.Unlock()
c.mode = mode
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetMode",
"(",
"mode",
"InitMode",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"mode",
"=",
"mode",
"\n",
"}"
] | // SetMode implements the Config interface for ConfigLocal. | [
"SetMode",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L800-L804 |
159,565 | keybase/client | go/kbfs/libkbfs/config_local.go | ResetCaches | func (c *ConfigLocal) ResetCaches() {
oldDirtyBcache := c.resetCachesWithoutShutdown()
jManager, err := GetJournalManager(c)
if err == nil {
if err := c.journalizeBcaches(jManager); err != nil {
if log := c.MakeLogger(""); log != nil {
log.CWarningf(nil, "Error journalizing dirty block cache: %+v", err)
}
}
}
if oldDirtyBcache != nil {
// Shutdown outside of the lock so it doesn't block other
// access to this config.
if err := oldDirtyBcache.Shutdown(); err != nil {
if log := c.MakeLogger(""); log != nil {
log.CWarningf(nil,
"Error shutting down old dirty block cache: %+v", err)
}
}
}
} | go | func (c *ConfigLocal) ResetCaches() {
oldDirtyBcache := c.resetCachesWithoutShutdown()
jManager, err := GetJournalManager(c)
if err == nil {
if err := c.journalizeBcaches(jManager); err != nil {
if log := c.MakeLogger(""); log != nil {
log.CWarningf(nil, "Error journalizing dirty block cache: %+v", err)
}
}
}
if oldDirtyBcache != nil {
// Shutdown outside of the lock so it doesn't block other
// access to this config.
if err := oldDirtyBcache.Shutdown(); err != nil {
if log := c.MakeLogger(""); log != nil {
log.CWarningf(nil,
"Error shutting down old dirty block cache: %+v", err)
}
}
}
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"ResetCaches",
"(",
")",
"{",
"oldDirtyBcache",
":=",
"c",
".",
"resetCachesWithoutShutdown",
"(",
")",
"\n",
"jManager",
",",
"err",
":=",
"GetJournalManager",
"(",
"c",
")",
"\n",
"if",
"err",
"==",
"nil",
"{",
"if",
"err",
":=",
"c",
".",
"journalizeBcaches",
"(",
"jManager",
")",
";",
"err",
"!=",
"nil",
"{",
"if",
"log",
":=",
"c",
".",
"MakeLogger",
"(",
"\"",
"\"",
")",
";",
"log",
"!=",
"nil",
"{",
"log",
".",
"CWarningf",
"(",
"nil",
",",
"\"",
"\"",
",",
"err",
")",
"\n",
"}",
"\n",
"}",
"\n",
"}",
"\n",
"if",
"oldDirtyBcache",
"!=",
"nil",
"{",
"// Shutdown outside of the lock so it doesn't block other",
"// access to this config.",
"if",
"err",
":=",
"oldDirtyBcache",
".",
"Shutdown",
"(",
")",
";",
"err",
"!=",
"nil",
"{",
"if",
"log",
":=",
"c",
".",
"MakeLogger",
"(",
"\"",
"\"",
")",
";",
"log",
"!=",
"nil",
"{",
"log",
".",
"CWarningf",
"(",
"nil",
",",
"\"",
"\"",
",",
"err",
")",
"\n",
"}",
"\n",
"}",
"\n",
"}",
"\n",
"}"
] | // ResetCaches implements the Config interface for ConfigLocal. | [
"ResetCaches",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L892-L912 |
159,566 | keybase/client | go/kbfs/libkbfs/config_local.go | MakeLogger | func (c *ConfigLocal) MakeLogger(module string) logger.Logger {
// No need to lock since c.loggerFn is initialized once at
// construction. Also resetCachesWithoutShutdown would deadlock.
return c.loggerFn(module)
} | go | func (c *ConfigLocal) MakeLogger(module string) logger.Logger {
// No need to lock since c.loggerFn is initialized once at
// construction. Also resetCachesWithoutShutdown would deadlock.
return c.loggerFn(module)
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"MakeLogger",
"(",
"module",
"string",
")",
"logger",
".",
"Logger",
"{",
"// No need to lock since c.loggerFn is initialized once at",
"// construction. Also resetCachesWithoutShutdown would deadlock.",
"return",
"c",
".",
"loggerFn",
"(",
"module",
")",
"\n",
"}"
] | // MakeLogger implements the logMaker interface for ConfigLocal. | [
"MakeLogger",
"implements",
"the",
"logMaker",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L915-L919 |
159,567 | keybase/client | go/kbfs/libkbfs/config_local.go | MakeVLogger | func (c *ConfigLocal) MakeVLogger(log logger.Logger) *libkb.VDebugLog {
c.lock.Lock()
defer c.lock.Unlock()
return c.makeVLoggerLocked(log)
} | go | func (c *ConfigLocal) MakeVLogger(log logger.Logger) *libkb.VDebugLog {
c.lock.Lock()
defer c.lock.Unlock()
return c.makeVLoggerLocked(log)
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"MakeVLogger",
"(",
"log",
"logger",
".",
"Logger",
")",
"*",
"libkb",
".",
"VDebugLog",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"return",
"c",
".",
"makeVLoggerLocked",
"(",
"log",
")",
"\n",
"}"
] | // MakeVLogger implements the logMaker interface for ConfigLocal. | [
"MakeVLogger",
"implements",
"the",
"logMaker",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L929-L933 |
159,568 | keybase/client | go/kbfs/libkbfs/config_local.go | SetTraceOptions | func (c *ConfigLocal) SetTraceOptions(enabled bool) {
c.traceLock.Lock()
defer c.traceLock.Unlock()
c.traceEnabled = enabled
} | go | func (c *ConfigLocal) SetTraceOptions(enabled bool) {
c.traceLock.Lock()
defer c.traceLock.Unlock()
c.traceEnabled = enabled
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetTraceOptions",
"(",
"enabled",
"bool",
")",
"{",
"c",
".",
"traceLock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"traceLock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"traceEnabled",
"=",
"enabled",
"\n",
"}"
] | // SetTraceOptions implements the Config interface for ConfigLocal. | [
"SetTraceOptions",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L956-L960 |
159,569 | keybase/client | go/kbfs/libkbfs/config_local.go | MaybeStartTrace | func (c *ConfigLocal) MaybeStartTrace(
ctx context.Context, family, title string) context.Context {
traceEnabled := func() bool {
c.traceLock.RLock()
defer c.traceLock.RUnlock()
return c.traceEnabled
}()
if !traceEnabled {
return ctx
}
tr := trace.New(family, title)
tr.SetMaxEvents(25)
ctx = trace.NewContext(ctx, tr)
return ctx
} | go | func (c *ConfigLocal) MaybeStartTrace(
ctx context.Context, family, title string) context.Context {
traceEnabled := func() bool {
c.traceLock.RLock()
defer c.traceLock.RUnlock()
return c.traceEnabled
}()
if !traceEnabled {
return ctx
}
tr := trace.New(family, title)
tr.SetMaxEvents(25)
ctx = trace.NewContext(ctx, tr)
return ctx
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"MaybeStartTrace",
"(",
"ctx",
"context",
".",
"Context",
",",
"family",
",",
"title",
"string",
")",
"context",
".",
"Context",
"{",
"traceEnabled",
":=",
"func",
"(",
")",
"bool",
"{",
"c",
".",
"traceLock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"traceLock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"traceEnabled",
"\n",
"}",
"(",
")",
"\n",
"if",
"!",
"traceEnabled",
"{",
"return",
"ctx",
"\n",
"}",
"\n\n",
"tr",
":=",
"trace",
".",
"New",
"(",
"family",
",",
"title",
")",
"\n",
"tr",
".",
"SetMaxEvents",
"(",
"25",
")",
"\n",
"ctx",
"=",
"trace",
".",
"NewContext",
"(",
"ctx",
",",
"tr",
")",
"\n",
"return",
"ctx",
"\n",
"}"
] | // MaybeStartTrace implements the Config interface for ConfigLocal. | [
"MaybeStartTrace",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L963-L978 |
159,570 | keybase/client | go/kbfs/libkbfs/config_local.go | MaybeFinishTrace | func (c *ConfigLocal) MaybeFinishTrace(ctx context.Context, err error) {
if tr, ok := trace.FromContext(ctx); ok {
if err != nil {
tr.LazyPrintf("err=%+v", err)
tr.SetError()
}
tr.Finish()
}
} | go | func (c *ConfigLocal) MaybeFinishTrace(ctx context.Context, err error) {
if tr, ok := trace.FromContext(ctx); ok {
if err != nil {
tr.LazyPrintf("err=%+v", err)
tr.SetError()
}
tr.Finish()
}
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"MaybeFinishTrace",
"(",
"ctx",
"context",
".",
"Context",
",",
"err",
"error",
")",
"{",
"if",
"tr",
",",
"ok",
":=",
"trace",
".",
"FromContext",
"(",
"ctx",
")",
";",
"ok",
"{",
"if",
"err",
"!=",
"nil",
"{",
"tr",
".",
"LazyPrintf",
"(",
"\"",
"\"",
",",
"err",
")",
"\n",
"tr",
".",
"SetError",
"(",
")",
"\n",
"}",
"\n",
"tr",
".",
"Finish",
"(",
")",
"\n",
"}",
"\n",
"}"
] | // MaybeFinishTrace implements the Config interface for ConfigLocal. | [
"MaybeFinishTrace",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L981-L989 |
159,571 | keybase/client | go/kbfs/libkbfs/config_local.go | SetBGFlushDirOpBatchSize | func (c *ConfigLocal) SetBGFlushDirOpBatchSize(s int) {
c.lock.Lock()
defer c.lock.Unlock()
c.bgFlushDirOpBatchSize = s
} | go | func (c *ConfigLocal) SetBGFlushDirOpBatchSize(s int) {
c.lock.Lock()
defer c.lock.Unlock()
c.bgFlushDirOpBatchSize = s
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetBGFlushDirOpBatchSize",
"(",
"s",
"int",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"bgFlushDirOpBatchSize",
"=",
"s",
"\n",
"}"
] | // SetBGFlushDirOpBatchSize implements the Config interface for ConfigLocal. | [
"SetBGFlushDirOpBatchSize",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L1002-L1006 |
159,572 | keybase/client | go/kbfs/libkbfs/config_local.go | BGFlushDirOpBatchSize | func (c *ConfigLocal) BGFlushDirOpBatchSize() int {
c.lock.RLock()
defer c.lock.RUnlock()
return c.bgFlushDirOpBatchSize
} | go | func (c *ConfigLocal) BGFlushDirOpBatchSize() int {
c.lock.RLock()
defer c.lock.RUnlock()
return c.bgFlushDirOpBatchSize
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"BGFlushDirOpBatchSize",
"(",
")",
"int",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"bgFlushDirOpBatchSize",
"\n",
"}"
] | // BGFlushDirOpBatchSize implements the Config interface for ConfigLocal. | [
"BGFlushDirOpBatchSize",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L1009-L1013 |
159,573 | keybase/client | go/kbfs/libkbfs/config_local.go | SetBGFlushPeriod | func (c *ConfigLocal) SetBGFlushPeriod(p time.Duration) {
c.lock.Lock()
defer c.lock.Unlock()
c.bgFlushPeriod = p
} | go | func (c *ConfigLocal) SetBGFlushPeriod(p time.Duration) {
c.lock.Lock()
defer c.lock.Unlock()
c.bgFlushPeriod = p
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetBGFlushPeriod",
"(",
"p",
"time",
".",
"Duration",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"bgFlushPeriod",
"=",
"p",
"\n",
"}"
] | // SetBGFlushPeriod implements the Config interface for ConfigLocal. | [
"SetBGFlushPeriod",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L1016-L1020 |
159,574 | keybase/client | go/kbfs/libkbfs/config_local.go | BGFlushPeriod | func (c *ConfigLocal) BGFlushPeriod() time.Duration {
c.lock.RLock()
defer c.lock.RUnlock()
return c.bgFlushPeriod
} | go | func (c *ConfigLocal) BGFlushPeriod() time.Duration {
c.lock.RLock()
defer c.lock.RUnlock()
return c.bgFlushPeriod
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"BGFlushPeriod",
"(",
")",
"time",
".",
"Duration",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"bgFlushPeriod",
"\n",
"}"
] | // BGFlushPeriod implements the Config interface for ConfigLocal. | [
"BGFlushPeriod",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L1023-L1027 |
159,575 | keybase/client | go/kbfs/libkbfs/config_local.go | CheckStateOnShutdown | func (c *ConfigLocal) CheckStateOnShutdown() bool {
if md, ok := c.MDServer().(mdServerLocal); ok {
return !md.isShutdown()
}
return false
} | go | func (c *ConfigLocal) CheckStateOnShutdown() bool {
if md, ok := c.MDServer().(mdServerLocal); ok {
return !md.isShutdown()
}
return false
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"CheckStateOnShutdown",
"(",
")",
"bool",
"{",
"if",
"md",
",",
"ok",
":=",
"c",
".",
"MDServer",
"(",
")",
".",
"(",
"mdServerLocal",
")",
";",
"ok",
"{",
"return",
"!",
"md",
".",
"isShutdown",
"(",
")",
"\n",
"}",
"\n",
"return",
"false",
"\n",
"}"
] | // CheckStateOnShutdown implements the Config interface for ConfigLocal. | [
"CheckStateOnShutdown",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L1140-L1145 |
159,576 | keybase/client | go/kbfs/libkbfs/config_local.go | EnableDiskLimiter | func (c *ConfigLocal) EnableDiskLimiter(configRoot string) error {
if c.diskLimiter != nil {
return errors.New("c.diskLimiter is already non-nil")
}
params := makeDefaultBackpressureDiskLimiterParams(
configRoot, c.getQuotaUsage, c.diskBlockCacheFraction, c.syncBlockCacheFraction)
log := c.MakeLogger("")
log.Debug("Setting disk storage byte limit to %d and file limit to %d",
params.byteLimit, params.fileLimit)
os.MkdirAll(configRoot, 0700)
diskLimiter, err := newBackpressureDiskLimiter(log, params)
if err != nil {
return err
}
c.diskLimiter = diskLimiter
return nil
} | go | func (c *ConfigLocal) EnableDiskLimiter(configRoot string) error {
if c.diskLimiter != nil {
return errors.New("c.diskLimiter is already non-nil")
}
params := makeDefaultBackpressureDiskLimiterParams(
configRoot, c.getQuotaUsage, c.diskBlockCacheFraction, c.syncBlockCacheFraction)
log := c.MakeLogger("")
log.Debug("Setting disk storage byte limit to %d and file limit to %d",
params.byteLimit, params.fileLimit)
os.MkdirAll(configRoot, 0700)
diskLimiter, err := newBackpressureDiskLimiter(log, params)
if err != nil {
return err
}
c.diskLimiter = diskLimiter
return nil
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"EnableDiskLimiter",
"(",
"configRoot",
"string",
")",
"error",
"{",
"if",
"c",
".",
"diskLimiter",
"!=",
"nil",
"{",
"return",
"errors",
".",
"New",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"params",
":=",
"makeDefaultBackpressureDiskLimiterParams",
"(",
"configRoot",
",",
"c",
".",
"getQuotaUsage",
",",
"c",
".",
"diskBlockCacheFraction",
",",
"c",
".",
"syncBlockCacheFraction",
")",
"\n",
"log",
":=",
"c",
".",
"MakeLogger",
"(",
"\"",
"\"",
")",
"\n",
"log",
".",
"Debug",
"(",
"\"",
"\"",
",",
"params",
".",
"byteLimit",
",",
"params",
".",
"fileLimit",
")",
"\n",
"os",
".",
"MkdirAll",
"(",
"configRoot",
",",
"0700",
")",
"\n\n",
"diskLimiter",
",",
"err",
":=",
"newBackpressureDiskLimiter",
"(",
"log",
",",
"params",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"c",
".",
"diskLimiter",
"=",
"diskLimiter",
"\n",
"return",
"nil",
"\n",
"}"
] | // EnableDiskLimiter fills in c.diskLimiter for use in journaling and
// disk caching. It returns the EventuallyConsistentQuotaUsage object
// used by the disk limiter. | [
"EnableDiskLimiter",
"fills",
"in",
"c",
".",
"diskLimiter",
"for",
"use",
"in",
"journaling",
"and",
"disk",
"caching",
".",
"It",
"returns",
"the",
"EventuallyConsistentQuotaUsage",
"object",
"used",
"by",
"the",
"disk",
"limiter",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L1200-L1218 |
159,577 | keybase/client | go/kbfs/libkbfs/config_local.go | EnableJournaling | func (c *ConfigLocal) EnableJournaling(
ctx context.Context, journalRoot string,
bws TLFJournalBackgroundWorkStatus) error {
jManager, err := GetJournalManager(c)
if err == nil {
// Journaling shouldn't be enabled twice for the same
// config.
return errors.New("trying to enable journaling twice")
}
if c.diskLimiter == nil {
return errors.New("disk limiter must be enabled to enable journaling")
}
// TODO: Sanity-check the root directory, e.g. create
// it if it doesn't exist, make sure that it doesn't
// point to /keybase itself, etc.
log := c.MakeLogger("")
branchListener := c.KBFSOps().(branchChangeListener)
flushListener := c.KBFSOps().(mdFlushListener)
// Make sure the journal root exists.
err = ioutil.MkdirAll(journalRoot, 0700)
if err != nil {
return err
}
jManager = makeJournalManager(c, log, journalRoot, c.BlockCache(),
c.DirtyBlockCache(), c.BlockServer(), c.MDOps(), branchListener,
flushListener)
c.SetBlockServer(jManager.blockServer())
c.SetMDOps(jManager.mdOps())
bcacheErr := c.journalizeBcaches(jManager)
enableErr := func() error {
// If this fails, then existing journals will be
// enabled when we receive the login notification.
session, err := c.KBPKI().GetCurrentSession(ctx)
if err != nil {
return err
}
err = jManager.EnableExistingJournals(
ctx, session.UID, session.VerifyingKey, bws)
if err != nil {
return err
}
wg := jManager.MakeFBOsForExistingJournals(ctx)
wg.Wait()
return nil
}()
switch {
case bcacheErr != nil && enableErr != nil:
return errors.Errorf(
"Got errors %+v and %+v", bcacheErr, enableErr)
case bcacheErr != nil:
return bcacheErr
case enableErr != nil:
return enableErr
}
return nil
} | go | func (c *ConfigLocal) EnableJournaling(
ctx context.Context, journalRoot string,
bws TLFJournalBackgroundWorkStatus) error {
jManager, err := GetJournalManager(c)
if err == nil {
// Journaling shouldn't be enabled twice for the same
// config.
return errors.New("trying to enable journaling twice")
}
if c.diskLimiter == nil {
return errors.New("disk limiter must be enabled to enable journaling")
}
// TODO: Sanity-check the root directory, e.g. create
// it if it doesn't exist, make sure that it doesn't
// point to /keybase itself, etc.
log := c.MakeLogger("")
branchListener := c.KBFSOps().(branchChangeListener)
flushListener := c.KBFSOps().(mdFlushListener)
// Make sure the journal root exists.
err = ioutil.MkdirAll(journalRoot, 0700)
if err != nil {
return err
}
jManager = makeJournalManager(c, log, journalRoot, c.BlockCache(),
c.DirtyBlockCache(), c.BlockServer(), c.MDOps(), branchListener,
flushListener)
c.SetBlockServer(jManager.blockServer())
c.SetMDOps(jManager.mdOps())
bcacheErr := c.journalizeBcaches(jManager)
enableErr := func() error {
// If this fails, then existing journals will be
// enabled when we receive the login notification.
session, err := c.KBPKI().GetCurrentSession(ctx)
if err != nil {
return err
}
err = jManager.EnableExistingJournals(
ctx, session.UID, session.VerifyingKey, bws)
if err != nil {
return err
}
wg := jManager.MakeFBOsForExistingJournals(ctx)
wg.Wait()
return nil
}()
switch {
case bcacheErr != nil && enableErr != nil:
return errors.Errorf(
"Got errors %+v and %+v", bcacheErr, enableErr)
case bcacheErr != nil:
return bcacheErr
case enableErr != nil:
return enableErr
}
return nil
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"EnableJournaling",
"(",
"ctx",
"context",
".",
"Context",
",",
"journalRoot",
"string",
",",
"bws",
"TLFJournalBackgroundWorkStatus",
")",
"error",
"{",
"jManager",
",",
"err",
":=",
"GetJournalManager",
"(",
"c",
")",
"\n",
"if",
"err",
"==",
"nil",
"{",
"// Journaling shouldn't be enabled twice for the same",
"// config.",
"return",
"errors",
".",
"New",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"if",
"c",
".",
"diskLimiter",
"==",
"nil",
"{",
"return",
"errors",
".",
"New",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"// TODO: Sanity-check the root directory, e.g. create",
"// it if it doesn't exist, make sure that it doesn't",
"// point to /keybase itself, etc.",
"log",
":=",
"c",
".",
"MakeLogger",
"(",
"\"",
"\"",
")",
"\n",
"branchListener",
":=",
"c",
".",
"KBFSOps",
"(",
")",
".",
"(",
"branchChangeListener",
")",
"\n",
"flushListener",
":=",
"c",
".",
"KBFSOps",
"(",
")",
".",
"(",
"mdFlushListener",
")",
"\n\n",
"// Make sure the journal root exists.",
"err",
"=",
"ioutil",
".",
"MkdirAll",
"(",
"journalRoot",
",",
"0700",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n\n",
"jManager",
"=",
"makeJournalManager",
"(",
"c",
",",
"log",
",",
"journalRoot",
",",
"c",
".",
"BlockCache",
"(",
")",
",",
"c",
".",
"DirtyBlockCache",
"(",
")",
",",
"c",
".",
"BlockServer",
"(",
")",
",",
"c",
".",
"MDOps",
"(",
")",
",",
"branchListener",
",",
"flushListener",
")",
"\n\n",
"c",
".",
"SetBlockServer",
"(",
"jManager",
".",
"blockServer",
"(",
")",
")",
"\n",
"c",
".",
"SetMDOps",
"(",
"jManager",
".",
"mdOps",
"(",
")",
")",
"\n\n",
"bcacheErr",
":=",
"c",
".",
"journalizeBcaches",
"(",
"jManager",
")",
"\n",
"enableErr",
":=",
"func",
"(",
")",
"error",
"{",
"// If this fails, then existing journals will be",
"// enabled when we receive the login notification.",
"session",
",",
"err",
":=",
"c",
".",
"KBPKI",
"(",
")",
".",
"GetCurrentSession",
"(",
"ctx",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n\n",
"err",
"=",
"jManager",
".",
"EnableExistingJournals",
"(",
"ctx",
",",
"session",
".",
"UID",
",",
"session",
".",
"VerifyingKey",
",",
"bws",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n\n",
"wg",
":=",
"jManager",
".",
"MakeFBOsForExistingJournals",
"(",
"ctx",
")",
"\n",
"wg",
".",
"Wait",
"(",
")",
"\n",
"return",
"nil",
"\n",
"}",
"(",
")",
"\n",
"switch",
"{",
"case",
"bcacheErr",
"!=",
"nil",
"&&",
"enableErr",
"!=",
"nil",
":",
"return",
"errors",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"bcacheErr",
",",
"enableErr",
")",
"\n",
"case",
"bcacheErr",
"!=",
"nil",
":",
"return",
"bcacheErr",
"\n",
"case",
"enableErr",
"!=",
"nil",
":",
"return",
"enableErr",
"\n",
"}",
"\n\n",
"return",
"nil",
"\n",
"}"
] | // EnableJournaling creates a JournalManager and attaches it to
// this config. journalRoot must be non-empty. Errors returned are
// non-fatal. | [
"EnableJournaling",
"creates",
"a",
"JournalManager",
"and",
"attaches",
"it",
"to",
"this",
"config",
".",
"journalRoot",
"must",
"be",
"non",
"-",
"empty",
".",
"Errors",
"returned",
"are",
"non",
"-",
"fatal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L1223-L1287 |
159,578 | keybase/client | go/kbfs/libkbfs/config_local.go | MakeDiskBlockCacheIfNotExists | func (c *ConfigLocal) MakeDiskBlockCacheIfNotExists() error {
c.lock.Lock()
defer c.lock.Unlock()
if c.diskBlockCache != nil {
return nil
}
switch c.diskCacheMode {
case DiskCacheModeOff:
return nil
case DiskCacheModeLocal:
return c.resetDiskBlockCacheLocked()
case DiskCacheModeRemote:
dbc, err := NewDiskBlockCacheRemote(c.kbCtx, c)
if err != nil {
return err
}
c.diskBlockCache = dbc
return nil
}
return nil
} | go | func (c *ConfigLocal) MakeDiskBlockCacheIfNotExists() error {
c.lock.Lock()
defer c.lock.Unlock()
if c.diskBlockCache != nil {
return nil
}
switch c.diskCacheMode {
case DiskCacheModeOff:
return nil
case DiskCacheModeLocal:
return c.resetDiskBlockCacheLocked()
case DiskCacheModeRemote:
dbc, err := NewDiskBlockCacheRemote(c.kbCtx, c)
if err != nil {
return err
}
c.diskBlockCache = dbc
return nil
}
return nil
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"MakeDiskBlockCacheIfNotExists",
"(",
")",
"error",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"if",
"c",
".",
"diskBlockCache",
"!=",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"switch",
"c",
".",
"diskCacheMode",
"{",
"case",
"DiskCacheModeOff",
":",
"return",
"nil",
"\n",
"case",
"DiskCacheModeLocal",
":",
"return",
"c",
".",
"resetDiskBlockCacheLocked",
"(",
")",
"\n",
"case",
"DiskCacheModeRemote",
":",
"dbc",
",",
"err",
":=",
"NewDiskBlockCacheRemote",
"(",
"c",
".",
"kbCtx",
",",
"c",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"c",
".",
"diskBlockCache",
"=",
"dbc",
"\n",
"return",
"nil",
"\n",
"}",
"\n",
"return",
"nil",
"\n",
"}"
] | // MakeDiskBlockCacheIfNotExists implements the Config interface for
// ConfigLocal. | [
"MakeDiskBlockCacheIfNotExists",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L1347-L1367 |
159,579 | keybase/client | go/kbfs/libkbfs/config_local.go | MakeDiskMDCacheIfNotExists | func (c *ConfigLocal) MakeDiskMDCacheIfNotExists() error {
c.lock.Lock()
defer c.lock.Unlock()
if c.diskMDCache != nil {
return nil
}
return c.resetDiskMDCacheLocked()
} | go | func (c *ConfigLocal) MakeDiskMDCacheIfNotExists() error {
c.lock.Lock()
defer c.lock.Unlock()
if c.diskMDCache != nil {
return nil
}
return c.resetDiskMDCacheLocked()
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"MakeDiskMDCacheIfNotExists",
"(",
")",
"error",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"if",
"c",
".",
"diskMDCache",
"!=",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"return",
"c",
".",
"resetDiskMDCacheLocked",
"(",
")",
"\n",
"}"
] | // MakeDiskMDCacheIfNotExists implements the Config interface for
// ConfigLocal. | [
"MakeDiskMDCacheIfNotExists",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L1383-L1390 |
159,580 | keybase/client | go/kbfs/libkbfs/config_local.go | MakeDiskQuotaCacheIfNotExists | func (c *ConfigLocal) MakeDiskQuotaCacheIfNotExists() error {
c.lock.Lock()
defer c.lock.Unlock()
if c.diskQuotaCache != nil {
return nil
}
return c.resetDiskQuotaCacheLocked()
} | go | func (c *ConfigLocal) MakeDiskQuotaCacheIfNotExists() error {
c.lock.Lock()
defer c.lock.Unlock()
if c.diskQuotaCache != nil {
return nil
}
return c.resetDiskQuotaCacheLocked()
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"MakeDiskQuotaCacheIfNotExists",
"(",
")",
"error",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"if",
"c",
".",
"diskQuotaCache",
"!=",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"return",
"c",
".",
"resetDiskQuotaCacheLocked",
"(",
")",
"\n",
"}"
] | // MakeDiskQuotaCacheIfNotExists implements the Config interface for
// ConfigLocal. | [
"MakeDiskQuotaCacheIfNotExists",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L1406-L1413 |
159,581 | keybase/client | go/kbfs/libkbfs/config_local.go | MakeBlockMetadataStoreIfNotExists | func (c *ConfigLocal) MakeBlockMetadataStoreIfNotExists() (err error) {
c.lock.Lock()
defer c.lock.Unlock()
defer func() {
c.xattrStore = NewXattrStoreFromBlockMetadataStore(c.blockMetadataStore)
}()
if c.blockMetadataStore != nil {
return nil
}
c.blockMetadataStore, err = newDiskBlockMetadataStore(c)
if err != nil {
// TODO (KBFS-3659): when we can open levelDB read-only,
// do that instead of returning a Noop version.
c.blockMetadataStore = &NoopBlockMetadataStore{}
return err
}
return nil
} | go | func (c *ConfigLocal) MakeBlockMetadataStoreIfNotExists() (err error) {
c.lock.Lock()
defer c.lock.Unlock()
defer func() {
c.xattrStore = NewXattrStoreFromBlockMetadataStore(c.blockMetadataStore)
}()
if c.blockMetadataStore != nil {
return nil
}
c.blockMetadataStore, err = newDiskBlockMetadataStore(c)
if err != nil {
// TODO (KBFS-3659): when we can open levelDB read-only,
// do that instead of returning a Noop version.
c.blockMetadataStore = &NoopBlockMetadataStore{}
return err
}
return nil
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"MakeBlockMetadataStoreIfNotExists",
"(",
")",
"(",
"err",
"error",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"defer",
"func",
"(",
")",
"{",
"c",
".",
"xattrStore",
"=",
"NewXattrStoreFromBlockMetadataStore",
"(",
"c",
".",
"blockMetadataStore",
")",
"\n",
"}",
"(",
")",
"\n",
"if",
"c",
".",
"blockMetadataStore",
"!=",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"c",
".",
"blockMetadataStore",
",",
"err",
"=",
"newDiskBlockMetadataStore",
"(",
"c",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"// TODO (KBFS-3659): when we can open levelDB read-only,",
"// do that instead of returning a Noop version.",
"c",
".",
"blockMetadataStore",
"=",
"&",
"NoopBlockMetadataStore",
"{",
"}",
"\n",
"return",
"err",
"\n",
"}",
"\n",
"return",
"nil",
"\n",
"}"
] | // MakeBlockMetadataStoreIfNotExists implements the Config interface for
// ConfigLocal. If error happens, a Noop one is populated. | [
"MakeBlockMetadataStoreIfNotExists",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
".",
"If",
"error",
"happens",
"a",
"Noop",
"one",
"is",
"populated",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L1417-L1434 |
159,582 | keybase/client | go/kbfs/libkbfs/config_local.go | GetTlfSyncState | func (c *ConfigLocal) GetTlfSyncState(tlfID tlf.ID) FolderSyncConfig {
c.lock.RLock()
defer c.lock.RUnlock()
return c.syncedTlfs[tlfID]
} | go | func (c *ConfigLocal) GetTlfSyncState(tlfID tlf.ID) FolderSyncConfig {
c.lock.RLock()
defer c.lock.RUnlock()
return c.syncedTlfs[tlfID]
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"GetTlfSyncState",
"(",
"tlfID",
"tlf",
".",
"ID",
")",
"FolderSyncConfig",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"syncedTlfs",
"[",
"tlfID",
"]",
"\n",
"}"
] | // GetTlfSyncState implements the syncedTlfGetterSetter interface for
// ConfigLocal. | [
"GetTlfSyncState",
"implements",
"the",
"syncedTlfGetterSetter",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L1502-L1506 |
159,583 | keybase/client | go/kbfs/libkbfs/config_local.go | IsSyncedTlf | func (c *ConfigLocal) IsSyncedTlf(tlfID tlf.ID) bool {
return c.GetTlfSyncState(tlfID).Mode == keybase1.FolderSyncMode_ENABLED
} | go | func (c *ConfigLocal) IsSyncedTlf(tlfID tlf.ID) bool {
return c.GetTlfSyncState(tlfID).Mode == keybase1.FolderSyncMode_ENABLED
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"IsSyncedTlf",
"(",
"tlfID",
"tlf",
".",
"ID",
")",
"bool",
"{",
"return",
"c",
".",
"GetTlfSyncState",
"(",
"tlfID",
")",
".",
"Mode",
"==",
"keybase1",
".",
"FolderSyncMode_ENABLED",
"\n",
"}"
] | // IsSyncedTlf implements the syncedTlfGetterSetter interface for
// ConfigLocal. | [
"IsSyncedTlf",
"implements",
"the",
"syncedTlfGetterSetter",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L1510-L1512 |
159,584 | keybase/client | go/kbfs/libkbfs/config_local.go | IsSyncedTlfPath | func (c *ConfigLocal) IsSyncedTlfPath(tlfPath string) bool {
c.lock.RLock()
defer c.lock.RUnlock()
return c.syncedTlfPaths[tlfPath]
} | go | func (c *ConfigLocal) IsSyncedTlfPath(tlfPath string) bool {
c.lock.RLock()
defer c.lock.RUnlock()
return c.syncedTlfPaths[tlfPath]
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"IsSyncedTlfPath",
"(",
"tlfPath",
"string",
")",
"bool",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"syncedTlfPaths",
"[",
"tlfPath",
"]",
"\n",
"}"
] | // IsSyncedTlfPath implements the syncedTlfGetterSetter interface for
// ConfigLocal. | [
"IsSyncedTlfPath",
"implements",
"the",
"syncedTlfGetterSetter",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L1516-L1520 |
159,585 | keybase/client | go/kbfs/libkbfs/config_local.go | OfflineAvailabilityForPath | func (c *ConfigLocal) OfflineAvailabilityForPath(
tlfPath string) keybase1.OfflineAvailability {
if c.IsSyncedTlfPath(tlfPath) {
return keybase1.OfflineAvailability_BEST_EFFORT
}
return keybase1.OfflineAvailability_NONE
} | go | func (c *ConfigLocal) OfflineAvailabilityForPath(
tlfPath string) keybase1.OfflineAvailability {
if c.IsSyncedTlfPath(tlfPath) {
return keybase1.OfflineAvailability_BEST_EFFORT
}
return keybase1.OfflineAvailability_NONE
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"OfflineAvailabilityForPath",
"(",
"tlfPath",
"string",
")",
"keybase1",
".",
"OfflineAvailability",
"{",
"if",
"c",
".",
"IsSyncedTlfPath",
"(",
"tlfPath",
")",
"{",
"return",
"keybase1",
".",
"OfflineAvailability_BEST_EFFORT",
"\n",
"}",
"\n",
"return",
"keybase1",
".",
"OfflineAvailability_NONE",
"\n",
"}"
] | // OfflineAvailabilityForPath implements the offlineStatusGetter
// interface for ConfigLocal. | [
"OfflineAvailabilityForPath",
"implements",
"the",
"offlineStatusGetter",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L1524-L1530 |
159,586 | keybase/client | go/kbfs/libkbfs/config_local.go | OfflineAvailabilityForID | func (c *ConfigLocal) OfflineAvailabilityForID(
tlfID tlf.ID) keybase1.OfflineAvailability {
if c.GetTlfSyncState(tlfID).Mode != keybase1.FolderSyncMode_DISABLED {
return keybase1.OfflineAvailability_BEST_EFFORT
}
return keybase1.OfflineAvailability_NONE
} | go | func (c *ConfigLocal) OfflineAvailabilityForID(
tlfID tlf.ID) keybase1.OfflineAvailability {
if c.GetTlfSyncState(tlfID).Mode != keybase1.FolderSyncMode_DISABLED {
return keybase1.OfflineAvailability_BEST_EFFORT
}
return keybase1.OfflineAvailability_NONE
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"OfflineAvailabilityForID",
"(",
"tlfID",
"tlf",
".",
"ID",
")",
"keybase1",
".",
"OfflineAvailability",
"{",
"if",
"c",
".",
"GetTlfSyncState",
"(",
"tlfID",
")",
".",
"Mode",
"!=",
"keybase1",
".",
"FolderSyncMode_DISABLED",
"{",
"return",
"keybase1",
".",
"OfflineAvailability_BEST_EFFORT",
"\n",
"}",
"\n",
"return",
"keybase1",
".",
"OfflineAvailability_NONE",
"\n",
"}"
] | // OfflineAvailabilityForID implements the offlineStatusGetter
// interface for ConfigLocal. | [
"OfflineAvailabilityForID",
"implements",
"the",
"offlineStatusGetter",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L1534-L1540 |
159,587 | keybase/client | go/kbfs/libkbfs/config_local.go | SetTlfSyncState | func (c *ConfigLocal) SetTlfSyncState(
ctx context.Context, tlfID tlf.ID, config FolderSyncConfig) (
<-chan error, error) {
if !c.IsTestMode() && config.Mode != keybase1.FolderSyncMode_ENABLED {
// If we're disabling, or just changing the partial sync
// config (which may be removing paths), we should cancel all
// the previous prefetches for this TLF. For partial syncs, a
// new sync will be started.
err := c.BlockOps().Prefetcher().CancelTlfPrefetches(ctx, tlfID)
if err != nil {
return nil, err
}
}
return c.setTlfSyncState(tlfID, config)
} | go | func (c *ConfigLocal) SetTlfSyncState(
ctx context.Context, tlfID tlf.ID, config FolderSyncConfig) (
<-chan error, error) {
if !c.IsTestMode() && config.Mode != keybase1.FolderSyncMode_ENABLED {
// If we're disabling, or just changing the partial sync
// config (which may be removing paths), we should cancel all
// the previous prefetches for this TLF. For partial syncs, a
// new sync will be started.
err := c.BlockOps().Prefetcher().CancelTlfPrefetches(ctx, tlfID)
if err != nil {
return nil, err
}
}
return c.setTlfSyncState(tlfID, config)
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetTlfSyncState",
"(",
"ctx",
"context",
".",
"Context",
",",
"tlfID",
"tlf",
".",
"ID",
",",
"config",
"FolderSyncConfig",
")",
"(",
"<-",
"chan",
"error",
",",
"error",
")",
"{",
"if",
"!",
"c",
".",
"IsTestMode",
"(",
")",
"&&",
"config",
".",
"Mode",
"!=",
"keybase1",
".",
"FolderSyncMode_ENABLED",
"{",
"// If we're disabling, or just changing the partial sync",
"// config (which may be removing paths), we should cancel all",
"// the previous prefetches for this TLF. For partial syncs, a",
"// new sync will be started.",
"err",
":=",
"c",
".",
"BlockOps",
"(",
")",
".",
"Prefetcher",
"(",
")",
".",
"CancelTlfPrefetches",
"(",
"ctx",
",",
"tlfID",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n",
"}",
"\n",
"return",
"c",
".",
"setTlfSyncState",
"(",
"tlfID",
",",
"config",
")",
"\n",
"}"
] | // SetTlfSyncState implements the syncedTlfGetterSetter interface for
// ConfigLocal. | [
"SetTlfSyncState",
"implements",
"the",
"syncedTlfGetterSetter",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L1609-L1623 |
159,588 | keybase/client | go/kbfs/libkbfs/config_local.go | GetAllSyncedTlfs | func (c *ConfigLocal) GetAllSyncedTlfs() []tlf.ID {
c.lock.RLock()
defer c.lock.RUnlock()
tlfs := make([]tlf.ID, 0, len(c.syncedTlfs))
for tlf, config := range c.syncedTlfs {
if config.Mode != keybase1.FolderSyncMode_DISABLED {
tlfs = append(tlfs, tlf)
}
}
return tlfs
} | go | func (c *ConfigLocal) GetAllSyncedTlfs() []tlf.ID {
c.lock.RLock()
defer c.lock.RUnlock()
tlfs := make([]tlf.ID, 0, len(c.syncedTlfs))
for tlf, config := range c.syncedTlfs {
if config.Mode != keybase1.FolderSyncMode_DISABLED {
tlfs = append(tlfs, tlf)
}
}
return tlfs
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"GetAllSyncedTlfs",
"(",
")",
"[",
"]",
"tlf",
".",
"ID",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"tlfs",
":=",
"make",
"(",
"[",
"]",
"tlf",
".",
"ID",
",",
"0",
",",
"len",
"(",
"c",
".",
"syncedTlfs",
")",
")",
"\n",
"for",
"tlf",
",",
"config",
":=",
"range",
"c",
".",
"syncedTlfs",
"{",
"if",
"config",
".",
"Mode",
"!=",
"keybase1",
".",
"FolderSyncMode_DISABLED",
"{",
"tlfs",
"=",
"append",
"(",
"tlfs",
",",
"tlf",
")",
"\n",
"}",
"\n",
"}",
"\n",
"return",
"tlfs",
"\n",
"}"
] | // GetAllSyncedTlfs implements the syncedTlfGetterSetter interface for
// ConfigLocal. | [
"GetAllSyncedTlfs",
"implements",
"the",
"syncedTlfGetterSetter",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L1627-L1637 |
159,589 | keybase/client | go/kbfs/libkbfs/config_local.go | PrefetchStatus | func (c *ConfigLocal) PrefetchStatus(ctx context.Context, tlfID tlf.ID,
ptr data.BlockPointer) PrefetchStatus {
dbc := c.DiskBlockCache()
if dbc == nil {
// We must be in testing mode, so check the block retrieval queue.
bops, ok := c.BlockOps().(*BlockOpsStandard)
if !ok {
return NoPrefetch
}
status, err := bops.queue.getPrefetchStatus(ptr.ID)
if err != nil {
c.MakeLogger("").CDebugf(ctx,
"Error getting prefetch status: %+v", err)
return NoPrefetch
}
return status
}
prefetchStatus, err := dbc.GetPrefetchStatus(
ctx, tlfID, ptr.ID, DiskBlockAnyCache)
if err != nil {
return NoPrefetch
}
return prefetchStatus
} | go | func (c *ConfigLocal) PrefetchStatus(ctx context.Context, tlfID tlf.ID,
ptr data.BlockPointer) PrefetchStatus {
dbc := c.DiskBlockCache()
if dbc == nil {
// We must be in testing mode, so check the block retrieval queue.
bops, ok := c.BlockOps().(*BlockOpsStandard)
if !ok {
return NoPrefetch
}
status, err := bops.queue.getPrefetchStatus(ptr.ID)
if err != nil {
c.MakeLogger("").CDebugf(ctx,
"Error getting prefetch status: %+v", err)
return NoPrefetch
}
return status
}
prefetchStatus, err := dbc.GetPrefetchStatus(
ctx, tlfID, ptr.ID, DiskBlockAnyCache)
if err != nil {
return NoPrefetch
}
return prefetchStatus
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"PrefetchStatus",
"(",
"ctx",
"context",
".",
"Context",
",",
"tlfID",
"tlf",
".",
"ID",
",",
"ptr",
"data",
".",
"BlockPointer",
")",
"PrefetchStatus",
"{",
"dbc",
":=",
"c",
".",
"DiskBlockCache",
"(",
")",
"\n",
"if",
"dbc",
"==",
"nil",
"{",
"// We must be in testing mode, so check the block retrieval queue.",
"bops",
",",
"ok",
":=",
"c",
".",
"BlockOps",
"(",
")",
".",
"(",
"*",
"BlockOpsStandard",
")",
"\n",
"if",
"!",
"ok",
"{",
"return",
"NoPrefetch",
"\n",
"}",
"\n",
"status",
",",
"err",
":=",
"bops",
".",
"queue",
".",
"getPrefetchStatus",
"(",
"ptr",
".",
"ID",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"c",
".",
"MakeLogger",
"(",
"\"",
"\"",
")",
".",
"CDebugf",
"(",
"ctx",
",",
"\"",
"\"",
",",
"err",
")",
"\n",
"return",
"NoPrefetch",
"\n",
"}",
"\n",
"return",
"status",
"\n",
"}",
"\n\n",
"prefetchStatus",
",",
"err",
":=",
"dbc",
".",
"GetPrefetchStatus",
"(",
"ctx",
",",
"tlfID",
",",
"ptr",
".",
"ID",
",",
"DiskBlockAnyCache",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"NoPrefetch",
"\n",
"}",
"\n",
"return",
"prefetchStatus",
"\n",
"}"
] | // PrefetchStatus implements the Config interface for ConfigLocal. | [
"PrefetchStatus",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L1640-L1664 |
159,590 | keybase/client | go/kbfs/libkbfs/config_local.go | SetKBFSService | func (c *ConfigLocal) SetKBFSService(k *KBFSService) {
c.lock.Lock()
defer c.lock.Unlock()
if c.kbfsService != nil {
c.kbfsService.Shutdown()
}
c.kbfsService = k
} | go | func (c *ConfigLocal) SetKBFSService(k *KBFSService) {
c.lock.Lock()
defer c.lock.Unlock()
if c.kbfsService != nil {
c.kbfsService.Shutdown()
}
c.kbfsService = k
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetKBFSService",
"(",
"k",
"*",
"KBFSService",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"if",
"c",
".",
"kbfsService",
"!=",
"nil",
"{",
"c",
".",
"kbfsService",
".",
"Shutdown",
"(",
")",
"\n",
"}",
"\n",
"c",
".",
"kbfsService",
"=",
"k",
"\n",
"}"
] | // SetKBFSService sets the KBFSService for this ConfigLocal. | [
"SetKBFSService",
"sets",
"the",
"KBFSService",
"for",
"this",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L1677-L1684 |
159,591 | keybase/client | go/kbfs/libkbfs/config_local.go | RootNodeWrappers | func (c *ConfigLocal) RootNodeWrappers() []func(Node) Node {
c.lock.RLock()
defer c.lock.RUnlock()
return c.rootNodeWrappers[:]
} | go | func (c *ConfigLocal) RootNodeWrappers() []func(Node) Node {
c.lock.RLock()
defer c.lock.RUnlock()
return c.rootNodeWrappers[:]
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"RootNodeWrappers",
"(",
")",
"[",
"]",
"func",
"(",
"Node",
")",
"Node",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"rootNodeWrappers",
"[",
":",
"]",
"\n",
"}"
] | // RootNodeWrappers implements the Config interface for ConfigLocal. | [
"RootNodeWrappers",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L1687-L1691 |
159,592 | keybase/client | go/kbfs/libkbfs/config_local.go | AddRootNodeWrapper | func (c *ConfigLocal) AddRootNodeWrapper(f func(Node) Node) {
c.lock.Lock()
defer c.lock.Unlock()
c.rootNodeWrappers = append(c.rootNodeWrappers, f)
} | go | func (c *ConfigLocal) AddRootNodeWrapper(f func(Node) Node) {
c.lock.Lock()
defer c.lock.Unlock()
c.rootNodeWrappers = append(c.rootNodeWrappers, f)
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"AddRootNodeWrapper",
"(",
"f",
"func",
"(",
"Node",
")",
"Node",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"rootNodeWrappers",
"=",
"append",
"(",
"c",
".",
"rootNodeWrappers",
",",
"f",
")",
"\n",
"}"
] | // AddRootNodeWrapper implements the Config interface for ConfigLocal. | [
"AddRootNodeWrapper",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L1694-L1698 |
159,593 | keybase/client | go/kbfs/libkbfs/config_local.go | SetVLogLevel | func (c *ConfigLocal) SetVLogLevel(levelString string) {
c.lock.Lock()
defer c.lock.Unlock()
c.vdebugSetting = levelString
for _, vlog := range c.vlogs {
vlog.Configure(levelString)
}
} | go | func (c *ConfigLocal) SetVLogLevel(levelString string) {
c.lock.Lock()
defer c.lock.Unlock()
c.vdebugSetting = levelString
for _, vlog := range c.vlogs {
vlog.Configure(levelString)
}
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"SetVLogLevel",
"(",
"levelString",
"string",
")",
"{",
"c",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"c",
".",
"vdebugSetting",
"=",
"levelString",
"\n",
"for",
"_",
",",
"vlog",
":=",
"range",
"c",
".",
"vlogs",
"{",
"vlog",
".",
"Configure",
"(",
"levelString",
")",
"\n",
"}",
"\n",
"}"
] | // SetVLogLevel implements the Config interface for ConfigLocal. | [
"SetVLogLevel",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L1701-L1708 |
159,594 | keybase/client | go/kbfs/libkbfs/config_local.go | VLogLevel | func (c *ConfigLocal) VLogLevel() string {
c.lock.RLock()
defer c.lock.RUnlock()
return c.vdebugSetting
} | go | func (c *ConfigLocal) VLogLevel() string {
c.lock.RLock()
defer c.lock.RUnlock()
return c.vdebugSetting
} | [
"func",
"(",
"c",
"*",
"ConfigLocal",
")",
"VLogLevel",
"(",
")",
"string",
"{",
"c",
".",
"lock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"c",
".",
"lock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"c",
".",
"vdebugSetting",
"\n",
"}"
] | // VLogLevel implements the Config interface for ConfigLocal. | [
"VLogLevel",
"implements",
"the",
"Config",
"interface",
"for",
"ConfigLocal",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/config_local.go#L1711-L1715 |
159,595 | keybase/client | go/kbfs/libfuse/unstage_file.go | Write | func (f *UnstageFile) Write(ctx context.Context, req *fuse.WriteRequest,
resp *fuse.WriteResponse) (err error) {
defer func() { err = f.folder.processError(ctx, libkbfs.WriteMode, err) }()
size, err := libfs.UnstageForTesting(
ctx, f.folder.fs.log, f.folder.fs.config,
f.folder.getFolderBranch(), req.Data)
if err != nil {
return err
}
resp.Size = size
return nil
} | go | func (f *UnstageFile) Write(ctx context.Context, req *fuse.WriteRequest,
resp *fuse.WriteResponse) (err error) {
defer func() { err = f.folder.processError(ctx, libkbfs.WriteMode, err) }()
size, err := libfs.UnstageForTesting(
ctx, f.folder.fs.log, f.folder.fs.config,
f.folder.getFolderBranch(), req.Data)
if err != nil {
return err
}
resp.Size = size
return nil
} | [
"func",
"(",
"f",
"*",
"UnstageFile",
")",
"Write",
"(",
"ctx",
"context",
".",
"Context",
",",
"req",
"*",
"fuse",
".",
"WriteRequest",
",",
"resp",
"*",
"fuse",
".",
"WriteResponse",
")",
"(",
"err",
"error",
")",
"{",
"defer",
"func",
"(",
")",
"{",
"err",
"=",
"f",
".",
"folder",
".",
"processError",
"(",
"ctx",
",",
"libkbfs",
".",
"WriteMode",
",",
"err",
")",
"}",
"(",
")",
"\n",
"size",
",",
"err",
":=",
"libfs",
".",
"UnstageForTesting",
"(",
"ctx",
",",
"f",
".",
"folder",
".",
"fs",
".",
"log",
",",
"f",
".",
"folder",
".",
"fs",
".",
"config",
",",
"f",
".",
"folder",
".",
"getFolderBranch",
"(",
")",
",",
"req",
".",
"Data",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n",
"resp",
".",
"Size",
"=",
"size",
"\n",
"return",
"nil",
"\n",
"}"
] | // Write implements the fs.HandleWriter interface for UnstageFile. | [
"Write",
"implements",
"the",
"fs",
".",
"HandleWriter",
"interface",
"for",
"UnstageFile",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libfuse/unstage_file.go#L38-L49 |
159,596 | keybase/client | go/kbfs/libkbfs/impatient_debug_dumper.go | Begin | func (d *ImpatientDebugDumper) Begin(ctx context.Context) (done func()) {
if d.chronologicalTimeTrackerList == nil {
return nil
}
tracker := &ctxTimeTracker{
ctx: ctx,
expiresAt: d.config.Clock().Now().Add(d.dumpIn),
}
d.lock.Lock()
defer d.lock.Unlock()
d.chronologicalTimeTrackerList.append(tracker)
return tracker.markDone
} | go | func (d *ImpatientDebugDumper) Begin(ctx context.Context) (done func()) {
if d.chronologicalTimeTrackerList == nil {
return nil
}
tracker := &ctxTimeTracker{
ctx: ctx,
expiresAt: d.config.Clock().Now().Add(d.dumpIn),
}
d.lock.Lock()
defer d.lock.Unlock()
d.chronologicalTimeTrackerList.append(tracker)
return tracker.markDone
} | [
"func",
"(",
"d",
"*",
"ImpatientDebugDumper",
")",
"Begin",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"done",
"func",
"(",
")",
")",
"{",
"if",
"d",
".",
"chronologicalTimeTrackerList",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"tracker",
":=",
"&",
"ctxTimeTracker",
"{",
"ctx",
":",
"ctx",
",",
"expiresAt",
":",
"d",
".",
"config",
".",
"Clock",
"(",
")",
".",
"Now",
"(",
")",
".",
"Add",
"(",
"d",
".",
"dumpIn",
")",
",",
"}",
"\n",
"d",
".",
"lock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"d",
".",
"lock",
".",
"Unlock",
"(",
")",
"\n",
"d",
".",
"chronologicalTimeTrackerList",
".",
"append",
"(",
"tracker",
")",
"\n",
"return",
"tracker",
".",
"markDone",
"\n",
"}"
] | // Begin causes d to start tracking time for ctx. The returned function should
// be called once the associated operation is done, likely in a defer
// statement. | [
"Begin",
"causes",
"d",
"to",
"start",
"tracking",
"time",
"for",
"ctx",
".",
"The",
"returned",
"function",
"should",
"be",
"called",
"once",
"the",
"associated",
"operation",
"is",
"done",
"likely",
"in",
"a",
"defer",
"statement",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/impatient_debug_dumper.go#L222-L234 |
159,597 | keybase/client | go/kbfs/libkbfs/impatient_debug_dumper.go | Shutdown | func (d *ImpatientDebugDumper) Shutdown() {
if d.shutdownFunc != nil {
d.shutdownFunc()
<-d.shutdownDoneCh
}
} | go | func (d *ImpatientDebugDumper) Shutdown() {
if d.shutdownFunc != nil {
d.shutdownFunc()
<-d.shutdownDoneCh
}
} | [
"func",
"(",
"d",
"*",
"ImpatientDebugDumper",
")",
"Shutdown",
"(",
")",
"{",
"if",
"d",
".",
"shutdownFunc",
"!=",
"nil",
"{",
"d",
".",
"shutdownFunc",
"(",
")",
"\n",
"<-",
"d",
".",
"shutdownDoneCh",
"\n",
"}",
"\n",
"}"
] | // Shutdown shuts down d idempotently. | [
"Shutdown",
"shuts",
"down",
"d",
"idempotently",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/impatient_debug_dumper.go#L237-L242 |
159,598 | keybase/client | go/stellar/relays/relays.go | GetKey | func GetKey(mctx libkb.MetaContext, recipient stellarcommon.Recipient) (key keybase1.TeamApplicationKey, teamID keybase1.TeamID, err error) {
meUsername, err := mctx.G().GetUPAKLoader().LookupUsername(mctx.Ctx(), mctx.ActiveDevice().UID())
if err != nil {
return key, teamID, err
}
impTeamNameStruct := keybase1.ImplicitTeamDisplayName{
Writers: keybase1.ImplicitTeamUserSet{
KeybaseUsers: []string{meUsername.String()},
},
}
switch {
case recipient.User != nil:
impTeamNameStruct.Writers.KeybaseUsers = append(impTeamNameStruct.Writers.KeybaseUsers, recipient.User.Username.String())
case recipient.Assertion != nil:
impTeamNameStruct.Writers.UnresolvedUsers = append(impTeamNameStruct.Writers.UnresolvedUsers, *recipient.Assertion)
default:
return key, teamID, fmt.Errorf("recipient unexpectly not user nor assertion: %v", recipient.Input)
}
impTeamDisplayName, err := teams.FormatImplicitTeamDisplayName(mctx.Ctx(), mctx.G(), impTeamNameStruct)
if err != nil {
return key, teamID, err
}
team, _, _, err := teams.LookupOrCreateImplicitTeam(mctx.Ctx(), mctx.G(), impTeamDisplayName, false /*public*/)
if err != nil {
return key, teamID, err
}
key, err = team.ApplicationKey(mctx.Ctx(), keybase1.TeamApplication_STELLAR_RELAY)
return key, team.ID, err
} | go | func GetKey(mctx libkb.MetaContext, recipient stellarcommon.Recipient) (key keybase1.TeamApplicationKey, teamID keybase1.TeamID, err error) {
meUsername, err := mctx.G().GetUPAKLoader().LookupUsername(mctx.Ctx(), mctx.ActiveDevice().UID())
if err != nil {
return key, teamID, err
}
impTeamNameStruct := keybase1.ImplicitTeamDisplayName{
Writers: keybase1.ImplicitTeamUserSet{
KeybaseUsers: []string{meUsername.String()},
},
}
switch {
case recipient.User != nil:
impTeamNameStruct.Writers.KeybaseUsers = append(impTeamNameStruct.Writers.KeybaseUsers, recipient.User.Username.String())
case recipient.Assertion != nil:
impTeamNameStruct.Writers.UnresolvedUsers = append(impTeamNameStruct.Writers.UnresolvedUsers, *recipient.Assertion)
default:
return key, teamID, fmt.Errorf("recipient unexpectly not user nor assertion: %v", recipient.Input)
}
impTeamDisplayName, err := teams.FormatImplicitTeamDisplayName(mctx.Ctx(), mctx.G(), impTeamNameStruct)
if err != nil {
return key, teamID, err
}
team, _, _, err := teams.LookupOrCreateImplicitTeam(mctx.Ctx(), mctx.G(), impTeamDisplayName, false /*public*/)
if err != nil {
return key, teamID, err
}
key, err = team.ApplicationKey(mctx.Ctx(), keybase1.TeamApplication_STELLAR_RELAY)
return key, team.ID, err
} | [
"func",
"GetKey",
"(",
"mctx",
"libkb",
".",
"MetaContext",
",",
"recipient",
"stellarcommon",
".",
"Recipient",
")",
"(",
"key",
"keybase1",
".",
"TeamApplicationKey",
",",
"teamID",
"keybase1",
".",
"TeamID",
",",
"err",
"error",
")",
"{",
"meUsername",
",",
"err",
":=",
"mctx",
".",
"G",
"(",
")",
".",
"GetUPAKLoader",
"(",
")",
".",
"LookupUsername",
"(",
"mctx",
".",
"Ctx",
"(",
")",
",",
"mctx",
".",
"ActiveDevice",
"(",
")",
".",
"UID",
"(",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"key",
",",
"teamID",
",",
"err",
"\n",
"}",
"\n",
"impTeamNameStruct",
":=",
"keybase1",
".",
"ImplicitTeamDisplayName",
"{",
"Writers",
":",
"keybase1",
".",
"ImplicitTeamUserSet",
"{",
"KeybaseUsers",
":",
"[",
"]",
"string",
"{",
"meUsername",
".",
"String",
"(",
")",
"}",
",",
"}",
",",
"}",
"\n",
"switch",
"{",
"case",
"recipient",
".",
"User",
"!=",
"nil",
":",
"impTeamNameStruct",
".",
"Writers",
".",
"KeybaseUsers",
"=",
"append",
"(",
"impTeamNameStruct",
".",
"Writers",
".",
"KeybaseUsers",
",",
"recipient",
".",
"User",
".",
"Username",
".",
"String",
"(",
")",
")",
"\n",
"case",
"recipient",
".",
"Assertion",
"!=",
"nil",
":",
"impTeamNameStruct",
".",
"Writers",
".",
"UnresolvedUsers",
"=",
"append",
"(",
"impTeamNameStruct",
".",
"Writers",
".",
"UnresolvedUsers",
",",
"*",
"recipient",
".",
"Assertion",
")",
"\n",
"default",
":",
"return",
"key",
",",
"teamID",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"recipient",
".",
"Input",
")",
"\n",
"}",
"\n",
"impTeamDisplayName",
",",
"err",
":=",
"teams",
".",
"FormatImplicitTeamDisplayName",
"(",
"mctx",
".",
"Ctx",
"(",
")",
",",
"mctx",
".",
"G",
"(",
")",
",",
"impTeamNameStruct",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"key",
",",
"teamID",
",",
"err",
"\n",
"}",
"\n",
"team",
",",
"_",
",",
"_",
",",
"err",
":=",
"teams",
".",
"LookupOrCreateImplicitTeam",
"(",
"mctx",
".",
"Ctx",
"(",
")",
",",
"mctx",
".",
"G",
"(",
")",
",",
"impTeamDisplayName",
",",
"false",
"/*public*/",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"key",
",",
"teamID",
",",
"err",
"\n",
"}",
"\n",
"key",
",",
"err",
"=",
"team",
".",
"ApplicationKey",
"(",
"mctx",
".",
"Ctx",
"(",
")",
",",
"keybase1",
".",
"TeamApplication_STELLAR_RELAY",
")",
"\n",
"return",
"key",
",",
"team",
".",
"ID",
",",
"err",
"\n",
"}"
] | // Get the key used to encrypt the stellar key for a relay transfer
// A key from the implicit team betwen the logged-in user and `to`.
// If `generation` is nil, gets the latest key. | [
"Get",
"the",
"key",
"used",
"to",
"encrypt",
"the",
"stellar",
"key",
"for",
"a",
"relay",
"transfer",
"A",
"key",
"from",
"the",
"implicit",
"team",
"betwen",
"the",
"logged",
"-",
"in",
"user",
"and",
"to",
".",
"If",
"generation",
"is",
"nil",
"gets",
"the",
"latest",
"key",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/relays/relays.go#L22-L50 |
159,599 | keybase/client | go/stellar/relays/relays.go | Create | func Create(in Input) (res Output, err error) {
_, _, senderKp, err := libkb.ParseStellarSecretKey(string(in.From))
if err != nil {
return res, err
}
senderSeed, err := stellarnet.NewSeedStr(senderKp.Seed())
if err != nil {
return res, err
}
relayKp, err := keypair.Random()
if err != nil {
return res, err
}
relayAccountID, err := stellarnet.NewAddressStr(relayKp.Address())
if err != nil {
return res, err
}
sig, err := stellarnet.CreateAccountXLMTransaction(senderSeed, relayAccountID, in.AmountXLM,
in.PublicMemo, in.SeqnoProvider, in.Timebounds, in.BaseFee)
if err != nil {
return res, err
}
enc, err := Encrypt(stellar1.RelayContents{
StellarID: stellar1.TransactionID(sig.TxHash),
Sk: stellar1.SecretKey(relayKp.Seed()),
Note: in.Note,
}, in.EncryptFor)
if err != nil {
return res, err
}
pack, err := libkb.MsgpackEncode(enc)
if err != nil {
return res, err
}
return Output{
RelayAccountID: stellar1.AccountID(relayKp.Address()),
EncryptedB64: base64.StdEncoding.EncodeToString(pack),
FundTx: sig,
}, nil
} | go | func Create(in Input) (res Output, err error) {
_, _, senderKp, err := libkb.ParseStellarSecretKey(string(in.From))
if err != nil {
return res, err
}
senderSeed, err := stellarnet.NewSeedStr(senderKp.Seed())
if err != nil {
return res, err
}
relayKp, err := keypair.Random()
if err != nil {
return res, err
}
relayAccountID, err := stellarnet.NewAddressStr(relayKp.Address())
if err != nil {
return res, err
}
sig, err := stellarnet.CreateAccountXLMTransaction(senderSeed, relayAccountID, in.AmountXLM,
in.PublicMemo, in.SeqnoProvider, in.Timebounds, in.BaseFee)
if err != nil {
return res, err
}
enc, err := Encrypt(stellar1.RelayContents{
StellarID: stellar1.TransactionID(sig.TxHash),
Sk: stellar1.SecretKey(relayKp.Seed()),
Note: in.Note,
}, in.EncryptFor)
if err != nil {
return res, err
}
pack, err := libkb.MsgpackEncode(enc)
if err != nil {
return res, err
}
return Output{
RelayAccountID: stellar1.AccountID(relayKp.Address()),
EncryptedB64: base64.StdEncoding.EncodeToString(pack),
FundTx: sig,
}, nil
} | [
"func",
"Create",
"(",
"in",
"Input",
")",
"(",
"res",
"Output",
",",
"err",
"error",
")",
"{",
"_",
",",
"_",
",",
"senderKp",
",",
"err",
":=",
"libkb",
".",
"ParseStellarSecretKey",
"(",
"string",
"(",
"in",
".",
"From",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"res",
",",
"err",
"\n",
"}",
"\n",
"senderSeed",
",",
"err",
":=",
"stellarnet",
".",
"NewSeedStr",
"(",
"senderKp",
".",
"Seed",
"(",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"res",
",",
"err",
"\n",
"}",
"\n",
"relayKp",
",",
"err",
":=",
"keypair",
".",
"Random",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"res",
",",
"err",
"\n",
"}",
"\n",
"relayAccountID",
",",
"err",
":=",
"stellarnet",
".",
"NewAddressStr",
"(",
"relayKp",
".",
"Address",
"(",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"res",
",",
"err",
"\n",
"}",
"\n",
"sig",
",",
"err",
":=",
"stellarnet",
".",
"CreateAccountXLMTransaction",
"(",
"senderSeed",
",",
"relayAccountID",
",",
"in",
".",
"AmountXLM",
",",
"in",
".",
"PublicMemo",
",",
"in",
".",
"SeqnoProvider",
",",
"in",
".",
"Timebounds",
",",
"in",
".",
"BaseFee",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"res",
",",
"err",
"\n",
"}",
"\n",
"enc",
",",
"err",
":=",
"Encrypt",
"(",
"stellar1",
".",
"RelayContents",
"{",
"StellarID",
":",
"stellar1",
".",
"TransactionID",
"(",
"sig",
".",
"TxHash",
")",
",",
"Sk",
":",
"stellar1",
".",
"SecretKey",
"(",
"relayKp",
".",
"Seed",
"(",
")",
")",
",",
"Note",
":",
"in",
".",
"Note",
",",
"}",
",",
"in",
".",
"EncryptFor",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"res",
",",
"err",
"\n",
"}",
"\n",
"pack",
",",
"err",
":=",
"libkb",
".",
"MsgpackEncode",
"(",
"enc",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"res",
",",
"err",
"\n",
"}",
"\n",
"return",
"Output",
"{",
"RelayAccountID",
":",
"stellar1",
".",
"AccountID",
"(",
"relayKp",
".",
"Address",
"(",
")",
")",
",",
"EncryptedB64",
":",
"base64",
".",
"StdEncoding",
".",
"EncodeToString",
"(",
"pack",
")",
",",
"FundTx",
":",
"sig",
",",
"}",
",",
"nil",
"\n",
"}"
] | // Create generates a stellar account, encrypts its key, and signs a transaction funding it. | [
"Create",
"generates",
"a",
"stellar",
"account",
"encrypts",
"its",
"key",
"and",
"signs",
"a",
"transaction",
"funding",
"it",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/relays/relays.go#L90-L129 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.