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 listlengths 21 1.41k | docstring stringlengths 6 2.61k | docstring_tokens listlengths 3 215 | sha stringlengths 40 40 | url stringlengths 85 252 |
|---|---|---|---|---|---|---|---|---|---|---|---|
160,300 | keybase/client | go/stellar/wallet_state.go | Shutdown | func (w *WalletState) Shutdown() error {
w.shutdownOnce.Do(func() {
mctx := libkb.NewMetaContextBackground(w.G())
mctx.Debug("WalletState shutting down")
w.Lock()
w.resetWithLock(mctx)
close(w.refreshReqs)
mctx.Debug("waiting for background refresh requests to finish")
select {
case <-w.backgroundDone:... | go | func (w *WalletState) Shutdown() error {
w.shutdownOnce.Do(func() {
mctx := libkb.NewMetaContextBackground(w.G())
mctx.Debug("WalletState shutting down")
w.Lock()
w.resetWithLock(mctx)
close(w.refreshReqs)
mctx.Debug("waiting for background refresh requests to finish")
select {
case <-w.backgroundDone:... | [
"func",
"(",
"w",
"*",
"WalletState",
")",
"Shutdown",
"(",
")",
"error",
"{",
"w",
".",
"shutdownOnce",
".",
"Do",
"(",
"func",
"(",
")",
"{",
"mctx",
":=",
"libkb",
".",
"NewMetaContextBackground",
"(",
"w",
".",
"G",
"(",
")",
")",
"\n",
"mctx",... | // Shutdown terminates any background operations and cleans up. | [
"Shutdown",
"terminates",
"any",
"background",
"operations",
"and",
"cleans",
"up",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L68-L85 |
160,301 | keybase/client | go/stellar/wallet_state.go | SeqnoUnlock | func (w *WalletState) SeqnoUnlock() {
w.Lock()
w.seqnoMu.Unlock()
w.seqnoLockHeld = false
w.Unlock()
} | go | func (w *WalletState) SeqnoUnlock() {
w.Lock()
w.seqnoMu.Unlock()
w.seqnoLockHeld = false
w.Unlock()
} | [
"func",
"(",
"w",
"*",
"WalletState",
")",
"SeqnoUnlock",
"(",
")",
"{",
"w",
".",
"Lock",
"(",
")",
"\n",
"w",
".",
"seqnoMu",
".",
"Unlock",
"(",
")",
"\n",
"w",
".",
"seqnoLockHeld",
"=",
"false",
"\n",
"w",
".",
"Unlock",
"(",
")",
"\n",
"}... | // SeqnoUnlock releases the lock on seqno operations. | [
"SeqnoUnlock",
"releases",
"the",
"lock",
"on",
"seqno",
"operations",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L98-L103 |
160,302 | keybase/client | go/stellar/wallet_state.go | BaseFee | func (w *WalletState) BaseFee(mctx libkb.MetaContext) uint64 {
return w.options.BaseFee(mctx, w)
} | go | func (w *WalletState) BaseFee(mctx libkb.MetaContext) uint64 {
return w.options.BaseFee(mctx, w)
} | [
"func",
"(",
"w",
"*",
"WalletState",
")",
"BaseFee",
"(",
"mctx",
"libkb",
".",
"MetaContext",
")",
"uint64",
"{",
"return",
"w",
".",
"options",
".",
"BaseFee",
"(",
"mctx",
",",
"w",
")",
"\n",
"}"
] | // BaseFee returns stellard's current suggestion for the base operation fee. | [
"BaseFee",
"returns",
"stellard",
"s",
"current",
"suggestion",
"for",
"the",
"base",
"operation",
"fee",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L106-L108 |
160,303 | keybase/client | go/stellar/wallet_state.go | AccountName | func (w *WalletState) AccountName(accountID stellar1.AccountID) (string, error) {
a, ok := w.accountState(accountID)
if !ok {
return "", ErrAccountNotFound
}
a.RLock()
defer a.RUnlock()
return a.name, nil
} | go | func (w *WalletState) AccountName(accountID stellar1.AccountID) (string, error) {
a, ok := w.accountState(accountID)
if !ok {
return "", ErrAccountNotFound
}
a.RLock()
defer a.RUnlock()
return a.name, nil
} | [
"func",
"(",
"w",
"*",
"WalletState",
")",
"AccountName",
"(",
"accountID",
"stellar1",
".",
"AccountID",
")",
"(",
"string",
",",
"error",
")",
"{",
"a",
",",
"ok",
":=",
"w",
".",
"accountState",
"(",
"accountID",
")",
"\n",
"if",
"!",
"ok",
"{",
... | // AccountName returns the name for an account. | [
"AccountName",
"returns",
"the",
"name",
"for",
"an",
"account",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L111-L121 |
160,304 | keybase/client | go/stellar/wallet_state.go | IsPrimary | func (w *WalletState) IsPrimary(accountID stellar1.AccountID) (bool, error) {
a, ok := w.accountState(accountID)
if !ok {
return false, ErrAccountNotFound
}
a.RLock()
defer a.RUnlock()
return a.isPrimary, nil
} | go | func (w *WalletState) IsPrimary(accountID stellar1.AccountID) (bool, error) {
a, ok := w.accountState(accountID)
if !ok {
return false, ErrAccountNotFound
}
a.RLock()
defer a.RUnlock()
return a.isPrimary, nil
} | [
"func",
"(",
"w",
"*",
"WalletState",
")",
"IsPrimary",
"(",
"accountID",
"stellar1",
".",
"AccountID",
")",
"(",
"bool",
",",
"error",
")",
"{",
"a",
",",
"ok",
":=",
"w",
".",
"accountState",
"(",
"accountID",
")",
"\n",
"if",
"!",
"ok",
"{",
"re... | // IsPrimary returns true if an account is the primary account for the user. | [
"IsPrimary",
"returns",
"true",
"if",
"an",
"account",
"is",
"the",
"primary",
"account",
"for",
"the",
"user",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L124-L134 |
160,305 | keybase/client | go/stellar/wallet_state.go | accountState | func (w *WalletState) accountState(accountID stellar1.AccountID) (*AccountState, bool) {
w.Lock()
defer w.Unlock()
a, ok := w.accounts[accountID]
return a, ok
} | go | func (w *WalletState) accountState(accountID stellar1.AccountID) (*AccountState, bool) {
w.Lock()
defer w.Unlock()
a, ok := w.accounts[accountID]
return a, ok
} | [
"func",
"(",
"w",
"*",
"WalletState",
")",
"accountState",
"(",
"accountID",
"stellar1",
".",
"AccountID",
")",
"(",
"*",
"AccountState",
",",
"bool",
")",
"{",
"w",
".",
"Lock",
"(",
")",
"\n",
"defer",
"w",
".",
"Unlock",
"(",
")",
"\n\n",
"a",
"... | // accountState returns the AccountState object for an accountID.
// If it doesn't exist in `accounts`, it will return nil, false. | [
"accountState",
"returns",
"the",
"AccountState",
"object",
"for",
"an",
"accountID",
".",
"If",
"it",
"doesn",
"t",
"exist",
"in",
"accounts",
"it",
"will",
"return",
"nil",
"false",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L152-L158 |
160,306 | keybase/client | go/stellar/wallet_state.go | accountStateBuild | func (w *WalletState) accountStateBuild(accountID stellar1.AccountID) (account *AccountState, built bool) {
w.Lock()
defer w.Unlock()
a, ok := w.accounts[accountID]
if ok {
return a, false
}
a = newAccountState(accountID, w.Remoter, w.refreshReqs)
w.accounts[accountID] = a
return a, true
} | go | func (w *WalletState) accountStateBuild(accountID stellar1.AccountID) (account *AccountState, built bool) {
w.Lock()
defer w.Unlock()
a, ok := w.accounts[accountID]
if ok {
return a, false
}
a = newAccountState(accountID, w.Remoter, w.refreshReqs)
w.accounts[accountID] = a
return a, true
} | [
"func",
"(",
"w",
"*",
"WalletState",
")",
"accountStateBuild",
"(",
"accountID",
"stellar1",
".",
"AccountID",
")",
"(",
"account",
"*",
"AccountState",
",",
"built",
"bool",
")",
"{",
"w",
".",
"Lock",
"(",
")",
"\n",
"defer",
"w",
".",
"Unlock",
"("... | // accountStateBuild returns the AccountState object for an accountID.
// If it doesn't exist in `accounts`, it will make an empty one and
// add it to `accounts` before returning it. | [
"accountStateBuild",
"returns",
"the",
"AccountState",
"object",
"for",
"an",
"accountID",
".",
"If",
"it",
"doesn",
"t",
"exist",
"in",
"accounts",
"it",
"will",
"make",
"an",
"empty",
"one",
"and",
"add",
"it",
"to",
"accounts",
"before",
"returning",
"it"... | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L163-L176 |
160,307 | keybase/client | go/stellar/wallet_state.go | accountStateRefresh | func (w *WalletState) accountStateRefresh(ctx context.Context, accountID stellar1.AccountID, reason string) (*AccountState, error) {
w.Lock()
defer w.Unlock()
a, ok := w.accounts[accountID]
if ok {
return a, nil
}
reason = "accountStateRefresh: " + reason
a = newAccountState(accountID, w.Remoter, w.refreshRe... | go | func (w *WalletState) accountStateRefresh(ctx context.Context, accountID stellar1.AccountID, reason string) (*AccountState, error) {
w.Lock()
defer w.Unlock()
a, ok := w.accounts[accountID]
if ok {
return a, nil
}
reason = "accountStateRefresh: " + reason
a = newAccountState(accountID, w.Remoter, w.refreshRe... | [
"func",
"(",
"w",
"*",
"WalletState",
")",
"accountStateRefresh",
"(",
"ctx",
"context",
".",
"Context",
",",
"accountID",
"stellar1",
".",
"AccountID",
",",
"reason",
"string",
")",
"(",
"*",
"AccountState",
",",
"error",
")",
"{",
"w",
".",
"Lock",
"("... | // accountStateRefresh returns the AccountState object for an accountID.
// If it doesn't exist in `accounts`, it will make an empty one, add
// it to `accounts`, and refresh the data in it before returning. | [
"accountStateRefresh",
"returns",
"the",
"AccountState",
"object",
"for",
"an",
"accountID",
".",
"If",
"it",
"doesn",
"t",
"exist",
"in",
"accounts",
"it",
"will",
"make",
"an",
"empty",
"one",
"add",
"it",
"to",
"accounts",
"and",
"refresh",
"the",
"data",... | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L181-L200 |
160,308 | keybase/client | go/stellar/wallet_state.go | Primed | func (w *WalletState) Primed() bool {
w.Lock()
defer w.Unlock()
return w.refreshCount > 0
} | go | func (w *WalletState) Primed() bool {
w.Lock()
defer w.Unlock()
return w.refreshCount > 0
} | [
"func",
"(",
"w",
"*",
"WalletState",
")",
"Primed",
"(",
")",
"bool",
"{",
"w",
".",
"Lock",
"(",
")",
"\n",
"defer",
"w",
".",
"Unlock",
"(",
")",
"\n",
"return",
"w",
".",
"refreshCount",
">",
"0",
"\n",
"}"
] | // Primed returns true if the WalletState has been refreshed. | [
"Primed",
"returns",
"true",
"if",
"the",
"WalletState",
"has",
"been",
"refreshed",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L203-L207 |
160,309 | keybase/client | go/stellar/wallet_state.go | UpdateAccountEntries | func (w *WalletState) UpdateAccountEntries(mctx libkb.MetaContext, reason string) (err error) {
defer mctx.TraceTimed(fmt.Sprintf("WalletState.UpdateAccountEntries [%s]", reason), func() error { return err })()
bundle, err := remote.FetchSecretlessBundle(mctx)
if err != nil {
return err
}
return w.UpdateAccoun... | go | func (w *WalletState) UpdateAccountEntries(mctx libkb.MetaContext, reason string) (err error) {
defer mctx.TraceTimed(fmt.Sprintf("WalletState.UpdateAccountEntries [%s]", reason), func() error { return err })()
bundle, err := remote.FetchSecretlessBundle(mctx)
if err != nil {
return err
}
return w.UpdateAccoun... | [
"func",
"(",
"w",
"*",
"WalletState",
")",
"UpdateAccountEntries",
"(",
"mctx",
"libkb",
".",
"MetaContext",
",",
"reason",
"string",
")",
"(",
"err",
"error",
")",
"{",
"defer",
"mctx",
".",
"TraceTimed",
"(",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
"... | // UpdateAccountEntries gets the bundle from the server and updates the individual
// account entries with the server's bundle information. | [
"UpdateAccountEntries",
"gets",
"the",
"bundle",
"from",
"the",
"server",
"and",
"updates",
"the",
"individual",
"account",
"entries",
"with",
"the",
"server",
"s",
"bundle",
"information",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L211-L220 |
160,310 | keybase/client | go/stellar/wallet_state.go | UpdateAccountEntriesWithBundle | func (w *WalletState) UpdateAccountEntriesWithBundle(mctx libkb.MetaContext, reason string, bundle *stellar1.Bundle) (err error) {
defer mctx.TraceTimed(fmt.Sprintf("WalletState.UpdateAccountEntriesWithBundle [%s]", reason), func() error { return err })()
if bundle == nil {
return errors.New("nil bundle")
}
act... | go | func (w *WalletState) UpdateAccountEntriesWithBundle(mctx libkb.MetaContext, reason string, bundle *stellar1.Bundle) (err error) {
defer mctx.TraceTimed(fmt.Sprintf("WalletState.UpdateAccountEntriesWithBundle [%s]", reason), func() error { return err })()
if bundle == nil {
return errors.New("nil bundle")
}
act... | [
"func",
"(",
"w",
"*",
"WalletState",
")",
"UpdateAccountEntriesWithBundle",
"(",
"mctx",
"libkb",
".",
"MetaContext",
",",
"reason",
"string",
",",
"bundle",
"*",
"stellar1",
".",
"Bundle",
")",
"(",
"err",
"error",
")",
"{",
"defer",
"mctx",
".",
"TraceT... | // UpdateAccountEntriesWithBundle updates the individual account entries with the
// bundle information. | [
"UpdateAccountEntriesWithBundle",
"updates",
"the",
"individual",
"account",
"entries",
"with",
"the",
"bundle",
"information",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L224-L249 |
160,311 | keybase/client | go/stellar/wallet_state.go | RefreshAll | func (w *WalletState) RefreshAll(mctx libkb.MetaContext, reason string) error {
_, err := w.refreshGroup.Do("RefreshAll", func() (interface{}, error) {
doErr := w.refreshAll(mctx, reason)
return nil, doErr
})
return err
} | go | func (w *WalletState) RefreshAll(mctx libkb.MetaContext, reason string) error {
_, err := w.refreshGroup.Do("RefreshAll", func() (interface{}, error) {
doErr := w.refreshAll(mctx, reason)
return nil, doErr
})
return err
} | [
"func",
"(",
"w",
"*",
"WalletState",
")",
"RefreshAll",
"(",
"mctx",
"libkb",
".",
"MetaContext",
",",
"reason",
"string",
")",
"error",
"{",
"_",
",",
"err",
":=",
"w",
".",
"refreshGroup",
".",
"Do",
"(",
"\"",
"\"",
",",
"func",
"(",
")",
"(",
... | // RefreshAll refreshes all the accounts. | [
"RefreshAll",
"refreshes",
"all",
"the",
"accounts",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L252-L258 |
160,312 | keybase/client | go/stellar/wallet_state.go | Refresh | func (w *WalletState) Refresh(mctx libkb.MetaContext, accountID stellar1.AccountID, reason string) error {
a, ok := w.accountState(accountID)
if !ok {
return ErrAccountNotFound
}
return a.Refresh(mctx, w.G().NotifyRouter, reason)
} | go | func (w *WalletState) Refresh(mctx libkb.MetaContext, accountID stellar1.AccountID, reason string) error {
a, ok := w.accountState(accountID)
if !ok {
return ErrAccountNotFound
}
return a.Refresh(mctx, w.G().NotifyRouter, reason)
} | [
"func",
"(",
"w",
"*",
"WalletState",
")",
"Refresh",
"(",
"mctx",
"libkb",
".",
"MetaContext",
",",
"accountID",
"stellar1",
".",
"AccountID",
",",
"reason",
"string",
")",
"error",
"{",
"a",
",",
"ok",
":=",
"w",
".",
"accountState",
"(",
"accountID",
... | // Refresh gets all the data from the server for an account. | [
"Refresh",
"gets",
"all",
"the",
"data",
"from",
"the",
"server",
"for",
"an",
"account",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L289-L295 |
160,313 | keybase/client | go/stellar/wallet_state.go | backgroundRefresh | func (w *WalletState) backgroundRefresh() {
w.backgroundDone = make(chan struct{})
for accountID := range w.refreshReqs {
a, ok := w.accountState(accountID)
if !ok {
continue
}
a.RLock()
rt := a.rtime
a.RUnlock()
mctx := libkb.NewMetaContextBackground(w.G()).WithLogTag("WABR")
if time.Since(rt) < ... | go | func (w *WalletState) backgroundRefresh() {
w.backgroundDone = make(chan struct{})
for accountID := range w.refreshReqs {
a, ok := w.accountState(accountID)
if !ok {
continue
}
a.RLock()
rt := a.rtime
a.RUnlock()
mctx := libkb.NewMetaContextBackground(w.G()).WithLogTag("WABR")
if time.Since(rt) < ... | [
"func",
"(",
"w",
"*",
"WalletState",
")",
"backgroundRefresh",
"(",
")",
"{",
"w",
".",
"backgroundDone",
"=",
"make",
"(",
"chan",
"struct",
"{",
"}",
")",
"\n",
"for",
"accountID",
":=",
"range",
"w",
".",
"refreshReqs",
"{",
"a",
",",
"ok",
":=",... | // backgroundRefresh gets any refresh requests and will refresh
// the account state if sufficient time has passed since the
// last refresh. | [
"backgroundRefresh",
"gets",
"any",
"refresh",
"requests",
"and",
"will",
"refresh",
"the",
"account",
"state",
"if",
"sufficient",
"time",
"has",
"passed",
"since",
"the",
"last",
"refresh",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L334-L356 |
160,314 | keybase/client | go/stellar/wallet_state.go | AccountSeqno | func (w *WalletState) AccountSeqno(ctx context.Context, accountID stellar1.AccountID) (uint64, error) {
a, err := w.accountStateRefresh(ctx, accountID, "AccountSeqno")
if err != nil {
return 0, err
}
return a.AccountSeqno(ctx)
} | go | func (w *WalletState) AccountSeqno(ctx context.Context, accountID stellar1.AccountID) (uint64, error) {
a, err := w.accountStateRefresh(ctx, accountID, "AccountSeqno")
if err != nil {
return 0, err
}
return a.AccountSeqno(ctx)
} | [
"func",
"(",
"w",
"*",
"WalletState",
")",
"AccountSeqno",
"(",
"ctx",
"context",
".",
"Context",
",",
"accountID",
"stellar1",
".",
"AccountID",
")",
"(",
"uint64",
",",
"error",
")",
"{",
"a",
",",
"err",
":=",
"w",
".",
"accountStateRefresh",
"(",
"... | // AccountSeqno is an override of remoter's AccountSeqno that uses
// the stored value. | [
"AccountSeqno",
"is",
"an",
"override",
"of",
"remoter",
"s",
"AccountSeqno",
"that",
"uses",
"the",
"stored",
"value",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L360-L367 |
160,315 | keybase/client | go/stellar/wallet_state.go | AccountSeqnoAndBump | func (w *WalletState) AccountSeqnoAndBump(ctx context.Context, accountID stellar1.AccountID) (uint64, error) {
w.Lock()
hasSeqnoLock := w.seqnoLockHeld
w.Unlock()
if !hasSeqnoLock {
return 0, errors.New("you must hold SeqnoLock() before AccountSeqnoAndBump")
}
a, err := w.accountStateRefresh(ctx, accountID, "Ac... | go | func (w *WalletState) AccountSeqnoAndBump(ctx context.Context, accountID stellar1.AccountID) (uint64, error) {
w.Lock()
hasSeqnoLock := w.seqnoLockHeld
w.Unlock()
if !hasSeqnoLock {
return 0, errors.New("you must hold SeqnoLock() before AccountSeqnoAndBump")
}
a, err := w.accountStateRefresh(ctx, accountID, "Ac... | [
"func",
"(",
"w",
"*",
"WalletState",
")",
"AccountSeqnoAndBump",
"(",
"ctx",
"context",
".",
"Context",
",",
"accountID",
"stellar1",
".",
"AccountID",
")",
"(",
"uint64",
",",
"error",
")",
"{",
"w",
".",
"Lock",
"(",
")",
"\n",
"hasSeqnoLock",
":=",
... | // AccountSeqnoAndBump gets the current seqno for an account and increments
// the stored value. | [
"AccountSeqnoAndBump",
"gets",
"the",
"current",
"seqno",
"for",
"an",
"account",
"and",
"increments",
"the",
"stored",
"value",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L371-L383 |
160,316 | keybase/client | go/stellar/wallet_state.go | Balances | func (w *WalletState) Balances(ctx context.Context, accountID stellar1.AccountID) ([]stellar1.Balance, error) {
a, ok := w.accountState(accountID)
if !ok {
// Balances is used frequently to get balances for other users,
// so if accountID isn't in WalletState, just use the remote
// to get the balances.
w.G()... | go | func (w *WalletState) Balances(ctx context.Context, accountID stellar1.AccountID) ([]stellar1.Balance, error) {
a, ok := w.accountState(accountID)
if !ok {
// Balances is used frequently to get balances for other users,
// so if accountID isn't in WalletState, just use the remote
// to get the balances.
w.G()... | [
"func",
"(",
"w",
"*",
"WalletState",
")",
"Balances",
"(",
"ctx",
"context",
".",
"Context",
",",
"accountID",
"stellar1",
".",
"AccountID",
")",
"(",
"[",
"]",
"stellar1",
".",
"Balance",
",",
"error",
")",
"{",
"a",
",",
"ok",
":=",
"w",
".",
"a... | // Balances is an override of remoter's Balances that uses stored data. | [
"Balances",
"is",
"an",
"override",
"of",
"remoter",
"s",
"Balances",
"that",
"uses",
"stored",
"data",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L386-L398 |
160,317 | keybase/client | go/stellar/wallet_state.go | Details | func (w *WalletState) Details(ctx context.Context, accountID stellar1.AccountID) (stellar1.AccountDetails, error) {
a, err := w.accountStateRefresh(ctx, accountID, "Details")
if err != nil {
return stellar1.AccountDetails{}, err
}
details, err := a.Details(ctx)
if err == nil && details.AccountID != accountID {
... | go | func (w *WalletState) Details(ctx context.Context, accountID stellar1.AccountID) (stellar1.AccountDetails, error) {
a, err := w.accountStateRefresh(ctx, accountID, "Details")
if err != nil {
return stellar1.AccountDetails{}, err
}
details, err := a.Details(ctx)
if err == nil && details.AccountID != accountID {
... | [
"func",
"(",
"w",
"*",
"WalletState",
")",
"Details",
"(",
"ctx",
"context",
".",
"Context",
",",
"accountID",
"stellar1",
".",
"AccountID",
")",
"(",
"stellar1",
".",
"AccountDetails",
",",
"error",
")",
"{",
"a",
",",
"err",
":=",
"w",
".",
"accountS... | // Details is an override of remoter's Details that uses stored data. | [
"Details",
"is",
"an",
"override",
"of",
"remoter",
"s",
"Details",
"that",
"uses",
"stored",
"data",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L401-L411 |
160,318 | keybase/client | go/stellar/wallet_state.go | PendingPayments | func (w *WalletState) PendingPayments(ctx context.Context, accountID stellar1.AccountID, limit int) ([]stellar1.PaymentSummary, error) {
a, err := w.accountStateRefresh(ctx, accountID, "PendingPayments")
if err != nil {
return nil, err
}
payments, err := a.PendingPayments(ctx, limit)
if err == nil {
w.G().Log.... | go | func (w *WalletState) PendingPayments(ctx context.Context, accountID stellar1.AccountID, limit int) ([]stellar1.PaymentSummary, error) {
a, err := w.accountStateRefresh(ctx, accountID, "PendingPayments")
if err != nil {
return nil, err
}
payments, err := a.PendingPayments(ctx, limit)
if err == nil {
w.G().Log.... | [
"func",
"(",
"w",
"*",
"WalletState",
")",
"PendingPayments",
"(",
"ctx",
"context",
".",
"Context",
",",
"accountID",
"stellar1",
".",
"AccountID",
",",
"limit",
"int",
")",
"(",
"[",
"]",
"stellar1",
".",
"PaymentSummary",
",",
"error",
")",
"{",
"a",
... | // PendingPayments is an override of remoter's PendingPayments that uses stored data. | [
"PendingPayments",
"is",
"an",
"override",
"of",
"remoter",
"s",
"PendingPayments",
"that",
"uses",
"stored",
"data",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L414-L427 |
160,319 | keybase/client | go/stellar/wallet_state.go | RecentPayments | func (w *WalletState) RecentPayments(ctx context.Context, accountID stellar1.AccountID, cursor *stellar1.PageCursor, limit int, skipPending bool) (stellar1.PaymentsPage, error) {
useAccountState := true
if limit != 0 && limit != 50 {
useAccountState = false
} else if cursor != nil {
useAccountState = false
} el... | go | func (w *WalletState) RecentPayments(ctx context.Context, accountID stellar1.AccountID, cursor *stellar1.PageCursor, limit int, skipPending bool) (stellar1.PaymentsPage, error) {
useAccountState := true
if limit != 0 && limit != 50 {
useAccountState = false
} else if cursor != nil {
useAccountState = false
} el... | [
"func",
"(",
"w",
"*",
"WalletState",
")",
"RecentPayments",
"(",
"ctx",
"context",
".",
"Context",
",",
"accountID",
"stellar1",
".",
"AccountID",
",",
"cursor",
"*",
"stellar1",
".",
"PageCursor",
",",
"limit",
"int",
",",
"skipPending",
"bool",
")",
"("... | // RecentPayments is an override of remoter's RecentPayments that uses stored data. | [
"RecentPayments",
"is",
"an",
"override",
"of",
"remoter",
"s",
"RecentPayments",
"that",
"uses",
"stored",
"data",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L430-L451 |
160,320 | keybase/client | go/stellar/wallet_state.go | AddPendingTx | func (w *WalletState) AddPendingTx(ctx context.Context, accountID stellar1.AccountID, txID stellar1.TransactionID, seqno uint64) error {
a, ok := w.accountState(accountID)
if !ok {
return fmt.Errorf("AddPendingTx: account id %q not in wallet state", accountID)
}
w.G().Log.CDebugf(ctx, "WalletState: account %s ad... | go | func (w *WalletState) AddPendingTx(ctx context.Context, accountID stellar1.AccountID, txID stellar1.TransactionID, seqno uint64) error {
a, ok := w.accountState(accountID)
if !ok {
return fmt.Errorf("AddPendingTx: account id %q not in wallet state", accountID)
}
w.G().Log.CDebugf(ctx, "WalletState: account %s ad... | [
"func",
"(",
"w",
"*",
"WalletState",
")",
"AddPendingTx",
"(",
"ctx",
"context",
".",
"Context",
",",
"accountID",
"stellar1",
".",
"AccountID",
",",
"txID",
"stellar1",
".",
"TransactionID",
",",
"seqno",
"uint64",
")",
"error",
"{",
"a",
",",
"ok",
":... | // AddPendingTx adds information about a tx that was submitted to the network.
// This allows WalletState to keep track of anything pending when managing
// the account seqno. | [
"AddPendingTx",
"adds",
"information",
"about",
"a",
"tx",
"that",
"was",
"submitted",
"to",
"the",
"network",
".",
"This",
"allows",
"WalletState",
"to",
"keep",
"track",
"of",
"anything",
"pending",
"when",
"managing",
"the",
"account",
"seqno",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L456-L465 |
160,321 | keybase/client | go/stellar/wallet_state.go | SubmitPayment | func (w *WalletState) SubmitPayment(ctx context.Context, post stellar1.PaymentDirectPost) (stellar1.PaymentResult, error) {
w.Lock()
hasSeqnoLock := w.seqnoLockHeld
w.Unlock()
if !hasSeqnoLock {
return stellar1.PaymentResult{}, errors.New("you must hold SeqnoLock() before SubmitPayment")
}
return w.Remoter.Subm... | go | func (w *WalletState) SubmitPayment(ctx context.Context, post stellar1.PaymentDirectPost) (stellar1.PaymentResult, error) {
w.Lock()
hasSeqnoLock := w.seqnoLockHeld
w.Unlock()
if !hasSeqnoLock {
return stellar1.PaymentResult{}, errors.New("you must hold SeqnoLock() before SubmitPayment")
}
return w.Remoter.Subm... | [
"func",
"(",
"w",
"*",
"WalletState",
")",
"SubmitPayment",
"(",
"ctx",
"context",
".",
"Context",
",",
"post",
"stellar1",
".",
"PaymentDirectPost",
")",
"(",
"stellar1",
".",
"PaymentResult",
",",
"error",
")",
"{",
"w",
".",
"Lock",
"(",
")",
"\n",
... | // SubmitPayment is an override of remoter's SubmitPayment. | [
"SubmitPayment",
"is",
"an",
"override",
"of",
"remoter",
"s",
"SubmitPayment",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L481-L489 |
160,322 | keybase/client | go/stellar/wallet_state.go | SubmitRelayClaim | func (w *WalletState) SubmitRelayClaim(ctx context.Context, post stellar1.RelayClaimPost) (stellar1.RelayClaimResult, error) {
w.Lock()
hasSeqnoLock := w.seqnoLockHeld
w.Unlock()
if !hasSeqnoLock {
return stellar1.RelayClaimResult{}, errors.New("you must hold SeqnoLock() before SubmitRelayClaim")
}
result, err ... | go | func (w *WalletState) SubmitRelayClaim(ctx context.Context, post stellar1.RelayClaimPost) (stellar1.RelayClaimResult, error) {
w.Lock()
hasSeqnoLock := w.seqnoLockHeld
w.Unlock()
if !hasSeqnoLock {
return stellar1.RelayClaimResult{}, errors.New("you must hold SeqnoLock() before SubmitRelayClaim")
}
result, err ... | [
"func",
"(",
"w",
"*",
"WalletState",
")",
"SubmitRelayClaim",
"(",
"ctx",
"context",
".",
"Context",
",",
"post",
"stellar1",
".",
"RelayClaimPost",
")",
"(",
"stellar1",
".",
"RelayClaimResult",
",",
"error",
")",
"{",
"w",
".",
"Lock",
"(",
")",
"\n",... | // SubmitRelayClaim is an override of remoter's SubmitRelayClaim. | [
"SubmitRelayClaim",
"is",
"an",
"override",
"of",
"remoter",
"s",
"SubmitRelayClaim",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L503-L519 |
160,323 | keybase/client | go/stellar/wallet_state.go | MarkAsRead | func (w *WalletState) MarkAsRead(ctx context.Context, accountID stellar1.AccountID, mostRecentID stellar1.TransactionID) error {
err := w.Remoter.MarkAsRead(ctx, accountID, mostRecentID)
if err == nil {
mctx := libkb.NewMetaContext(ctx, w.G())
if rerr := w.RefreshAsync(mctx, accountID, "MarkAsRead"); rerr != nil ... | go | func (w *WalletState) MarkAsRead(ctx context.Context, accountID stellar1.AccountID, mostRecentID stellar1.TransactionID) error {
err := w.Remoter.MarkAsRead(ctx, accountID, mostRecentID)
if err == nil {
mctx := libkb.NewMetaContext(ctx, w.G())
if rerr := w.RefreshAsync(mctx, accountID, "MarkAsRead"); rerr != nil ... | [
"func",
"(",
"w",
"*",
"WalletState",
")",
"MarkAsRead",
"(",
"ctx",
"context",
".",
"Context",
",",
"accountID",
"stellar1",
".",
"AccountID",
",",
"mostRecentID",
"stellar1",
".",
"TransactionID",
")",
"error",
"{",
"err",
":=",
"w",
".",
"Remoter",
".",... | // MarkAsRead is an override of remoter's MarkAsRead. | [
"MarkAsRead",
"is",
"an",
"override",
"of",
"remoter",
"s",
"MarkAsRead",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L522-L531 |
160,324 | keybase/client | go/stellar/wallet_state.go | ExchangeRate | func (w *WalletState) ExchangeRate(ctx context.Context, currency string) (stellar1.OutsideExchangeRate, error) {
w.Lock()
existing, ok := w.rates[currency]
w.Unlock()
age := time.Since(existing.ctime)
if ok && age < 1*time.Minute {
w.G().Log.CDebugf(ctx, "using cached value for ExchangeRate(%s) => %+v (%s old)",... | go | func (w *WalletState) ExchangeRate(ctx context.Context, currency string) (stellar1.OutsideExchangeRate, error) {
w.Lock()
existing, ok := w.rates[currency]
w.Unlock()
age := time.Since(existing.ctime)
if ok && age < 1*time.Minute {
w.G().Log.CDebugf(ctx, "using cached value for ExchangeRate(%s) => %+v (%s old)",... | [
"func",
"(",
"w",
"*",
"WalletState",
")",
"ExchangeRate",
"(",
"ctx",
"context",
".",
"Context",
",",
"currency",
"string",
")",
"(",
"stellar1",
".",
"OutsideExchangeRate",
",",
"error",
")",
"{",
"w",
".",
"Lock",
"(",
")",
"\n",
"existing",
",",
"o... | // ExchangeRate is an overrider of remoter's ExchangeRate. | [
"ExchangeRate",
"is",
"an",
"overrider",
"of",
"remoter",
"s",
"ExchangeRate",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L540-L574 |
160,325 | keybase/client | go/stellar/wallet_state.go | DumpToLog | func (w *WalletState) DumpToLog(mctx libkb.MetaContext) {
mctx.Debug(w.String())
} | go | func (w *WalletState) DumpToLog(mctx libkb.MetaContext) {
mctx.Debug(w.String())
} | [
"func",
"(",
"w",
"*",
"WalletState",
")",
"DumpToLog",
"(",
"mctx",
"libkb",
".",
"MetaContext",
")",
"{",
"mctx",
".",
"Debug",
"(",
"w",
".",
"String",
"(",
")",
")",
"\n",
"}"
] | // DumpToLog outputs a summary of WalletState to the debug log. | [
"DumpToLog",
"outputs",
"a",
"summary",
"of",
"WalletState",
"to",
"the",
"debug",
"log",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L577-L579 |
160,326 | keybase/client | go/stellar/wallet_state.go | String | func (w *WalletState) String() string {
w.Lock()
defer w.Unlock()
var pieces []string
for _, acctState := range w.accounts {
pieces = append(pieces, acctState.String())
}
return fmt.Sprintf("WalletState (# accts: %d): %s", len(w.accounts), strings.Join(pieces, ", "))
} | go | func (w *WalletState) String() string {
w.Lock()
defer w.Unlock()
var pieces []string
for _, acctState := range w.accounts {
pieces = append(pieces, acctState.String())
}
return fmt.Sprintf("WalletState (# accts: %d): %s", len(w.accounts), strings.Join(pieces, ", "))
} | [
"func",
"(",
"w",
"*",
"WalletState",
")",
"String",
"(",
")",
"string",
"{",
"w",
".",
"Lock",
"(",
")",
"\n",
"defer",
"w",
".",
"Unlock",
"(",
")",
"\n",
"var",
"pieces",
"[",
"]",
"string",
"\n",
"for",
"_",
",",
"acctState",
":=",
"range",
... | // String returns a string representation of WalletState suitable for debug
// logging. | [
"String",
"returns",
"a",
"string",
"representation",
"of",
"WalletState",
"suitable",
"for",
"debug",
"logging",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L583-L592 |
160,327 | keybase/client | go/stellar/wallet_state.go | Reset | func (w *WalletState) Reset(mctx libkb.MetaContext) {
w.Lock()
defer w.Unlock()
w.resetWithLock(mctx)
} | go | func (w *WalletState) Reset(mctx libkb.MetaContext) {
w.Lock()
defer w.Unlock()
w.resetWithLock(mctx)
} | [
"func",
"(",
"w",
"*",
"WalletState",
")",
"Reset",
"(",
"mctx",
"libkb",
".",
"MetaContext",
")",
"{",
"w",
".",
"Lock",
"(",
")",
"\n",
"defer",
"w",
".",
"Unlock",
"(",
")",
"\n",
"w",
".",
"resetWithLock",
"(",
"mctx",
")",
"\n",
"}"
] | // Reset clears all the data in the WalletState. | [
"Reset",
"clears",
"all",
"the",
"data",
"in",
"the",
"WalletState",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L595-L599 |
160,328 | keybase/client | go/stellar/wallet_state.go | Refresh | func (a *AccountState) Refresh(mctx libkb.MetaContext, router *libkb.NotifyRouter, reason string) error {
_, err := a.refreshGroup.Do("Refresh", func() (interface{}, error) {
doErr := a.refresh(mctx, router, reason)
return nil, doErr
})
return err
} | go | func (a *AccountState) Refresh(mctx libkb.MetaContext, router *libkb.NotifyRouter, reason string) error {
_, err := a.refreshGroup.Do("Refresh", func() (interface{}, error) {
doErr := a.refresh(mctx, router, reason)
return nil, doErr
})
return err
} | [
"func",
"(",
"a",
"*",
"AccountState",
")",
"Refresh",
"(",
"mctx",
"libkb",
".",
"MetaContext",
",",
"router",
"*",
"libkb",
".",
"NotifyRouter",
",",
"reason",
"string",
")",
"error",
"{",
"_",
",",
"err",
":=",
"a",
".",
"refreshGroup",
".",
"Do",
... | // Refresh updates all the data for this account from the server. | [
"Refresh",
"updates",
"all",
"the",
"data",
"for",
"this",
"account",
"from",
"the",
"server",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L654-L660 |
160,329 | keybase/client | go/stellar/wallet_state.go | AccountSeqno | func (a *AccountState) AccountSeqno(ctx context.Context) (uint64, error) {
a.RLock()
defer a.RUnlock()
return a.seqno, nil
} | go | func (a *AccountState) AccountSeqno(ctx context.Context) (uint64, error) {
a.RLock()
defer a.RUnlock()
return a.seqno, nil
} | [
"func",
"(",
"a",
"*",
"AccountState",
")",
"AccountSeqno",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"uint64",
",",
"error",
")",
"{",
"a",
".",
"RLock",
"(",
")",
"\n",
"defer",
"a",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"a",
".",
"s... | // AccountSeqno returns the seqno that has already been fetched for
// this account. | [
"AccountSeqno",
"returns",
"the",
"seqno",
"that",
"has",
"already",
"been",
"fetched",
"for",
"this",
"account",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L798-L802 |
160,330 | keybase/client | go/stellar/wallet_state.go | AccountSeqnoAndBump | func (a *AccountState) AccountSeqnoAndBump(ctx context.Context) (uint64, error) {
a.Lock()
defer a.Unlock()
result := a.seqno
// need to keep track that we are going to use this seqno
// in a tx. This record keeping avoids a race where
// multiple seqno providers rushing to use seqnos before
// AddPendingTx is... | go | func (a *AccountState) AccountSeqnoAndBump(ctx context.Context) (uint64, error) {
a.Lock()
defer a.Unlock()
result := a.seqno
// need to keep track that we are going to use this seqno
// in a tx. This record keeping avoids a race where
// multiple seqno providers rushing to use seqnos before
// AddPendingTx is... | [
"func",
"(",
"a",
"*",
"AccountState",
")",
"AccountSeqnoAndBump",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"uint64",
",",
"error",
")",
"{",
"a",
".",
"Lock",
"(",
")",
"\n",
"defer",
"a",
".",
"Unlock",
"(",
")",
"\n",
"result",
":=",
"a"... | // AccountSeqnoAndBump returns the seqno that has already been fetched for
// this account. It bumps the seqno up by one. | [
"AccountSeqnoAndBump",
"returns",
"the",
"seqno",
"that",
"has",
"already",
"been",
"fetched",
"for",
"this",
"account",
".",
"It",
"bumps",
"the",
"seqno",
"up",
"by",
"one",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L806-L819 |
160,331 | keybase/client | go/stellar/wallet_state.go | AddPendingTx | func (a *AccountState) AddPendingTx(ctx context.Context, txID stellar1.TransactionID, seqno uint64) error {
a.Lock()
defer a.Unlock()
// remove the inuse seqno since the pendingTx will track it now
delete(a.inuseSeqnos, seqno)
a.pendingTxs[txID] = txPending{seqno: seqno, ctime: time.Now()}
return nil
} | go | func (a *AccountState) AddPendingTx(ctx context.Context, txID stellar1.TransactionID, seqno uint64) error {
a.Lock()
defer a.Unlock()
// remove the inuse seqno since the pendingTx will track it now
delete(a.inuseSeqnos, seqno)
a.pendingTxs[txID] = txPending{seqno: seqno, ctime: time.Now()}
return nil
} | [
"func",
"(",
"a",
"*",
"AccountState",
")",
"AddPendingTx",
"(",
"ctx",
"context",
".",
"Context",
",",
"txID",
"stellar1",
".",
"TransactionID",
",",
"seqno",
"uint64",
")",
"error",
"{",
"a",
".",
"Lock",
"(",
")",
"\n",
"defer",
"a",
".",
"Unlock",
... | // AddPendingTx adds information about a tx that was submitted to the network.
// This allows AccountState to keep track of anything pending when managing
// the account seqno. | [
"AddPendingTx",
"adds",
"information",
"about",
"a",
"tx",
"that",
"was",
"submitted",
"to",
"the",
"network",
".",
"This",
"allows",
"AccountState",
"to",
"keep",
"track",
"of",
"anything",
"pending",
"when",
"managing",
"the",
"account",
"seqno",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L824-L834 |
160,332 | keybase/client | go/stellar/wallet_state.go | RemovePendingTx | func (a *AccountState) RemovePendingTx(ctx context.Context, txID stellar1.TransactionID) error {
a.Lock()
defer a.Unlock()
delete(a.pendingTxs, txID)
return nil
} | go | func (a *AccountState) RemovePendingTx(ctx context.Context, txID stellar1.TransactionID) error {
a.Lock()
defer a.Unlock()
delete(a.pendingTxs, txID)
return nil
} | [
"func",
"(",
"a",
"*",
"AccountState",
")",
"RemovePendingTx",
"(",
"ctx",
"context",
".",
"Context",
",",
"txID",
"stellar1",
".",
"TransactionID",
")",
"error",
"{",
"a",
".",
"Lock",
"(",
")",
"\n",
"defer",
"a",
".",
"Unlock",
"(",
")",
"\n\n",
"... | // RemovePendingTx removes a pending tx from WalletState. It doesn't matter
// if it succeeded or failed, just that it is done. | [
"RemovePendingTx",
"removes",
"a",
"pending",
"tx",
"from",
"WalletState",
".",
"It",
"doesn",
"t",
"matter",
"if",
"it",
"succeeded",
"or",
"failed",
"just",
"that",
"it",
"is",
"done",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L838-L845 |
160,333 | keybase/client | go/stellar/wallet_state.go | Balances | func (a *AccountState) Balances(ctx context.Context) ([]stellar1.Balance, error) {
a.RLock()
defer a.RUnlock()
a.enqueueRefreshReq()
return a.balances, nil
} | go | func (a *AccountState) Balances(ctx context.Context) ([]stellar1.Balance, error) {
a.RLock()
defer a.RUnlock()
a.enqueueRefreshReq()
return a.balances, nil
} | [
"func",
"(",
"a",
"*",
"AccountState",
")",
"Balances",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"[",
"]",
"stellar1",
".",
"Balance",
",",
"error",
")",
"{",
"a",
".",
"RLock",
"(",
")",
"\n",
"defer",
"a",
".",
"RUnlock",
"(",
")",
"\n"... | // Balances returns the balances that have already been fetched for
// this account. | [
"Balances",
"returns",
"the",
"balances",
"that",
"have",
"already",
"been",
"fetched",
"for",
"this",
"account",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L849-L854 |
160,334 | keybase/client | go/stellar/wallet_state.go | Details | func (a *AccountState) Details(ctx context.Context) (stellar1.AccountDetails, error) {
a.RLock()
defer a.RUnlock()
a.enqueueRefreshReq()
if a.details == nil {
return stellar1.AccountDetails{AccountID: a.accountID}, nil
}
return *a.details, nil
} | go | func (a *AccountState) Details(ctx context.Context) (stellar1.AccountDetails, error) {
a.RLock()
defer a.RUnlock()
a.enqueueRefreshReq()
if a.details == nil {
return stellar1.AccountDetails{AccountID: a.accountID}, nil
}
return *a.details, nil
} | [
"func",
"(",
"a",
"*",
"AccountState",
")",
"Details",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"stellar1",
".",
"AccountDetails",
",",
"error",
")",
"{",
"a",
".",
"RLock",
"(",
")",
"\n",
"defer",
"a",
".",
"RUnlock",
"(",
")",
"\n",
"a",... | // Details returns the account details that have already been fetched for this account. | [
"Details",
"returns",
"the",
"account",
"details",
"that",
"have",
"already",
"been",
"fetched",
"for",
"this",
"account",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L857-L865 |
160,335 | keybase/client | go/stellar/wallet_state.go | PendingPayments | func (a *AccountState) PendingPayments(ctx context.Context, limit int) ([]stellar1.PaymentSummary, error) {
a.RLock()
defer a.RUnlock()
a.enqueueRefreshReq()
if limit > 0 && limit < len(a.pending) {
return a.pending[:limit], nil
}
return a.pending, nil
} | go | func (a *AccountState) PendingPayments(ctx context.Context, limit int) ([]stellar1.PaymentSummary, error) {
a.RLock()
defer a.RUnlock()
a.enqueueRefreshReq()
if limit > 0 && limit < len(a.pending) {
return a.pending[:limit], nil
}
return a.pending, nil
} | [
"func",
"(",
"a",
"*",
"AccountState",
")",
"PendingPayments",
"(",
"ctx",
"context",
".",
"Context",
",",
"limit",
"int",
")",
"(",
"[",
"]",
"stellar1",
".",
"PaymentSummary",
",",
"error",
")",
"{",
"a",
".",
"RLock",
"(",
")",
"\n",
"defer",
"a",... | // PendingPayments returns the pending payments that have already been fetched for
// this account. | [
"PendingPayments",
"returns",
"the",
"pending",
"payments",
"that",
"have",
"already",
"been",
"fetched",
"for",
"this",
"account",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L869-L877 |
160,336 | keybase/client | go/stellar/wallet_state.go | RecentPayments | func (a *AccountState) RecentPayments(ctx context.Context) (stellar1.PaymentsPage, error) {
a.RLock()
defer a.RUnlock()
a.enqueueRefreshReq()
if a.recent == nil {
return stellar1.PaymentsPage{}, nil
}
return *a.recent, nil
} | go | func (a *AccountState) RecentPayments(ctx context.Context) (stellar1.PaymentsPage, error) {
a.RLock()
defer a.RUnlock()
a.enqueueRefreshReq()
if a.recent == nil {
return stellar1.PaymentsPage{}, nil
}
return *a.recent, nil
} | [
"func",
"(",
"a",
"*",
"AccountState",
")",
"RecentPayments",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"stellar1",
".",
"PaymentsPage",
",",
"error",
")",
"{",
"a",
".",
"RLock",
"(",
")",
"\n",
"defer",
"a",
".",
"RUnlock",
"(",
")",
"\n",
... | // RecentPayments returns the recent payments that have already been fetched for
// this account. | [
"RecentPayments",
"returns",
"the",
"recent",
"payments",
"that",
"have",
"already",
"been",
"fetched",
"for",
"this",
"account",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L881-L889 |
160,337 | keybase/client | go/stellar/wallet_state.go | Reset | func (a *AccountState) Reset(mctx libkb.MetaContext) {
a.Lock()
defer a.Unlock()
a.refreshReqs = nil
a.done = true
} | go | func (a *AccountState) Reset(mctx libkb.MetaContext) {
a.Lock()
defer a.Unlock()
a.refreshReqs = nil
a.done = true
} | [
"func",
"(",
"a",
"*",
"AccountState",
")",
"Reset",
"(",
"mctx",
"libkb",
".",
"MetaContext",
")",
"{",
"a",
".",
"Lock",
"(",
")",
"\n",
"defer",
"a",
".",
"Unlock",
"(",
")",
"\n\n",
"a",
".",
"refreshReqs",
"=",
"nil",
"\n",
"a",
".",
"done",... | // Reset sets the refreshReqs channel to nil so nothing will be put on it. | [
"Reset",
"sets",
"the",
"refreshReqs",
"channel",
"to",
"nil",
"so",
"nothing",
"will",
"be",
"put",
"on",
"it",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L892-L898 |
160,338 | keybase/client | go/stellar/wallet_state.go | String | func (a *AccountState) String() string {
a.RLock()
defer a.RUnlock()
if a.recent != nil {
return fmt.Sprintf("%s (seqno: %d, balances: %d, pending: %d, payments: %d)", a.accountID, a.seqno, len(a.balances), len(a.pending), len(a.recent.Payments))
}
return fmt.Sprintf("%s (seqno: %d, balances: %d, pending: %d, pa... | go | func (a *AccountState) String() string {
a.RLock()
defer a.RUnlock()
if a.recent != nil {
return fmt.Sprintf("%s (seqno: %d, balances: %d, pending: %d, payments: %d)", a.accountID, a.seqno, len(a.balances), len(a.pending), len(a.recent.Payments))
}
return fmt.Sprintf("%s (seqno: %d, balances: %d, pending: %d, pa... | [
"func",
"(",
"a",
"*",
"AccountState",
")",
"String",
"(",
")",
"string",
"{",
"a",
".",
"RLock",
"(",
")",
"\n",
"defer",
"a",
".",
"RUnlock",
"(",
")",
"\n",
"if",
"a",
".",
"recent",
"!=",
"nil",
"{",
"return",
"fmt",
".",
"Sprintf",
"(",
"\... | // String returns a small string representation of AccountState suitable for
// debug logging. | [
"String",
"returns",
"a",
"small",
"string",
"representation",
"of",
"AccountState",
"suitable",
"for",
"debug",
"logging",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/stellar/wallet_state.go#L902-L909 |
160,339 | keybase/client | go/kbfs/libgit/ephemeral_git_config_with_fixed_pack_window.go | PackfileWriter | func (e *ephemeralGitConfigWithFixedPackWindow) PackfileWriter(
ch plumbing.StatusChan) (io.WriteCloser, error) {
return e.pfWriter.PackfileWriter(ch)
} | go | func (e *ephemeralGitConfigWithFixedPackWindow) PackfileWriter(
ch plumbing.StatusChan) (io.WriteCloser, error) {
return e.pfWriter.PackfileWriter(ch)
} | [
"func",
"(",
"e",
"*",
"ephemeralGitConfigWithFixedPackWindow",
")",
"PackfileWriter",
"(",
"ch",
"plumbing",
".",
"StatusChan",
")",
"(",
"io",
".",
"WriteCloser",
",",
"error",
")",
"{",
"return",
"e",
".",
"pfWriter",
".",
"PackfileWriter",
"(",
"ch",
")"... | // PackfileWriter implements the `storer.PackfileWriter` interface. | [
"PackfileWriter",
"implements",
"the",
"storer",
".",
"PackfileWriter",
"interface",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libgit/ephemeral_git_config_with_fixed_pack_window.go#L35-L38 |
160,340 | keybase/client | go/kbfs/libgit/ephemeral_git_config_with_fixed_pack_window.go | Config | func (e *ephemeralGitConfigWithFixedPackWindow) Config() (
*gogitcfg.Config, error) {
cfg, err := e.Storer.Config()
if err != nil {
return nil, err
}
cfg.Pack.Window = e.packWindow
return cfg, nil
} | go | func (e *ephemeralGitConfigWithFixedPackWindow) Config() (
*gogitcfg.Config, error) {
cfg, err := e.Storer.Config()
if err != nil {
return nil, err
}
cfg.Pack.Window = e.packWindow
return cfg, nil
} | [
"func",
"(",
"e",
"*",
"ephemeralGitConfigWithFixedPackWindow",
")",
"Config",
"(",
")",
"(",
"*",
"gogitcfg",
".",
"Config",
",",
"error",
")",
"{",
"cfg",
",",
"err",
":=",
"e",
".",
"Storer",
".",
"Config",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil"... | // Config implements the `storer.Storer` interface. | [
"Config",
"implements",
"the",
"storer",
".",
"Storer",
"interface",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libgit/ephemeral_git_config_with_fixed_pack_window.go#L41-L49 |
160,341 | keybase/client | go/kbfs/libgit/ephemeral_git_config_with_fixed_pack_window.go | ForEachObjectHash | func (e *ephemeralGitConfigWithFixedPackWindow) ForEachObjectHash(
f func(plumbing.Hash) error) error {
return e.los.ForEachObjectHash(f)
} | go | func (e *ephemeralGitConfigWithFixedPackWindow) ForEachObjectHash(
f func(plumbing.Hash) error) error {
return e.los.ForEachObjectHash(f)
} | [
"func",
"(",
"e",
"*",
"ephemeralGitConfigWithFixedPackWindow",
")",
"ForEachObjectHash",
"(",
"f",
"func",
"(",
"plumbing",
".",
"Hash",
")",
"error",
")",
"error",
"{",
"return",
"e",
".",
"los",
".",
"ForEachObjectHash",
"(",
"f",
")",
"\n",
"}"
] | // ForEachObjectHash implements the `storer.LooseObjectStorer` interface. | [
"ForEachObjectHash",
"implements",
"the",
"storer",
".",
"LooseObjectStorer",
"interface",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libgit/ephemeral_git_config_with_fixed_pack_window.go#L60-L63 |
160,342 | keybase/client | go/kbfs/libgit/ephemeral_git_config_with_fixed_pack_window.go | LooseObjectTime | func (e *ephemeralGitConfigWithFixedPackWindow) LooseObjectTime(
h plumbing.Hash) (time.Time, error) {
return e.los.LooseObjectTime(h)
} | go | func (e *ephemeralGitConfigWithFixedPackWindow) LooseObjectTime(
h plumbing.Hash) (time.Time, error) {
return e.los.LooseObjectTime(h)
} | [
"func",
"(",
"e",
"*",
"ephemeralGitConfigWithFixedPackWindow",
")",
"LooseObjectTime",
"(",
"h",
"plumbing",
".",
"Hash",
")",
"(",
"time",
".",
"Time",
",",
"error",
")",
"{",
"return",
"e",
".",
"los",
".",
"LooseObjectTime",
"(",
"h",
")",
"\n",
"}"
... | // LooseObjectHash implements the `storer.LooseObjectStorer` interface. | [
"LooseObjectHash",
"implements",
"the",
"storer",
".",
"LooseObjectStorer",
"interface",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libgit/ephemeral_git_config_with_fixed_pack_window.go#L66-L69 |
160,343 | keybase/client | go/kbfs/libgit/ephemeral_git_config_with_fixed_pack_window.go | DeleteLooseObject | func (e *ephemeralGitConfigWithFixedPackWindow) DeleteLooseObject(
h plumbing.Hash) error {
return e.los.DeleteLooseObject(h)
} | go | func (e *ephemeralGitConfigWithFixedPackWindow) DeleteLooseObject(
h plumbing.Hash) error {
return e.los.DeleteLooseObject(h)
} | [
"func",
"(",
"e",
"*",
"ephemeralGitConfigWithFixedPackWindow",
")",
"DeleteLooseObject",
"(",
"h",
"plumbing",
".",
"Hash",
")",
"error",
"{",
"return",
"e",
".",
"los",
".",
"DeleteLooseObject",
"(",
"h",
")",
"\n",
"}"
] | // DeleteLooseObject implements the `storer.LooseObjectStorer` interface. | [
"DeleteLooseObject",
"implements",
"the",
"storer",
".",
"LooseObjectStorer",
"interface",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libgit/ephemeral_git_config_with_fixed_pack_window.go#L72-L75 |
160,344 | keybase/client | go/kbfs/libgit/ephemeral_git_config_with_fixed_pack_window.go | DeleteOldObjectPackAndIndex | func (e *ephemeralGitConfigWithFixedPackWindow) DeleteOldObjectPackAndIndex(
h plumbing.Hash, t time.Time) error {
return e.pos.DeleteOldObjectPackAndIndex(h, t)
} | go | func (e *ephemeralGitConfigWithFixedPackWindow) DeleteOldObjectPackAndIndex(
h plumbing.Hash, t time.Time) error {
return e.pos.DeleteOldObjectPackAndIndex(h, t)
} | [
"func",
"(",
"e",
"*",
"ephemeralGitConfigWithFixedPackWindow",
")",
"DeleteOldObjectPackAndIndex",
"(",
"h",
"plumbing",
".",
"Hash",
",",
"t",
"time",
".",
"Time",
")",
"error",
"{",
"return",
"e",
".",
"pos",
".",
"DeleteOldObjectPackAndIndex",
"(",
"h",
",... | // DeleteOldObjectPackAndIndex implements the
// `storer.PackedObjectStorer` interface. | [
"DeleteOldObjectPackAndIndex",
"implements",
"the",
"storer",
".",
"PackedObjectStorer",
"interface",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libgit/ephemeral_git_config_with_fixed_pack_window.go#L85-L88 |
160,345 | keybase/client | go/kbfs/favorites/data_types.go | NewFolderFromProtocol | func NewFolderFromProtocol(folder keybase1.Folder) *Folder {
name := folder.Name
if !folder.Private {
// Old versions of the client still use an outdated "#public"
// suffix for favorited public folders. TODO: remove this once
// those old versions of the client are retired.
const oldPublicSuffix = tlf.Reader... | go | func NewFolderFromProtocol(folder keybase1.Folder) *Folder {
name := folder.Name
if !folder.Private {
// Old versions of the client still use an outdated "#public"
// suffix for favorited public folders. TODO: remove this once
// those old versions of the client are retired.
const oldPublicSuffix = tlf.Reader... | [
"func",
"NewFolderFromProtocol",
"(",
"folder",
"keybase1",
".",
"Folder",
")",
"*",
"Folder",
"{",
"name",
":=",
"folder",
".",
"Name",
"\n",
"if",
"!",
"folder",
".",
"Private",
"{",
"// Old versions of the client still use an outdated \"#public\"",
"// suffix for f... | // NewFolderFromProtocol creates a Folder from a
// keybase1.Folder. | [
"NewFolderFromProtocol",
"creates",
"a",
"Folder",
"from",
"a",
"keybase1",
".",
"Folder",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/favorites/data_types.go#L22-L62 |
160,346 | keybase/client | go/kbfs/favorites/data_types.go | ToKBFolder | func (f Folder) ToKBFolder(created bool) keybase1.Folder {
return keybase1.Folder{
Name: f.Name,
FolderType: f.Type.FolderType(),
Private: f.Type != tlf.Public, // deprecated
Created: created,
}
} | go | func (f Folder) ToKBFolder(created bool) keybase1.Folder {
return keybase1.Folder{
Name: f.Name,
FolderType: f.Type.FolderType(),
Private: f.Type != tlf.Public, // deprecated
Created: created,
}
} | [
"func",
"(",
"f",
"Folder",
")",
"ToKBFolder",
"(",
"created",
"bool",
")",
"keybase1",
".",
"Folder",
"{",
"return",
"keybase1",
".",
"Folder",
"{",
"Name",
":",
"f",
".",
"Name",
",",
"FolderType",
":",
"f",
".",
"Type",
".",
"FolderType",
"(",
")"... | // ToKBFolder creates a keybase1.Folder from a Folder. | [
"ToKBFolder",
"creates",
"a",
"keybase1",
".",
"Folder",
"from",
"a",
"Folder",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/favorites/data_types.go#L65-L72 |
160,347 | keybase/client | go/kbfs/favorites/data_types.go | DataFrom | func DataFrom(folder keybase1.Folder) Data {
return Data{
Name: folder.Name,
FolderType: folder.FolderType,
Private: folder.Private,
TeamID: folder.TeamID,
}
} | go | func DataFrom(folder keybase1.Folder) Data {
return Data{
Name: folder.Name,
FolderType: folder.FolderType,
Private: folder.Private,
TeamID: folder.TeamID,
}
} | [
"func",
"DataFrom",
"(",
"folder",
"keybase1",
".",
"Folder",
")",
"Data",
"{",
"return",
"Data",
"{",
"Name",
":",
"folder",
".",
"Name",
",",
"FolderType",
":",
"folder",
".",
"FolderType",
",",
"Private",
":",
"folder",
".",
"Private",
",",
"TeamID",
... | // DataFrom returns auxiliary data from a folder sent via the
// keybase1 protocol. | [
"DataFrom",
"returns",
"auxiliary",
"data",
"from",
"a",
"folder",
"sent",
"via",
"the",
"keybase1",
"protocol",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/favorites/data_types.go#L85-L92 |
160,348 | keybase/client | go/kbfs/favorites/data_types.go | ToKBFolder | func (ta ToAdd) ToKBFolder() keybase1.Folder {
return ta.Folder.ToKBFolder(ta.Created)
} | go | func (ta ToAdd) ToKBFolder() keybase1.Folder {
return ta.Folder.ToKBFolder(ta.Created)
} | [
"func",
"(",
"ta",
"ToAdd",
")",
"ToKBFolder",
"(",
")",
"keybase1",
".",
"Folder",
"{",
"return",
"ta",
".",
"Folder",
".",
"ToKBFolder",
"(",
"ta",
".",
"Created",
")",
"\n",
"}"
] | // ToKBFolder converts this data into an object suitable for the
// keybase1 protocol. | [
"ToKBFolder",
"converts",
"this",
"data",
"into",
"an",
"object",
"suitable",
"for",
"the",
"keybase1",
"protocol",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/favorites/data_types.go#L108-L110 |
160,349 | keybase/client | go/kbfs/libkbfs/block_util.go | putBlockToServer | func putBlockToServer(
ctx context.Context, bserv BlockServer, tlfID tlf.ID,
blockPtr data.BlockPointer, readyBlockData data.ReadyBlockData,
cacheType DiskBlockCacheType) error {
var err error
if blockPtr.RefNonce == kbfsblock.ZeroRefNonce {
err = bserv.Put(ctx, tlfID, blockPtr.ID, blockPtr.Context,
readyBloc... | go | func putBlockToServer(
ctx context.Context, bserv BlockServer, tlfID tlf.ID,
blockPtr data.BlockPointer, readyBlockData data.ReadyBlockData,
cacheType DiskBlockCacheType) error {
var err error
if blockPtr.RefNonce == kbfsblock.ZeroRefNonce {
err = bserv.Put(ctx, tlfID, blockPtr.ID, blockPtr.Context,
readyBloc... | [
"func",
"putBlockToServer",
"(",
"ctx",
"context",
".",
"Context",
",",
"bserv",
"BlockServer",
",",
"tlfID",
"tlf",
".",
"ID",
",",
"blockPtr",
"data",
".",
"BlockPointer",
",",
"readyBlockData",
"data",
".",
"ReadyBlockData",
",",
"cacheType",
"DiskBlockCacheT... | // putBlockToServer either puts the full block to the block server, or
// just adds a reference, depending on the refnonce in blockPtr. | [
"putBlockToServer",
"either",
"puts",
"the",
"full",
"block",
"to",
"the",
"block",
"server",
"or",
"just",
"adds",
"a",
"reference",
"depending",
"on",
"the",
"refnonce",
"in",
"blockPtr",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/block_util.go#L29-L44 |
160,350 | keybase/client | go/kbfs/libdokan/symlink.go | GetFileInformation | func (s *Symlink) GetFileInformation(ctx context.Context, fi *dokan.FileInfo) (a *dokan.Stat, err error) {
s.parent.folder.fs.logEnter(ctx, "Symlink GetFileInformation")
defer func() { s.parent.folder.reportErr(ctx, libkbfs.ReadMode, err) }()
_, _, err = s.parent.folder.fs.config.KBFSOps().Lookup(ctx, s.parent.node... | go | func (s *Symlink) GetFileInformation(ctx context.Context, fi *dokan.FileInfo) (a *dokan.Stat, err error) {
s.parent.folder.fs.logEnter(ctx, "Symlink GetFileInformation")
defer func() { s.parent.folder.reportErr(ctx, libkbfs.ReadMode, err) }()
_, _, err = s.parent.folder.fs.config.KBFSOps().Lookup(ctx, s.parent.node... | [
"func",
"(",
"s",
"*",
"Symlink",
")",
"GetFileInformation",
"(",
"ctx",
"context",
".",
"Context",
",",
"fi",
"*",
"dokan",
".",
"FileInfo",
")",
"(",
"a",
"*",
"dokan",
".",
"Stat",
",",
"err",
"error",
")",
"{",
"s",
".",
"parent",
".",
"folder"... | // GetFileInformation does stat for dokan. | [
"GetFileInformation",
"does",
"stat",
"for",
"dokan",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libdokan/symlink.go#L29-L42 |
160,351 | keybase/client | go/protocol/keybase1/config.go | CheckAPIServerOutOfDateWarning | func (c ConfigClient) CheckAPIServerOutOfDateWarning(ctx context.Context) (res OutOfDateInfo, err error) {
err = c.Cli.Call(ctx, "keybase.1.config.checkAPIServerOutOfDateWarning", []interface{}{CheckAPIServerOutOfDateWarningArg{}}, &res)
return
} | go | func (c ConfigClient) CheckAPIServerOutOfDateWarning(ctx context.Context) (res OutOfDateInfo, err error) {
err = c.Cli.Call(ctx, "keybase.1.config.checkAPIServerOutOfDateWarning", []interface{}{CheckAPIServerOutOfDateWarningArg{}}, &res)
return
} | [
"func",
"(",
"c",
"ConfigClient",
")",
"CheckAPIServerOutOfDateWarning",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"res",
"OutOfDateInfo",
",",
"err",
"error",
")",
"{",
"err",
"=",
"c",
".",
"Cli",
".",
"Call",
"(",
"ctx",
",",
"\"",
"\"",
",",... | // Check whether the API server has told us we're out of date. | [
"Check",
"whether",
"the",
"API",
"server",
"has",
"told",
"us",
"we",
"re",
"out",
"of",
"date",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/config.go#L1105-L1108 |
160,352 | keybase/client | go/protocol/keybase1/config.go | WaitForClient | func (c ConfigClient) WaitForClient(ctx context.Context, __arg WaitForClientArg) (res bool, err error) {
err = c.Cli.Call(ctx, "keybase.1.config.waitForClient", []interface{}{__arg}, &res)
return
} | go | func (c ConfigClient) WaitForClient(ctx context.Context, __arg WaitForClientArg) (res bool, err error) {
err = c.Cli.Call(ctx, "keybase.1.config.waitForClient", []interface{}{__arg}, &res)
return
} | [
"func",
"(",
"c",
"ConfigClient",
")",
"WaitForClient",
"(",
"ctx",
"context",
".",
"Context",
",",
"__arg",
"WaitForClientArg",
")",
"(",
"res",
"bool",
",",
"err",
"error",
")",
"{",
"err",
"=",
"c",
".",
"Cli",
".",
"Call",
"(",
"ctx",
",",
"\"",
... | // Wait for client type to connect to service. | [
"Wait",
"for",
"client",
"type",
"to",
"connect",
"to",
"service",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/config.go#L1121-L1124 |
160,353 | keybase/client | go/protocol/keybase1/config.go | GetUpdateInfo2 | func (c ConfigClient) GetUpdateInfo2(ctx context.Context, __arg GetUpdateInfo2Arg) (res UpdateInfo2, err error) {
err = c.Cli.Call(ctx, "keybase.1.config.getUpdateInfo2", []interface{}{__arg}, &res)
return
} | go | func (c ConfigClient) GetUpdateInfo2(ctx context.Context, __arg GetUpdateInfo2Arg) (res UpdateInfo2, err error) {
err = c.Cli.Call(ctx, "keybase.1.config.getUpdateInfo2", []interface{}{__arg}, &res)
return
} | [
"func",
"(",
"c",
"ConfigClient",
")",
"GetUpdateInfo2",
"(",
"ctx",
"context",
".",
"Context",
",",
"__arg",
"GetUpdateInfo2Arg",
")",
"(",
"res",
"UpdateInfo2",
",",
"err",
"error",
")",
"{",
"err",
"=",
"c",
".",
"Cli",
".",
"Call",
"(",
"ctx",
",",... | // getUpdateInfo2 is to drive the redbar on mobile and desktop apps. The redbar tells you if
// you are critically out of date. | [
"getUpdateInfo2",
"is",
"to",
"drive",
"the",
"redbar",
"on",
"mobile",
"and",
"desktop",
"apps",
".",
"The",
"redbar",
"tells",
"you",
"if",
"you",
"are",
"critically",
"out",
"of",
"date",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/protocol/keybase1/config.go#L1145-L1148 |
160,354 | keybase/client | go/ephemeral/device_ek.go | allActiveDeviceEKMetadata | func allActiveDeviceEKMetadata(mctx libkb.MetaContext, merkleRoot libkb.MerkleRoot) (metadata map[keybase1.DeviceID]keybase1.DeviceEkMetadata, err error) {
defer mctx.TraceTimed("allActiveDeviceEKMetadata", func() error { return err })()
maybeStale, err := allDeviceEKMetadataMaybeStale(mctx, merkleRoot)
if err != n... | go | func allActiveDeviceEKMetadata(mctx libkb.MetaContext, merkleRoot libkb.MerkleRoot) (metadata map[keybase1.DeviceID]keybase1.DeviceEkMetadata, err error) {
defer mctx.TraceTimed("allActiveDeviceEKMetadata", func() error { return err })()
maybeStale, err := allDeviceEKMetadataMaybeStale(mctx, merkleRoot)
if err != n... | [
"func",
"allActiveDeviceEKMetadata",
"(",
"mctx",
"libkb",
".",
"MetaContext",
",",
"merkleRoot",
"libkb",
".",
"MerkleRoot",
")",
"(",
"metadata",
"map",
"[",
"keybase1",
".",
"DeviceID",
"]",
"keybase1",
".",
"DeviceEkMetadata",
",",
"err",
"error",
")",
"{"... | // allActiveDeviceEKMetadata fetches the latest deviceEK for each of your
// devices, filtering out the ones that are stale. | [
"allActiveDeviceEKMetadata",
"fetches",
"the",
"latest",
"deviceEK",
"for",
"each",
"of",
"your",
"devices",
"filtering",
"out",
"the",
"ones",
"that",
"are",
"stale",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/ephemeral/device_ek.go#L234-L255 |
160,355 | keybase/client | go/kbfs/libgit/repo.go | castNoSuchNameError | func castNoSuchNameError(err error, repoName string) error {
switch errors.Cause(err).(type) {
case idutil.NoSuchNameError:
return libkb.RepoDoesntExistError{
Name: repoName,
}
default:
return err
}
} | go | func castNoSuchNameError(err error, repoName string) error {
switch errors.Cause(err).(type) {
case idutil.NoSuchNameError:
return libkb.RepoDoesntExistError{
Name: repoName,
}
default:
return err
}
} | [
"func",
"castNoSuchNameError",
"(",
"err",
"error",
",",
"repoName",
"string",
")",
"error",
"{",
"switch",
"errors",
".",
"Cause",
"(",
"err",
")",
".",
"(",
"type",
")",
"{",
"case",
"idutil",
".",
"NoSuchNameError",
":",
"return",
"libkb",
".",
"RepoD... | // For the common "repo doesn't exist" case, use the error type that the client can recognize. | [
"For",
"the",
"common",
"repo",
"doesn",
"t",
"exist",
"case",
"use",
"the",
"error",
"type",
"that",
"the",
"client",
"can",
"recognize",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libgit/repo.go#L83-L92 |
160,356 | keybase/client | go/kbfs/libgit/repo.go | CleanOldDeletedRepos | func CleanOldDeletedRepos(
ctx context.Context, config libkbfs.Config,
tlfHandle *tlfhandle.Handle) (err error) {
fs, err := libfs.NewFS(
ctx, config, tlfHandle, data.MasterBranch,
path.Join(kbfsRepoDir, kbfsDeletedReposDir),
"" /* uniq ID isn't used for removals */, keybase1.MDPriorityGit)
switch errors.Caus... | go | func CleanOldDeletedRepos(
ctx context.Context, config libkbfs.Config,
tlfHandle *tlfhandle.Handle) (err error) {
fs, err := libfs.NewFS(
ctx, config, tlfHandle, data.MasterBranch,
path.Join(kbfsRepoDir, kbfsDeletedReposDir),
"" /* uniq ID isn't used for removals */, keybase1.MDPriorityGit)
switch errors.Caus... | [
"func",
"CleanOldDeletedRepos",
"(",
"ctx",
"context",
".",
"Context",
",",
"config",
"libkbfs",
".",
"Config",
",",
"tlfHandle",
"*",
"tlfhandle",
".",
"Handle",
")",
"(",
"err",
"error",
")",
"{",
"fs",
",",
"err",
":=",
"libfs",
".",
"NewFS",
"(",
"... | // CleanOldDeletedRepos completely removes any "deleted" repos that
// have been deleted for longer than `minDeletedAgeForCleaning`. The
// caller is responsible for syncing any data to disk, if desired. | [
"CleanOldDeletedRepos",
"completely",
"removes",
"any",
"deleted",
"repos",
"that",
"have",
"been",
"deleted",
"for",
"longer",
"than",
"minDeletedAgeForCleaning",
".",
"The",
"caller",
"is",
"responsible",
"for",
"syncing",
"any",
"data",
"to",
"disk",
"if",
"des... | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libgit/repo.go#L97-L160 |
160,357 | keybase/client | go/kbfs/libgit/repo.go | UpdateRepoMD | func UpdateRepoMD(ctx context.Context, config libkbfs.Config,
tlfHandle *tlfhandle.Handle, fs billy.Filesystem,
pushType keybase1.GitPushType,
oldRepoName string, refDataByName RefDataByName) error {
folder := tlfHandle.ToFavorite().ToKBFolder(false)
// Get the user-formatted repo name.
f, err := fs.Open(kbfsCon... | go | func UpdateRepoMD(ctx context.Context, config libkbfs.Config,
tlfHandle *tlfhandle.Handle, fs billy.Filesystem,
pushType keybase1.GitPushType,
oldRepoName string, refDataByName RefDataByName) error {
folder := tlfHandle.ToFavorite().ToKBFolder(false)
// Get the user-formatted repo name.
f, err := fs.Open(kbfsCon... | [
"func",
"UpdateRepoMD",
"(",
"ctx",
"context",
".",
"Context",
",",
"config",
"libkbfs",
".",
"Config",
",",
"tlfHandle",
"*",
"tlfhandle",
".",
"Handle",
",",
"fs",
"billy",
".",
"Filesystem",
",",
"pushType",
"keybase1",
".",
"GitPushType",
",",
"oldRepoNa... | // UpdateRepoMD lets the Keybase service know that a repo's MD has
// been updated. | [
"UpdateRepoMD",
"lets",
"the",
"Keybase",
"service",
"know",
"that",
"a",
"repo",
"s",
"MD",
"has",
"been",
"updated",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libgit/repo.go#L185-L249 |
160,358 | keybase/client | go/kbfs/libgit/repo.go | GetOrCreateRepoAndID | func GetOrCreateRepoAndID(
ctx context.Context, config libkbfs.Config, tlfHandle *tlfhandle.Handle,
repoName string, uniqID string) (*libfs.FS, ID, error) {
return getOrCreateRepoAndID(
ctx, config, tlfHandle, repoName, uniqID, getOrCreate)
} | go | func GetOrCreateRepoAndID(
ctx context.Context, config libkbfs.Config, tlfHandle *tlfhandle.Handle,
repoName string, uniqID string) (*libfs.FS, ID, error) {
return getOrCreateRepoAndID(
ctx, config, tlfHandle, repoName, uniqID, getOrCreate)
} | [
"func",
"GetOrCreateRepoAndID",
"(",
"ctx",
"context",
".",
"Context",
",",
"config",
"libkbfs",
".",
"Config",
",",
"tlfHandle",
"*",
"tlfhandle",
".",
"Handle",
",",
"repoName",
"string",
",",
"uniqID",
"string",
")",
"(",
"*",
"libfs",
".",
"FS",
",",
... | // GetOrCreateRepoAndID returns a filesystem object rooted at the
// specified repo, along with the stable repo ID. If the repo hasn't
// been created yet, it generates a new ID and creates the repo. The
// caller is responsible for syncing the FS and flushing the journal,
// if desired. | [
"GetOrCreateRepoAndID",
"returns",
"a",
"filesystem",
"object",
"rooted",
"at",
"the",
"specified",
"repo",
"along",
"with",
"the",
"stable",
"repo",
"ID",
".",
"If",
"the",
"repo",
"hasn",
"t",
"been",
"created",
"yet",
"it",
"generates",
"a",
"new",
"ID",
... | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libgit/repo.go#L532-L537 |
160,359 | keybase/client | go/kbfs/libgit/repo.go | CreateRepoAndID | func CreateRepoAndID(
ctx context.Context, config libkbfs.Config, tlfHandle *tlfhandle.Handle,
repoName string) (ID, error) {
uniqID, err := makeUniqueID(ctx, config)
if err != nil {
return NullID, err
}
fs, id, err := getOrCreateRepoAndID(
ctx, config, tlfHandle, repoName, uniqID, createOnly)
if err != nil... | go | func CreateRepoAndID(
ctx context.Context, config libkbfs.Config, tlfHandle *tlfhandle.Handle,
repoName string) (ID, error) {
uniqID, err := makeUniqueID(ctx, config)
if err != nil {
return NullID, err
}
fs, id, err := getOrCreateRepoAndID(
ctx, config, tlfHandle, repoName, uniqID, createOnly)
if err != nil... | [
"func",
"CreateRepoAndID",
"(",
"ctx",
"context",
".",
"Context",
",",
"config",
"libkbfs",
".",
"Config",
",",
"tlfHandle",
"*",
"tlfhandle",
".",
"Handle",
",",
"repoName",
"string",
")",
"(",
"ID",
",",
"error",
")",
"{",
"uniqID",
",",
"err",
":=",
... | // CreateRepoAndID returns a new stable repo ID for the provided
// repoName in the given TLF. If the repo has already been created,
// it returns a `RepoAlreadyExistsError`. If `repoName` already
// exists, but is a symlink to another renamed directory, the symlink
// will be removed in favor of the new repo. The c... | [
"CreateRepoAndID",
"returns",
"a",
"new",
"stable",
"repo",
"ID",
"for",
"the",
"provided",
"repoName",
"in",
"the",
"given",
"TLF",
".",
"If",
"the",
"repo",
"has",
"already",
"been",
"created",
"it",
"returns",
"a",
"RepoAlreadyExistsError",
".",
"If",
"re... | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libgit/repo.go#L567-L585 |
160,360 | keybase/client | go/kbfs/libgit/repo.go | DeleteRepo | func DeleteRepo(
ctx context.Context, config libkbfs.Config, tlfHandle *tlfhandle.Handle,
repoName string) error {
// Create a unique ID using the verifying key and the `config`
// object, which should be unique to each call in practice.
session, err := config.KBPKI().GetCurrentSession(ctx)
if err != nil {
retu... | go | func DeleteRepo(
ctx context.Context, config libkbfs.Config, tlfHandle *tlfhandle.Handle,
repoName string) error {
// Create a unique ID using the verifying key and the `config`
// object, which should be unique to each call in practice.
session, err := config.KBPKI().GetCurrentSession(ctx)
if err != nil {
retu... | [
"func",
"DeleteRepo",
"(",
"ctx",
"context",
".",
"Context",
",",
"config",
"libkbfs",
".",
"Config",
",",
"tlfHandle",
"*",
"tlfhandle",
".",
"Handle",
",",
"repoName",
"string",
")",
"error",
"{",
"// Create a unique ID using the verifying key and the `config`",
"... | // DeleteRepo "deletes" the given repo in the given TLF. Right now it
// simply moves the repo out of the way to a special directory, to
// allow any concurrent writers to finish their pushes without
// triggering conflict resolution. The caller is responsible for
// syncing the FS and flushing the journal, if desire... | [
"DeleteRepo",
"deletes",
"the",
"given",
"repo",
"in",
"the",
"given",
"TLF",
".",
"Right",
"now",
"it",
"simply",
"moves",
"the",
"repo",
"out",
"of",
"the",
"way",
"to",
"a",
"special",
"directory",
"to",
"allow",
"any",
"concurrent",
"writers",
"to",
... | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libgit/repo.go#L593-L636 |
160,361 | keybase/client | go/kbfs/libgit/repo.go | NeedsGC | func NeedsGC(storage storage.Storer, options GCOptions) (
doPackRefs bool, numLooseRefs int, doPruneLoose, doObjectRepack bool,
numObjectPacks int, err error) {
numLooseRefs, err = storage.CountLooseRefs()
if err != nil {
return false, 0, false, false, 0, err
}
doPackRefs = numLooseRefs > options.MaxLooseRefs
... | go | func NeedsGC(storage storage.Storer, options GCOptions) (
doPackRefs bool, numLooseRefs int, doPruneLoose, doObjectRepack bool,
numObjectPacks int, err error) {
numLooseRefs, err = storage.CountLooseRefs()
if err != nil {
return false, 0, false, false, 0, err
}
doPackRefs = numLooseRefs > options.MaxLooseRefs
... | [
"func",
"NeedsGC",
"(",
"storage",
"storage",
".",
"Storer",
",",
"options",
"GCOptions",
")",
"(",
"doPackRefs",
"bool",
",",
"numLooseRefs",
"int",
",",
"doPruneLoose",
",",
"doObjectRepack",
"bool",
",",
"numObjectPacks",
"int",
",",
"err",
"error",
")",
... | // NeedsGC checks the given repo storage layer against the given
// options to see what kinds of GC are needed on the repo. | [
"NeedsGC",
"checks",
"the",
"given",
"repo",
"storage",
"layer",
"against",
"the",
"given",
"options",
"to",
"see",
"what",
"kinds",
"of",
"GC",
"are",
"needed",
"on",
"the",
"repo",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libgit/repo.go#L853-L906 |
160,362 | keybase/client | go/kbfs/libgit/repo.go | LastGCTime | func LastGCTime(ctx context.Context, fs billy.Filesystem) (
time.Time, error) {
fi, err := fs.Stat(repoGCLockFileName)
if os.IsNotExist(err) {
return time.Time{}, nil
} else if err != nil {
return time.Time{}, err
}
return fi.ModTime(), nil
} | go | func LastGCTime(ctx context.Context, fs billy.Filesystem) (
time.Time, error) {
fi, err := fs.Stat(repoGCLockFileName)
if os.IsNotExist(err) {
return time.Time{}, nil
} else if err != nil {
return time.Time{}, err
}
return fi.ModTime(), nil
} | [
"func",
"LastGCTime",
"(",
"ctx",
"context",
".",
"Context",
",",
"fs",
"billy",
".",
"Filesystem",
")",
"(",
"time",
".",
"Time",
",",
"error",
")",
"{",
"fi",
",",
"err",
":=",
"fs",
".",
"Stat",
"(",
"repoGCLockFileName",
")",
"\n",
"if",
"os",
... | // LastGCTime returns the last time the repo was successfully
// garbage-collected. | [
"LastGCTime",
"returns",
"the",
"last",
"time",
"the",
"repo",
"was",
"successfully",
"garbage",
"-",
"collected",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libgit/repo.go#L1084-L1094 |
160,363 | keybase/client | go/kbfs/libkbfs/prefetcher.go | shutdownLoop | func (p *blockPrefetcher) shutdownLoop() {
top:
for {
select {
case chInterface := <-p.inFlightFetches.Out():
ch := chInterface.(<-chan error)
<-ch
case <-p.shutdownCh:
break top
}
}
for p.inFlightFetches.Len() > 0 {
chInterface := <-p.inFlightFetches.Out()
ch := chInterface.(<-chan error)
<-c... | go | func (p *blockPrefetcher) shutdownLoop() {
top:
for {
select {
case chInterface := <-p.inFlightFetches.Out():
ch := chInterface.(<-chan error)
<-ch
case <-p.shutdownCh:
break top
}
}
for p.inFlightFetches.Len() > 0 {
chInterface := <-p.inFlightFetches.Out()
ch := chInterface.(<-chan error)
<-c... | [
"func",
"(",
"p",
"*",
"blockPrefetcher",
")",
"shutdownLoop",
"(",
")",
"{",
"top",
":",
"for",
"{",
"select",
"{",
"case",
"chInterface",
":=",
"<-",
"p",
".",
"inFlightFetches",
".",
"Out",
"(",
")",
":",
"ch",
":=",
"chInterface",
".",
"(",
"<-",... | // shutdownLoop tracks in-flight requests | [
"shutdownLoop",
"tracks",
"in",
"-",
"flight",
"requests"
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/prefetcher.go#L577-L594 |
160,364 | keybase/client | go/kbfs/libkbfs/prefetcher.go | calculatePriority | func (p *blockPrefetcher) calculatePriority(
basePriority int, action BlockRequestAction) int {
// A prefetched, non-deep-synced child always gets throttled for
// now, until we fix the database performance issues.
if basePriority > throttleRequestPriority && !action.DeepSync() {
basePriority = throttleRequestPri... | go | func (p *blockPrefetcher) calculatePriority(
basePriority int, action BlockRequestAction) int {
// A prefetched, non-deep-synced child always gets throttled for
// now, until we fix the database performance issues.
if basePriority > throttleRequestPriority && !action.DeepSync() {
basePriority = throttleRequestPri... | [
"func",
"(",
"p",
"*",
"blockPrefetcher",
")",
"calculatePriority",
"(",
"basePriority",
"int",
",",
"action",
"BlockRequestAction",
")",
"int",
"{",
"// A prefetched, non-deep-synced child always gets throttled for",
"// now, until we fix the database performance issues.",
"if",... | // calculatePriority returns either a base priority for an unsynced TLF or a
// high priority for a synced TLF. | [
"calculatePriority",
"returns",
"either",
"a",
"base",
"priority",
"for",
"an",
"unsynced",
"TLF",
"or",
"a",
"high",
"priority",
"for",
"a",
"synced",
"TLF",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/prefetcher.go#L598-L606 |
160,365 | keybase/client | go/kbfs/libkbfs/prefetcher.go | request | func (p *blockPrefetcher) request(ctx context.Context, priority int,
kmd libkey.KeyMetadata, info data.BlockInfo, block data.Block,
lifetime data.BlockCacheLifetime, parentPtr data.BlockPointer,
isParentNew bool, action BlockRequestAction,
idsSeen map[kbfsblock.ID]bool) (
numBlocks int, numBytesFetched, numBytesTo... | go | func (p *blockPrefetcher) request(ctx context.Context, priority int,
kmd libkey.KeyMetadata, info data.BlockInfo, block data.Block,
lifetime data.BlockCacheLifetime, parentPtr data.BlockPointer,
isParentNew bool, action BlockRequestAction,
idsSeen map[kbfsblock.ID]bool) (
numBlocks int, numBytesFetched, numBytesTo... | [
"func",
"(",
"p",
"*",
"blockPrefetcher",
")",
"request",
"(",
"ctx",
"context",
".",
"Context",
",",
"priority",
"int",
",",
"kmd",
"libkey",
".",
"KeyMetadata",
",",
"info",
"data",
".",
"BlockInfo",
",",
"block",
"data",
".",
"Block",
",",
"lifetime",... | // request maps the parent->child block relationship in the prefetcher, and it
// triggers child prefetches that aren't already in progress. | [
"request",
"maps",
"the",
"parent",
"-",
">",
"child",
"block",
"relationship",
"in",
"the",
"prefetcher",
"and",
"it",
"triggers",
"child",
"prefetches",
"that",
"aren",
"t",
"already",
"in",
"progress",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/prefetcher.go#L610-L684 |
160,366 | keybase/client | go/kbfs/libkbfs/prefetcher.go | handleCriticalRequests | func (p *blockPrefetcher) handleCriticalRequests() {
for {
// Fulfill any status requests since the user could be waiting
// for them.
select {
case req := <-p.prefetchStatusCh.Out():
p.handleStatusRequest(req.(*prefetchStatusRequest))
default:
return
}
}
} | go | func (p *blockPrefetcher) handleCriticalRequests() {
for {
// Fulfill any status requests since the user could be waiting
// for them.
select {
case req := <-p.prefetchStatusCh.Out():
p.handleStatusRequest(req.(*prefetchStatusRequest))
default:
return
}
}
} | [
"func",
"(",
"p",
"*",
"blockPrefetcher",
")",
"handleCriticalRequests",
"(",
")",
"{",
"for",
"{",
"// Fulfill any status requests since the user could be waiting",
"// for them.",
"select",
"{",
"case",
"req",
":=",
"<-",
"p",
".",
"prefetchStatusCh",
".",
"Out",
... | // handleCriticalRequests should be called periodically during any
// long prefetch requests, to make sure we handle critical requests
// quickly. These are requests that are required to be run in the
// main processing goroutine, but won't interfere with whatever
// request we're in the middle of. | [
"handleCriticalRequests",
"should",
"be",
"called",
"periodically",
"during",
"any",
"long",
"prefetch",
"requests",
"to",
"make",
"sure",
"we",
"handle",
"critical",
"requests",
"quickly",
".",
"These",
"are",
"requests",
"that",
"are",
"required",
"to",
"be",
... | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/prefetcher.go#L700-L711 |
160,367 | keybase/client | go/kbfs/libkbfs/prefetcher.go | ProcessBlockForPrefetch | func (p *blockPrefetcher) ProcessBlockForPrefetch(ctx context.Context,
ptr data.BlockPointer, block data.Block, kmd libkey.KeyMetadata, priority int,
lifetime data.BlockCacheLifetime, prefetchStatus PrefetchStatus,
action BlockRequestAction) {
req := &prefetchRequest{
ptr, block.GetEncodedSize(), block.NewEmptier... | go | func (p *blockPrefetcher) ProcessBlockForPrefetch(ctx context.Context,
ptr data.BlockPointer, block data.Block, kmd libkey.KeyMetadata, priority int,
lifetime data.BlockCacheLifetime, prefetchStatus PrefetchStatus,
action BlockRequestAction) {
req := &prefetchRequest{
ptr, block.GetEncodedSize(), block.NewEmptier... | [
"func",
"(",
"p",
"*",
"blockPrefetcher",
")",
"ProcessBlockForPrefetch",
"(",
"ctx",
"context",
".",
"Context",
",",
"ptr",
"data",
".",
"BlockPointer",
",",
"block",
"data",
".",
"Block",
",",
"kmd",
"libkey",
".",
"KeyMetadata",
",",
"priority",
"int",
... | // ProcessBlockForPrefetch triggers a prefetch if appropriate. | [
"ProcessBlockForPrefetch",
"triggers",
"a",
"prefetch",
"if",
"appropriate",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/prefetcher.go#L1438-L1466 |
160,368 | keybase/client | go/kbfs/libkbfs/prefetcher.go | WaitChannelForBlockPrefetch | func (p *blockPrefetcher) WaitChannelForBlockPrefetch(
ctx context.Context, ptr data.BlockPointer) (
waitCh <-chan struct{}, err error) {
c := make(chan (<-chan struct{}), 1)
req := &prefetchRequest{
ptr, 0, nil, nil, 0, data.TransientEntry, 0, BlockRequestSolo, c, nil,
false}
select {
case p.prefetchRequest... | go | func (p *blockPrefetcher) WaitChannelForBlockPrefetch(
ctx context.Context, ptr data.BlockPointer) (
waitCh <-chan struct{}, err error) {
c := make(chan (<-chan struct{}), 1)
req := &prefetchRequest{
ptr, 0, nil, nil, 0, data.TransientEntry, 0, BlockRequestSolo, c, nil,
false}
select {
case p.prefetchRequest... | [
"func",
"(",
"p",
"*",
"blockPrefetcher",
")",
"WaitChannelForBlockPrefetch",
"(",
"ctx",
"context",
".",
"Context",
",",
"ptr",
"data",
".",
"BlockPointer",
")",
"(",
"waitCh",
"<-",
"chan",
"struct",
"{",
"}",
",",
"err",
"error",
")",
"{",
"c",
":=",
... | // WaitChannelForBlockPrefetch implements the Prefetcher interface for
// blockPrefetcher. | [
"WaitChannelForBlockPrefetch",
"implements",
"the",
"Prefetcher",
"interface",
"for",
"blockPrefetcher",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/prefetcher.go#L1472-L1496 |
160,369 | keybase/client | go/kbfs/libkbfs/prefetcher.go | Status | func (p *blockPrefetcher) Status(ctx context.Context, ptr data.BlockPointer) (
PrefetchProgress, error) {
c := make(chan PrefetchProgress, 1)
req := &prefetchStatusRequest{ptr, c}
select {
case p.prefetchStatusCh.In() <- req:
case <-p.shutdownCh:
return PrefetchProgress{}, errPrefetcherAlreadyShutDown
case <-... | go | func (p *blockPrefetcher) Status(ctx context.Context, ptr data.BlockPointer) (
PrefetchProgress, error) {
c := make(chan PrefetchProgress, 1)
req := &prefetchStatusRequest{ptr, c}
select {
case p.prefetchStatusCh.In() <- req:
case <-p.shutdownCh:
return PrefetchProgress{}, errPrefetcherAlreadyShutDown
case <-... | [
"func",
"(",
"p",
"*",
"blockPrefetcher",
")",
"Status",
"(",
"ctx",
"context",
".",
"Context",
",",
"ptr",
"data",
".",
"BlockPointer",
")",
"(",
"PrefetchProgress",
",",
"error",
")",
"{",
"c",
":=",
"make",
"(",
"chan",
"PrefetchProgress",
",",
"1",
... | // Status implements the Prefetcher interface for
// blockPrefetcher. | [
"Status",
"implements",
"the",
"Prefetcher",
"interface",
"for",
"blockPrefetcher",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/prefetcher.go#L1500-L1521 |
160,370 | keybase/client | go/kbfs/libkbfs/prefetcher.go | OverallSyncStatus | func (p *blockPrefetcher) OverallSyncStatus() PrefetchProgress {
p.overallSyncStatusLock.RLock()
defer p.overallSyncStatusLock.RUnlock()
return p.overallSyncStatus
} | go | func (p *blockPrefetcher) OverallSyncStatus() PrefetchProgress {
p.overallSyncStatusLock.RLock()
defer p.overallSyncStatusLock.RUnlock()
return p.overallSyncStatus
} | [
"func",
"(",
"p",
"*",
"blockPrefetcher",
")",
"OverallSyncStatus",
"(",
")",
"PrefetchProgress",
"{",
"p",
".",
"overallSyncStatusLock",
".",
"RLock",
"(",
")",
"\n",
"defer",
"p",
".",
"overallSyncStatusLock",
".",
"RUnlock",
"(",
")",
"\n",
"return",
"p",... | // OverallSyncStatus implements the Prefetcher interface for
// blockPrefetcher. | [
"OverallSyncStatus",
"implements",
"the",
"Prefetcher",
"interface",
"for",
"blockPrefetcher",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/prefetcher.go#L1525-L1529 |
160,371 | keybase/client | go/kbfs/libkbfs/prefetcher.go | Shutdown | func (p *blockPrefetcher) Shutdown() <-chan struct{} {
p.shutdownOnce.Do(func() {
close(p.shutdownCh)
})
return p.doneCh
} | go | func (p *blockPrefetcher) Shutdown() <-chan struct{} {
p.shutdownOnce.Do(func() {
close(p.shutdownCh)
})
return p.doneCh
} | [
"func",
"(",
"p",
"*",
"blockPrefetcher",
")",
"Shutdown",
"(",
")",
"<-",
"chan",
"struct",
"{",
"}",
"{",
"p",
".",
"shutdownOnce",
".",
"Do",
"(",
"func",
"(",
")",
"{",
"close",
"(",
"p",
".",
"shutdownCh",
")",
"\n",
"}",
")",
"\n",
"return"... | // Shutdown implements the Prefetcher interface for blockPrefetcher. | [
"Shutdown",
"implements",
"the",
"Prefetcher",
"interface",
"for",
"blockPrefetcher",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/kbfs/libkbfs/prefetcher.go#L1566-L1571 |
160,372 | keybase/client | go/libkb/notify_router.go | NewNotifyRouter | func NewNotifyRouter(g *GlobalContext) *NotifyRouter {
return &NotifyRouter{
Contextified: NewContextified(g),
cm: g.ConnectionManager,
state: make(map[ConnectionID]keybase1.NotificationChannels),
listeners: make(map[NotifyListenerID]NotifyListener),
}
} | go | func NewNotifyRouter(g *GlobalContext) *NotifyRouter {
return &NotifyRouter{
Contextified: NewContextified(g),
cm: g.ConnectionManager,
state: make(map[ConnectionID]keybase1.NotificationChannels),
listeners: make(map[NotifyListenerID]NotifyListener),
}
} | [
"func",
"NewNotifyRouter",
"(",
"g",
"*",
"GlobalContext",
")",
"*",
"NotifyRouter",
"{",
"return",
"&",
"NotifyRouter",
"{",
"Contextified",
":",
"NewContextified",
"(",
"g",
")",
",",
"cm",
":",
"g",
".",
"ConnectionManager",
",",
"state",
":",
"make",
"... | // NewNotifyRouter makes a new notification router; we should only
// make one of these per process. | [
"NewNotifyRouter",
"makes",
"a",
"new",
"notification",
"router",
";",
"we",
"should",
"only",
"make",
"one",
"of",
"these",
"per",
"process",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/notify_router.go#L219-L226 |
160,373 | keybase/client | go/libkb/notify_router.go | GetChannels | func (n *NotifyRouter) GetChannels(i ConnectionID) keybase1.NotificationChannels {
return n.getNotificationChannels(i)
} | go | func (n *NotifyRouter) GetChannels(i ConnectionID) keybase1.NotificationChannels {
return n.getNotificationChannels(i)
} | [
"func",
"(",
"n",
"*",
"NotifyRouter",
")",
"GetChannels",
"(",
"i",
"ConnectionID",
")",
"keybase1",
".",
"NotificationChannels",
"{",
"return",
"n",
".",
"getNotificationChannels",
"(",
"i",
")",
"\n",
"}"
] | // GetChannels retrieves which notification channels a connection is interested it
// given its ID. | [
"GetChannels",
"retrieves",
"which",
"notification",
"channels",
"a",
"connection",
"is",
"interested",
"it",
"given",
"its",
"ID",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/notify_router.go#L258-L260 |
160,374 | keybase/client | go/libkb/notify_router.go | AddConnection | func (n *NotifyRouter) AddConnection(xp rpc.Transporter, ch chan error) ConnectionID {
if n == nil {
return 0
}
id := n.cm.AddConnection(xp, ch)
n.setNotificationChannels(id, keybase1.NotificationChannels{})
return id
} | go | func (n *NotifyRouter) AddConnection(xp rpc.Transporter, ch chan error) ConnectionID {
if n == nil {
return 0
}
id := n.cm.AddConnection(xp, ch)
n.setNotificationChannels(id, keybase1.NotificationChannels{})
return id
} | [
"func",
"(",
"n",
"*",
"NotifyRouter",
")",
"AddConnection",
"(",
"xp",
"rpc",
".",
"Transporter",
",",
"ch",
"chan",
"error",
")",
"ConnectionID",
"{",
"if",
"n",
"==",
"nil",
"{",
"return",
"0",
"\n",
"}",
"\n",
"id",
":=",
"n",
".",
"cm",
".",
... | // AddConnection should be called every time there's a new RPC connection
// established for this server. The caller should pass in the Transporter
// and also the channel that will get messages when the channel closes. | [
"AddConnection",
"should",
"be",
"called",
"every",
"time",
"there",
"s",
"a",
"new",
"RPC",
"connection",
"established",
"for",
"this",
"server",
".",
"The",
"caller",
"should",
"pass",
"in",
"the",
"Transporter",
"and",
"also",
"the",
"channel",
"that",
"w... | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/notify_router.go#L277-L284 |
160,375 | keybase/client | go/libkb/notify_router.go | SetChannels | func (n *NotifyRouter) SetChannels(i ConnectionID, nc keybase1.NotificationChannels) {
n.setNotificationChannels(i, nc)
} | go | func (n *NotifyRouter) SetChannels(i ConnectionID, nc keybase1.NotificationChannels) {
n.setNotificationChannels(i, nc)
} | [
"func",
"(",
"n",
"*",
"NotifyRouter",
")",
"SetChannels",
"(",
"i",
"ConnectionID",
",",
"nc",
"keybase1",
".",
"NotificationChannels",
")",
"{",
"n",
".",
"setNotificationChannels",
"(",
"i",
",",
"nc",
")",
"\n",
"}"
] | // SetChannels sets which notification channels are interested for the connection
// with the given connection ID. | [
"SetChannels",
"sets",
"which",
"notification",
"channels",
"are",
"interested",
"for",
"the",
"connection",
"with",
"the",
"given",
"connection",
"ID",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/notify_router.go#L288-L290 |
160,376 | keybase/client | go/libkb/notify_router.go | HandleLogout | func (n *NotifyRouter) HandleLogout(ctx context.Context) {
if n == nil {
return
}
defer CTrace(ctx, n.G().Log, "NotifyRouter#HandleLogout", func() error { return nil })()
ctx = CopyTagsToBackground(ctx)
// For all connections we currently have open...
n.cm.ApplyAllDetails(func(id ConnectionID, xp rpc.Transporte... | go | func (n *NotifyRouter) HandleLogout(ctx context.Context) {
if n == nil {
return
}
defer CTrace(ctx, n.G().Log, "NotifyRouter#HandleLogout", func() error { return nil })()
ctx = CopyTagsToBackground(ctx)
// For all connections we currently have open...
n.cm.ApplyAllDetails(func(id ConnectionID, xp rpc.Transporte... | [
"func",
"(",
"n",
"*",
"NotifyRouter",
")",
"HandleLogout",
"(",
"ctx",
"context",
".",
"Context",
")",
"{",
"if",
"n",
"==",
"nil",
"{",
"return",
"\n",
"}",
"\n",
"defer",
"CTrace",
"(",
"ctx",
",",
"n",
".",
"G",
"(",
")",
".",
"Log",
",",
"... | // HandleLogout is called whenever the current user logged out. It will broadcast
// the message to all connections who care about such a message. | [
"HandleLogout",
"is",
"called",
"whenever",
"the",
"current",
"user",
"logged",
"out",
".",
"It",
"will",
"broadcast",
"the",
"message",
"to",
"all",
"connections",
"who",
"care",
"about",
"such",
"a",
"message",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/notify_router.go#L294-L325 |
160,377 | keybase/client | go/libkb/notify_router.go | HandleLogin | func (n *NotifyRouter) HandleLogin(ctx context.Context, u string) {
if n == nil {
return
}
n.G().Log.CDebugf(ctx, "+ Sending login notification, as user %q", u)
// For all connections we currently have open...
ctx = CopyTagsToBackground(ctx)
n.cm.ApplyAll(func(id ConnectionID, xp rpc.Transporter) bool {
// If... | go | func (n *NotifyRouter) HandleLogin(ctx context.Context, u string) {
if n == nil {
return
}
n.G().Log.CDebugf(ctx, "+ Sending login notification, as user %q", u)
// For all connections we currently have open...
ctx = CopyTagsToBackground(ctx)
n.cm.ApplyAll(func(id ConnectionID, xp rpc.Transporter) bool {
// If... | [
"func",
"(",
"n",
"*",
"NotifyRouter",
")",
"HandleLogin",
"(",
"ctx",
"context",
".",
"Context",
",",
"u",
"string",
")",
"{",
"if",
"n",
"==",
"nil",
"{",
"return",
"\n",
"}",
"\n",
"n",
".",
"G",
"(",
")",
".",
"Log",
".",
"CDebugf",
"(",
"c... | // HandleLogin is called whenever a user logs in. It will broadcast
// the message to all connections who care about such a message. | [
"HandleLogin",
"is",
"called",
"whenever",
"a",
"user",
"logs",
"in",
".",
"It",
"will",
"broadcast",
"the",
"message",
"to",
"all",
"connections",
"who",
"care",
"about",
"such",
"a",
"message",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/notify_router.go#L329-L354 |
160,378 | keybase/client | go/libkb/notify_router.go | HandleTrackingChanged | func (n *NotifyRouter) HandleTrackingChanged(uid keybase1.UID, username NormalizedUsername, isTracking bool) {
if n == nil {
return
}
arg := keybase1.TrackingChangedArg{
Uid: uid,
Username: username.String(),
IsTracking: isTracking,
}
// For all connections we currently have open...
n.cm.ApplyAll... | go | func (n *NotifyRouter) HandleTrackingChanged(uid keybase1.UID, username NormalizedUsername, isTracking bool) {
if n == nil {
return
}
arg := keybase1.TrackingChangedArg{
Uid: uid,
Username: username.String(),
IsTracking: isTracking,
}
// For all connections we currently have open...
n.cm.ApplyAll... | [
"func",
"(",
"n",
"*",
"NotifyRouter",
")",
"HandleTrackingChanged",
"(",
"uid",
"keybase1",
".",
"UID",
",",
"username",
"NormalizedUsername",
",",
"isTracking",
"bool",
")",
"{",
"if",
"n",
"==",
"nil",
"{",
"return",
"\n",
"}",
"\n",
"arg",
":=",
"key... | // HandleTrackingChanged is called whenever we have a new tracking or
// untracking chain link related to a given user. It will broadcast the
// messages to all curious listeners.
// isTracking is set to true if current user is tracking uid. | [
"HandleTrackingChanged",
"is",
"called",
"whenever",
"we",
"have",
"a",
"new",
"tracking",
"or",
"untracking",
"chain",
"link",
"related",
"to",
"a",
"given",
"user",
".",
"It",
"will",
"broadcast",
"the",
"messages",
"to",
"all",
"curious",
"listeners",
".",
... | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/notify_router.go#L419-L445 |
160,379 | keybase/client | go/libkb/notify_router.go | HandleBadgeState | func (n *NotifyRouter) HandleBadgeState(badgeState keybase1.BadgeState) {
if n == nil {
return
}
n.G().Log.Debug("Sending BadgeState notification")
// For all connections we currently have open...
n.cm.ApplyAll(func(id ConnectionID, xp rpc.Transporter) bool {
// If the connection wants the `Badges` notificatio... | go | func (n *NotifyRouter) HandleBadgeState(badgeState keybase1.BadgeState) {
if n == nil {
return
}
n.G().Log.Debug("Sending BadgeState notification")
// For all connections we currently have open...
n.cm.ApplyAll(func(id ConnectionID, xp rpc.Transporter) bool {
// If the connection wants the `Badges` notificatio... | [
"func",
"(",
"n",
"*",
"NotifyRouter",
")",
"HandleBadgeState",
"(",
"badgeState",
"keybase1",
".",
"BadgeState",
")",
"{",
"if",
"n",
"==",
"nil",
"{",
"return",
"\n",
"}",
"\n",
"n",
".",
"G",
"(",
")",
".",
"Log",
".",
"Debug",
"(",
"\"",
"\"",
... | // HandleBadgeState is called whenever the badge state changes
// It will broadcast the messages to all curious listeners. | [
"HandleBadgeState",
"is",
"called",
"whenever",
"the",
"badge",
"state",
"changes",
"It",
"will",
"broadcast",
"the",
"messages",
"to",
"all",
"curious",
"listeners",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/notify_router.go#L449-L471 |
160,380 | keybase/client | go/libkb/notify_router.go | HandleFSOnlineStatusChanged | func (n *NotifyRouter) HandleFSOnlineStatusChanged(online bool) {
if n == nil {
return
}
// For all connections we currently have open...
n.cm.ApplyAll(func(id ConnectionID, xp rpc.Transporter) bool {
// If the connection wants the `kbfs` notification type
if n.getNotificationChannels(id).Kbfs {
// In the ... | go | func (n *NotifyRouter) HandleFSOnlineStatusChanged(online bool) {
if n == nil {
return
}
// For all connections we currently have open...
n.cm.ApplyAll(func(id ConnectionID, xp rpc.Transporter) bool {
// If the connection wants the `kbfs` notification type
if n.getNotificationChannels(id).Kbfs {
// In the ... | [
"func",
"(",
"n",
"*",
"NotifyRouter",
")",
"HandleFSOnlineStatusChanged",
"(",
"online",
"bool",
")",
"{",
"if",
"n",
"==",
"nil",
"{",
"return",
"\n",
"}",
"\n",
"// For all connections we currently have open...",
"n",
".",
"cm",
".",
"ApplyAll",
"(",
"func"... | // HandleFSOnlineStatusChanged is called when KBFS's online status changes. It
// will broadcast the messages to all curious listeners. | [
"HandleFSOnlineStatusChanged",
"is",
"called",
"when",
"KBFS",
"s",
"online",
"status",
"changes",
".",
"It",
"will",
"broadcast",
"the",
"messages",
"to",
"all",
"curious",
"listeners",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/notify_router.go#L475-L497 |
160,381 | keybase/client | go/libkb/notify_router.go | HandleFSOverallSyncStatusChanged | func (n *NotifyRouter) HandleFSOverallSyncStatusChanged(status keybase1.FolderSyncStatus) {
if n == nil {
return
}
// For all connections we currently have open...
n.cm.ApplyAll(func(id ConnectionID, xp rpc.Transporter) bool {
// If the connection wants the `kbfs` notification type
if n.getNotificationChannel... | go | func (n *NotifyRouter) HandleFSOverallSyncStatusChanged(status keybase1.FolderSyncStatus) {
if n == nil {
return
}
// For all connections we currently have open...
n.cm.ApplyAll(func(id ConnectionID, xp rpc.Transporter) bool {
// If the connection wants the `kbfs` notification type
if n.getNotificationChannel... | [
"func",
"(",
"n",
"*",
"NotifyRouter",
")",
"HandleFSOverallSyncStatusChanged",
"(",
"status",
"keybase1",
".",
"FolderSyncStatus",
")",
"{",
"if",
"n",
"==",
"nil",
"{",
"return",
"\n",
"}",
"\n",
"// For all connections we currently have open...",
"n",
".",
"cm"... | // HandleFSOverallSyncStatusChanged is called when the overall sync status
// changes. It will broadcast the messages to all curious listeners. | [
"HandleFSOverallSyncStatusChanged",
"is",
"called",
"when",
"the",
"overall",
"sync",
"status",
"changes",
".",
"It",
"will",
"broadcast",
"the",
"messages",
"to",
"all",
"curious",
"listeners",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/notify_router.go#L501-L523 |
160,382 | keybase/client | go/libkb/notify_router.go | HandleFSActivity | func (n *NotifyRouter) HandleFSActivity(activity keybase1.FSNotification) {
if n == nil {
return
}
// For all connections we currently have open...
n.cm.ApplyAll(func(id ConnectionID, xp rpc.Transporter) bool {
// If the connection wants the `Kbfsdesktop` notification type
if n.getNotificationChannels(id).Kbf... | go | func (n *NotifyRouter) HandleFSActivity(activity keybase1.FSNotification) {
if n == nil {
return
}
// For all connections we currently have open...
n.cm.ApplyAll(func(id ConnectionID, xp rpc.Transporter) bool {
// If the connection wants the `Kbfsdesktop` notification type
if n.getNotificationChannels(id).Kbf... | [
"func",
"(",
"n",
"*",
"NotifyRouter",
")",
"HandleFSActivity",
"(",
"activity",
"keybase1",
".",
"FSNotification",
")",
"{",
"if",
"n",
"==",
"nil",
"{",
"return",
"\n",
"}",
"\n",
"// For all connections we currently have open...",
"n",
".",
"cm",
".",
"Appl... | // HandleFSActivity is called for any KBFS notification. It will broadcast the messages
// to all curious listeners. | [
"HandleFSActivity",
"is",
"called",
"for",
"any",
"KBFS",
"notification",
".",
"It",
"will",
"broadcast",
"the",
"messages",
"to",
"all",
"curious",
"listeners",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/notify_router.go#L527-L548 |
160,383 | keybase/client | go/libkb/notify_router.go | HandleFSPathUpdated | func (n *NotifyRouter) HandleFSPathUpdated(path string) {
if n == nil {
return
}
// For all connections we currently have open...
n.cm.ApplyAll(func(id ConnectionID, xp rpc.Transporter) bool {
// If the connection wants the `Kbfs` notification type
if n.getNotificationChannels(id).Kbfs {
// In the backgrou... | go | func (n *NotifyRouter) HandleFSPathUpdated(path string) {
if n == nil {
return
}
// For all connections we currently have open...
n.cm.ApplyAll(func(id ConnectionID, xp rpc.Transporter) bool {
// If the connection wants the `Kbfs` notification type
if n.getNotificationChannels(id).Kbfs {
// In the backgrou... | [
"func",
"(",
"n",
"*",
"NotifyRouter",
")",
"HandleFSPathUpdated",
"(",
"path",
"string",
")",
"{",
"if",
"n",
"==",
"nil",
"{",
"return",
"\n",
"}",
"\n",
"// For all connections we currently have open...",
"n",
".",
"cm",
".",
"ApplyAll",
"(",
"func",
"(",... | // HandleFSPathUpdated is called for any path update notification. It
// will broadcast the messages to all curious listeners. | [
"HandleFSPathUpdated",
"is",
"called",
"for",
"any",
"path",
"update",
"notification",
".",
"It",
"will",
"broadcast",
"the",
"messages",
"to",
"all",
"curious",
"listeners",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/notify_router.go#L552-L574 |
160,384 | keybase/client | go/libkb/notify_router.go | HandleFSEditListResponse | func (n *NotifyRouter) HandleFSEditListResponse(ctx context.Context, arg keybase1.FSEditListArg) {
if n == nil {
return
}
// We have to make sure the context survives until all subsequent
// RPCs launched in this method are done. So we wait until
// the last completes before returning.
var wg sync.WaitGroup
... | go | func (n *NotifyRouter) HandleFSEditListResponse(ctx context.Context, arg keybase1.FSEditListArg) {
if n == nil {
return
}
// We have to make sure the context survives until all subsequent
// RPCs launched in this method are done. So we wait until
// the last completes before returning.
var wg sync.WaitGroup
... | [
"func",
"(",
"n",
"*",
"NotifyRouter",
")",
"HandleFSEditListResponse",
"(",
"ctx",
"context",
".",
"Context",
",",
"arg",
"keybase1",
".",
"FSEditListArg",
")",
"{",
"if",
"n",
"==",
"nil",
"{",
"return",
"\n",
"}",
"\n\n",
"// We have to make sure the contex... | // HandleFSEditListResponse is called for KBFS edit list response notifications. | [
"HandleFSEditListResponse",
"is",
"called",
"for",
"KBFS",
"edit",
"list",
"response",
"notifications",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/notify_router.go#L577-L611 |
160,385 | keybase/client | go/libkb/notify_router.go | HandleFSEditListRequest | func (n *NotifyRouter) HandleFSEditListRequest(ctx context.Context, arg keybase1.FSEditListRequest) {
if n == nil {
return
}
// See above
var wg sync.WaitGroup
// For all connections we currently have open...
n.cm.ApplyAll(func(id ConnectionID, xp rpc.Transporter) bool {
// If the connection wants the `Kbfs... | go | func (n *NotifyRouter) HandleFSEditListRequest(ctx context.Context, arg keybase1.FSEditListRequest) {
if n == nil {
return
}
// See above
var wg sync.WaitGroup
// For all connections we currently have open...
n.cm.ApplyAll(func(id ConnectionID, xp rpc.Transporter) bool {
// If the connection wants the `Kbfs... | [
"func",
"(",
"n",
"*",
"NotifyRouter",
")",
"HandleFSEditListRequest",
"(",
"ctx",
"context",
".",
"Context",
",",
"arg",
"keybase1",
".",
"FSEditListRequest",
")",
"{",
"if",
"n",
"==",
"nil",
"{",
"return",
"\n",
"}",
"\n\n",
"// See above",
"var",
"wg",... | // HandleFSEditListRequest is called for KBFS edit list request notifications. | [
"HandleFSEditListRequest",
"is",
"called",
"for",
"KBFS",
"edit",
"list",
"request",
"notifications",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/notify_router.go#L614-L644 |
160,386 | keybase/client | go/libkb/notify_router.go | HandleFSSyncStatus | func (n *NotifyRouter) HandleFSSyncStatus(ctx context.Context, arg keybase1.FSSyncStatusArg) {
if n == nil {
return
}
// For all connections we currently have open...
n.cm.ApplyAll(func(id ConnectionID, xp rpc.Transporter) bool {
// If the connection wants the `Kbfslegacy` notification type
if n.getNotificati... | go | func (n *NotifyRouter) HandleFSSyncStatus(ctx context.Context, arg keybase1.FSSyncStatusArg) {
if n == nil {
return
}
// For all connections we currently have open...
n.cm.ApplyAll(func(id ConnectionID, xp rpc.Transporter) bool {
// If the connection wants the `Kbfslegacy` notification type
if n.getNotificati... | [
"func",
"(",
"n",
"*",
"NotifyRouter",
")",
"HandleFSSyncStatus",
"(",
"ctx",
"context",
".",
"Context",
",",
"arg",
"keybase1",
".",
"FSSyncStatusArg",
")",
"{",
"if",
"n",
"==",
"nil",
"{",
"return",
"\n",
"}",
"\n",
"// For all connections we currently have... | // HandleFSSyncStatus is called for KBFS sync status notifications. | [
"HandleFSSyncStatus",
"is",
"called",
"for",
"KBFS",
"sync",
"status",
"notifications",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/notify_router.go#L647-L669 |
160,387 | keybase/client | go/libkb/notify_router.go | HandleFSSyncEvent | func (n *NotifyRouter) HandleFSSyncEvent(ctx context.Context, arg keybase1.FSPathSyncStatus) {
if n == nil {
return
}
// For all connections we currently have open...
n.cm.ApplyAll(func(id ConnectionID, xp rpc.Transporter) bool {
// If the connection wants the `Kbfs` notification type
if n.getNotificationChan... | go | func (n *NotifyRouter) HandleFSSyncEvent(ctx context.Context, arg keybase1.FSPathSyncStatus) {
if n == nil {
return
}
// For all connections we currently have open...
n.cm.ApplyAll(func(id ConnectionID, xp rpc.Transporter) bool {
// If the connection wants the `Kbfs` notification type
if n.getNotificationChan... | [
"func",
"(",
"n",
"*",
"NotifyRouter",
")",
"HandleFSSyncEvent",
"(",
"ctx",
"context",
".",
"Context",
",",
"arg",
"keybase1",
".",
"FSPathSyncStatus",
")",
"{",
"if",
"n",
"==",
"nil",
"{",
"return",
"\n",
"}",
"\n",
"// For all connections we currently have... | // HandleFSSyncEvent is called for KBFS sync event notifications. | [
"HandleFSSyncEvent",
"is",
"called",
"for",
"KBFS",
"sync",
"event",
"notifications",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/notify_router.go#L672-L693 |
160,388 | keybase/client | go/libkb/notify_router.go | HandleDeviceCloneNotification | func (n *NotifyRouter) HandleDeviceCloneNotification(newClones int) {
if n == nil {
return
}
n.G().Log.Debug("+ Sending device clone notification")
// For all connections we currently have open...
n.cm.ApplyAll(func(id ConnectionID, xp rpc.Transporter) bool {
// If the connection wants the `Deviceclone` notif... | go | func (n *NotifyRouter) HandleDeviceCloneNotification(newClones int) {
if n == nil {
return
}
n.G().Log.Debug("+ Sending device clone notification")
// For all connections we currently have open...
n.cm.ApplyAll(func(id ConnectionID, xp rpc.Transporter) bool {
// If the connection wants the `Deviceclone` notif... | [
"func",
"(",
"n",
"*",
"NotifyRouter",
")",
"HandleDeviceCloneNotification",
"(",
"newClones",
"int",
")",
"{",
"if",
"n",
"==",
"nil",
"{",
"return",
"\n",
"}",
"\n\n",
"n",
".",
"G",
"(",
")",
".",
"Log",
".",
"Debug",
"(",
"\"",
"\"",
")",
"\n",... | // HandleDeviceCloneNotification is called when a run of the device clone status update
// finds a newly-added, possible clone. It will broadcast the messages to all curious listeners. | [
"HandleDeviceCloneNotification",
"is",
"called",
"when",
"a",
"run",
"of",
"the",
"device",
"clone",
"status",
"update",
"finds",
"a",
"newly",
"-",
"added",
"possible",
"clone",
".",
"It",
"will",
"broadcast",
"the",
"messages",
"to",
"all",
"curious",
"liste... | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/notify_router.go#L727-L752 |
160,389 | keybase/client | go/libkb/notify_router.go | HandlePaperKeyCached | func (n *NotifyRouter) HandlePaperKeyCached(uid keybase1.UID, encKID keybase1.KID, sigKID keybase1.KID) {
if n == nil {
return
}
n.G().Log.Debug("+ Sending paperkey cached notification")
arg := keybase1.PaperKeyCachedArg{
Uid: uid,
EncKID: encKID,
SigKID: sigKID,
}
var wg sync.WaitGroup
// For all c... | go | func (n *NotifyRouter) HandlePaperKeyCached(uid keybase1.UID, encKID keybase1.KID, sigKID keybase1.KID) {
if n == nil {
return
}
n.G().Log.Debug("+ Sending paperkey cached notification")
arg := keybase1.PaperKeyCachedArg{
Uid: uid,
EncKID: encKID,
SigKID: sigKID,
}
var wg sync.WaitGroup
// For all c... | [
"func",
"(",
"n",
"*",
"NotifyRouter",
")",
"HandlePaperKeyCached",
"(",
"uid",
"keybase1",
".",
"UID",
",",
"encKID",
"keybase1",
".",
"KID",
",",
"sigKID",
"keybase1",
".",
"KID",
")",
"{",
"if",
"n",
"==",
"nil",
"{",
"return",
"\n",
"}",
"\n\n",
... | // HandlePaperKeyCached is called whenever a paper key is cached
// in response to a rekey harassment. | [
"HandlePaperKeyCached",
"is",
"called",
"whenever",
"a",
"paper",
"key",
"is",
"cached",
"in",
"response",
"to",
"a",
"rekey",
"harassment",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/notify_router.go#L1510-L1544 |
160,390 | keybase/client | go/libkb/notify_router.go | HandleKeyfamilyChanged | func (n *NotifyRouter) HandleKeyfamilyChanged(uid keybase1.UID) {
if n == nil {
return
}
n.G().Log.Debug("+ Sending keyfamily changed notification")
// For all connections we currently have open...
n.cm.ApplyAll(func(id ConnectionID, xp rpc.Transporter) bool {
// If the connection wants the `Favorites` notifi... | go | func (n *NotifyRouter) HandleKeyfamilyChanged(uid keybase1.UID) {
if n == nil {
return
}
n.G().Log.Debug("+ Sending keyfamily changed notification")
// For all connections we currently have open...
n.cm.ApplyAll(func(id ConnectionID, xp rpc.Transporter) bool {
// If the connection wants the `Favorites` notifi... | [
"func",
"(",
"n",
"*",
"NotifyRouter",
")",
"HandleKeyfamilyChanged",
"(",
"uid",
"keybase1",
".",
"UID",
")",
"{",
"if",
"n",
"==",
"nil",
"{",
"return",
"\n",
"}",
"\n\n",
"n",
".",
"G",
"(",
")",
".",
"Log",
".",
"Debug",
"(",
"\"",
"\"",
")",... | // HandleKeyfamilyChanged is called whenever a user's keyfamily changes. | [
"HandleKeyfamilyChanged",
"is",
"called",
"whenever",
"a",
"user",
"s",
"keyfamily",
"changes",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/notify_router.go#L1547-L1571 |
160,391 | keybase/client | go/libkb/notify_router.go | HandleServiceShutdown | func (n *NotifyRouter) HandleServiceShutdown() {
if n == nil {
return
}
n.G().Log.Debug("+ Sending service shutdown notification")
var wg sync.WaitGroup
// For all connections we currently have open...
n.cm.ApplyAll(func(id ConnectionID, xp rpc.Transporter) bool {
// If the connection wants the `Service` n... | go | func (n *NotifyRouter) HandleServiceShutdown() {
if n == nil {
return
}
n.G().Log.Debug("+ Sending service shutdown notification")
var wg sync.WaitGroup
// For all connections we currently have open...
n.cm.ApplyAll(func(id ConnectionID, xp rpc.Transporter) bool {
// If the connection wants the `Service` n... | [
"func",
"(",
"n",
"*",
"NotifyRouter",
")",
"HandleServiceShutdown",
"(",
")",
"{",
"if",
"n",
"==",
"nil",
"{",
"return",
"\n",
"}",
"\n\n",
"n",
".",
"G",
"(",
")",
".",
"Log",
".",
"Debug",
"(",
"\"",
"\"",
")",
"\n\n",
"var",
"wg",
"sync",
... | // HandleServiceShutdown is called whenever the service shuts down. | [
"HandleServiceShutdown",
"is",
"called",
"whenever",
"the",
"service",
"shuts",
"down",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/notify_router.go#L1574-L1613 |
160,392 | keybase/client | go/libkb/notify_router.go | HandleAppExit | func (n *NotifyRouter) HandleAppExit() {
if n == nil {
return
}
n.G().Log.Debug("+ Sending app exit notification")
n.cm.ApplyAll(func(id ConnectionID, xp rpc.Transporter) bool {
if n.getNotificationChannels(id).App {
go func() {
(keybase1.NotifyAppClient{
Cli: rpc.NewClient(xp, NewContextifiedErrorU... | go | func (n *NotifyRouter) HandleAppExit() {
if n == nil {
return
}
n.G().Log.Debug("+ Sending app exit notification")
n.cm.ApplyAll(func(id ConnectionID, xp rpc.Transporter) bool {
if n.getNotificationChannels(id).App {
go func() {
(keybase1.NotifyAppClient{
Cli: rpc.NewClient(xp, NewContextifiedErrorU... | [
"func",
"(",
"n",
"*",
"NotifyRouter",
")",
"HandleAppExit",
"(",
")",
"{",
"if",
"n",
"==",
"nil",
"{",
"return",
"\n",
"}",
"\n",
"n",
".",
"G",
"(",
")",
".",
"Log",
".",
"Debug",
"(",
"\"",
"\"",
")",
"\n",
"n",
".",
"cm",
".",
"ApplyAll"... | // HandleAppExit is called whenever an app exit command is issued | [
"HandleAppExit",
"is",
"called",
"whenever",
"an",
"app",
"exit",
"command",
"is",
"issued"
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/notify_router.go#L1616-L1632 |
160,393 | keybase/client | go/libkb/notify_router.go | HandlePGPKeyInSecretStoreFile | func (n *NotifyRouter) HandlePGPKeyInSecretStoreFile() {
n.G().Log.Debug("+ Sending pgpKeyInSecretStoreFile notification")
n.cm.ApplyAll(func(id ConnectionID, xp rpc.Transporter) bool {
if n.getNotificationChannels(id).PGP {
go func() {
(keybase1.NotifyPGPClient{
Cli: rpc.NewClient(xp, NewContextifiedEr... | go | func (n *NotifyRouter) HandlePGPKeyInSecretStoreFile() {
n.G().Log.Debug("+ Sending pgpKeyInSecretStoreFile notification")
n.cm.ApplyAll(func(id ConnectionID, xp rpc.Transporter) bool {
if n.getNotificationChannels(id).PGP {
go func() {
(keybase1.NotifyPGPClient{
Cli: rpc.NewClient(xp, NewContextifiedEr... | [
"func",
"(",
"n",
"*",
"NotifyRouter",
")",
"HandlePGPKeyInSecretStoreFile",
"(",
")",
"{",
"n",
".",
"G",
"(",
")",
".",
"Log",
".",
"Debug",
"(",
"\"",
"\"",
")",
"\n",
"n",
".",
"cm",
".",
"ApplyAll",
"(",
"func",
"(",
"id",
"ConnectionID",
",",... | // HandlePGPKeyInSecretStoreFile is called to notify a user that they have a PGP
// key that is unlockable by a secret stored in a file in their home directory. | [
"HandlePGPKeyInSecretStoreFile",
"is",
"called",
"to",
"notify",
"a",
"user",
"that",
"they",
"have",
"a",
"PGP",
"key",
"that",
"is",
"unlockable",
"by",
"a",
"secret",
"stored",
"in",
"a",
"file",
"in",
"their",
"home",
"directory",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/notify_router.go#L1636-L1653 |
160,394 | keybase/client | go/libkb/notify_router.go | HandleTeamChangedByBothKeys | func (n *NotifyRouter) HandleTeamChangedByBothKeys(ctx context.Context,
teamID keybase1.TeamID, teamName string, latestSeqno keybase1.Seqno, implicitTeam bool, changes keybase1.TeamChangeSet) {
n.HandleTeamChangedByID(ctx, teamID, latestSeqno, implicitTeam, changes)
n.HandleTeamChangedByName(ctx, teamName, latestSe... | go | func (n *NotifyRouter) HandleTeamChangedByBothKeys(ctx context.Context,
teamID keybase1.TeamID, teamName string, latestSeqno keybase1.Seqno, implicitTeam bool, changes keybase1.TeamChangeSet) {
n.HandleTeamChangedByID(ctx, teamID, latestSeqno, implicitTeam, changes)
n.HandleTeamChangedByName(ctx, teamName, latestSe... | [
"func",
"(",
"n",
"*",
"NotifyRouter",
")",
"HandleTeamChangedByBothKeys",
"(",
"ctx",
"context",
".",
"Context",
",",
"teamID",
"keybase1",
".",
"TeamID",
",",
"teamName",
"string",
",",
"latestSeqno",
"keybase1",
".",
"Seqno",
",",
"implicitTeam",
"bool",
",... | // teamID and teamName are not necessarily the same team | [
"teamID",
"and",
"teamName",
"are",
"not",
"necessarily",
"the",
"same",
"team"
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/notify_router.go#L1671-L1676 |
160,395 | keybase/client | go/libkb/notify_router.go | HandleTeamListUnverifiedChanged | func (n *NotifyRouter) HandleTeamListUnverifiedChanged(ctx context.Context, teamName string) {
if n == nil {
return
}
n.G().Log.Debug("+ Sending TeamListUnverifiedChanged notification (team:%v)", teamName)
// For all connections we currently have open...
n.cm.ApplyAll(func(id ConnectionID, xp rpc.Transporter) b... | go | func (n *NotifyRouter) HandleTeamListUnverifiedChanged(ctx context.Context, teamName string) {
if n == nil {
return
}
n.G().Log.Debug("+ Sending TeamListUnverifiedChanged notification (team:%v)", teamName)
// For all connections we currently have open...
n.cm.ApplyAll(func(id ConnectionID, xp rpc.Transporter) b... | [
"func",
"(",
"n",
"*",
"NotifyRouter",
")",
"HandleTeamListUnverifiedChanged",
"(",
"ctx",
"context",
".",
"Context",
",",
"teamName",
"string",
")",
"{",
"if",
"n",
"==",
"nil",
"{",
"return",
"\n",
"}",
"\n\n",
"n",
".",
"G",
"(",
")",
".",
"Log",
... | // HandleTeamListUnverifiedChanged is called when a notification is received from gregor that
// we think might be of interest to the UI, specifically the parts of the UI that update using
// the TeamListUnverified rpc. | [
"HandleTeamListUnverifiedChanged",
"is",
"called",
"when",
"a",
"notification",
"is",
"received",
"from",
"gregor",
"that",
"we",
"think",
"might",
"be",
"of",
"interest",
"to",
"the",
"UI",
"specifically",
"the",
"parts",
"of",
"the",
"UI",
"that",
"update",
... | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/notify_router.go#L1755-L1780 |
160,396 | keybase/client | go/libkb/notify_router.go | HandleRootAuditError | func (n *NotifyRouter) HandleRootAuditError(msg string) {
if n == nil {
return
}
n.G().Log.Debug("+ Sending merkle tree audit notification")
// For all connections we currently have open...
n.cm.ApplyAll(func(id ConnectionID, xp rpc.Transporter) bool {
// If the connection wants the `Session` notification type... | go | func (n *NotifyRouter) HandleRootAuditError(msg string) {
if n == nil {
return
}
n.G().Log.Debug("+ Sending merkle tree audit notification")
// For all connections we currently have open...
n.cm.ApplyAll(func(id ConnectionID, xp rpc.Transporter) bool {
// If the connection wants the `Session` notification type... | [
"func",
"(",
"n",
"*",
"NotifyRouter",
")",
"HandleRootAuditError",
"(",
"msg",
"string",
")",
"{",
"if",
"n",
"==",
"nil",
"{",
"return",
"\n",
"}",
"\n",
"n",
".",
"G",
"(",
")",
".",
"Log",
".",
"Debug",
"(",
"\"",
"\"",
")",
"\n",
"// For all... | // RootAuditError is called when the merkle root auditor finds an invalid skip
// sequence in a random old block. | [
"RootAuditError",
"is",
"called",
"when",
"the",
"merkle",
"root",
"auditor",
"finds",
"an",
"invalid",
"skip",
"sequence",
"in",
"a",
"random",
"old",
"block",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/libkb/notify_router.go#L2142-L2167 |
160,397 | keybase/client | go/engine/kex2_provisioner.go | NewKex2Provisioner | func NewKex2Provisioner(g *libkb.GlobalContext, secret kex2.Secret, pps *libkb.PassphraseStream) *Kex2Provisioner {
e := &Kex2Provisioner{
Contextified: libkb.NewContextified(g),
secret: secret,
secretCh: make(chan kex2.Secret),
}
if pps != nil {
e.pps = pps.Export()
}
return e
} | go | func NewKex2Provisioner(g *libkb.GlobalContext, secret kex2.Secret, pps *libkb.PassphraseStream) *Kex2Provisioner {
e := &Kex2Provisioner{
Contextified: libkb.NewContextified(g),
secret: secret,
secretCh: make(chan kex2.Secret),
}
if pps != nil {
e.pps = pps.Export()
}
return e
} | [
"func",
"NewKex2Provisioner",
"(",
"g",
"*",
"libkb",
".",
"GlobalContext",
",",
"secret",
"kex2",
".",
"Secret",
",",
"pps",
"*",
"libkb",
".",
"PassphraseStream",
")",
"*",
"Kex2Provisioner",
"{",
"e",
":=",
"&",
"Kex2Provisioner",
"{",
"Contextified",
":"... | // NewKex2Provisioner creates a Kex2Provisioner engine. | [
"NewKex2Provisioner",
"creates",
"a",
"Kex2Provisioner",
"engine",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/engine/kex2_provisioner.go#L37-L48 |
160,398 | keybase/client | go/engine/kex2_provisioner.go | Run | func (e *Kex2Provisioner) Run(m libkb.MetaContext) error {
// The guard is acquired later, after the potentially long pause by the user.
defer m.G().LocalSigchainGuard().Clear(m.Ctx(), "Kex2Provisioner")
// before starting provisioning, need to load some information:
if err := e.loadMe(); err != nil {
return er... | go | func (e *Kex2Provisioner) Run(m libkb.MetaContext) error {
// The guard is acquired later, after the potentially long pause by the user.
defer m.G().LocalSigchainGuard().Clear(m.Ctx(), "Kex2Provisioner")
// before starting provisioning, need to load some information:
if err := e.loadMe(); err != nil {
return er... | [
"func",
"(",
"e",
"*",
"Kex2Provisioner",
")",
"Run",
"(",
"m",
"libkb",
".",
"MetaContext",
")",
"error",
"{",
"// The guard is acquired later, after the potentially long pause by the user.",
"defer",
"m",
".",
"G",
"(",
")",
".",
"LocalSigchainGuard",
"(",
")",
... | // Run starts the provisioner engine. | [
"Run",
"starts",
"the",
"provisioner",
"engine",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/engine/kex2_provisioner.go#L74-L129 |
160,399 | keybase/client | go/engine/kex2_provisioner.go | GetHelloArg | func (e *Kex2Provisioner) GetHelloArg() (arg keybase1.HelloArg, err error) {
// Pull the metaContext out of the this object, since we can't pass it through the
// kex2/provisioner interface
m := e.mctx
defer m.Trace("Kex2Provisioner#GetHelloArg()", func() error { return err })()
m.UIs().ProvisionUI.DisplaySecre... | go | func (e *Kex2Provisioner) GetHelloArg() (arg keybase1.HelloArg, err error) {
// Pull the metaContext out of the this object, since we can't pass it through the
// kex2/provisioner interface
m := e.mctx
defer m.Trace("Kex2Provisioner#GetHelloArg()", func() error { return err })()
m.UIs().ProvisionUI.DisplaySecre... | [
"func",
"(",
"e",
"*",
"Kex2Provisioner",
")",
"GetHelloArg",
"(",
")",
"(",
"arg",
"keybase1",
".",
"HelloArg",
",",
"err",
"error",
")",
"{",
"// Pull the metaContext out of the this object, since we can't pass it through the",
"// kex2/provisioner interface",
"m",
":="... | // GetHelloArg implements GetHelloArg in kex2.Provisioner. | [
"GetHelloArg",
"implements",
"GetHelloArg",
"in",
"kex2",
".",
"Provisioner",
"."
] | b352622cd8cc94798cfacbcb56ada203c18e519e | https://github.com/keybase/client/blob/b352622cd8cc94798cfacbcb56ada203c18e519e/go/engine/kex2_provisioner.go#L171-L204 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.