_id
stringlengths
2
7
text
stringlengths
6
2.61k
title
stringclasses
1 value
c173600
// Length returns the number of elements in the List.
c173601
// Remove retreives a value from this List and shifts all other values.
c173602
// Set updates the value stored at a given position in the List.
c173603
// String generates a textual representation of the List for the sake of debugging.
c173604
// Swap switches the values that are stored at positions `x` and `y`
c173605
// MarshalText implements the TextMarshaler interface.
c173606
// UnmarshalText implements the TextUnmarshaler interface.
c173607
// repl replaces % directives with right time
c173608
// logName returns a new log file name containing tag, with start time t, and // the name for the symlink for tag.
c173609
// Monotonic returns a time duration from some fixed point in the past.
c173610
// set sets the value of the severity.
c173611
// Set is part of the flag.Value interface.
c173612
// set sets the value of the Level.
c173613
// match reports whether the file matches the pattern. It uses a string // comparison if the pattern contains no metacharacters.
c173614
// match reports whether the file path matches the regexp.
c173615
// match reports whether the specified file and line matches the trace location. // The argument file name is the full path, not the basename specified in the flag.
c173616
// NewLogger creates a new logger. // name is a non-empty string that appears in the names of log files // to distinguish between separate instances of the logger writing to the // same directory. // skip is the number of stack frames to skip in order to reach the // call point to be logged. 0 will log the caller of th...
c173617
// logDir if non-empty, write log files to this directory.
c173618
// SetLogToStderr sets the flag that, if true, logs to standard error instead of files
c173619
// SetAlsoLogToStderr sets the flag that, if true, logs to standard error as well as files
c173620
// setVState sets a consistent state for V logging. A nil value for // modules or filepaths will result in that filter not being changed. // l.mu is held.
c173621
// putBuffer returns a buffer to the free list.
c173622
// output writes the data to the log files and releases the buffer.
c173623
// timeoutFlush calls Flush and returns when it completes or after timeout // elapses, whichever happens first. This is needed because the hooks invoked // by Flush may deadlock when glog.Fatal is called from a hook that holds // a lock.
c173624
// stacks is a wrapper for runtime.Stack that attempts to recover the data for all goroutines.
c173625
// exit is called if there is trouble creating or writing log files. // It flushes the logs and exits the program; there's no point in hanging around. // l.mu is held.
c173626
// rotateFile closes the syncBuffer's file and starts a new one.
c173627
// createFiles creates all the log files for severity from sev down to infoLog. // l.mu is held.
c173628
// lockAndFlushAll is like flushAll but locks l.mu first.
c173629
// flushAll flushes all the logs and attempts to "sync" their data to disk. // l.mu is held.
c173630
// Add a new operation to the bundle. The operation will be invoked with a // context that will be cancelled if any other operation fails or has already // failed.
c173631
// Wait for all previously-added operations to complete. Return nil if all // operations succeeded. Otherwise return the first error. // // Add must not be called concurrently with or after Join.
c173632
// Create a bundle whose operations are fed a context inheriting from the given // parent context, which must be non-nil. The bundle must eventually be joined // with Join.
c173633
// Expand until there are no more expansions to do
c173634
// CacheFunc accepts two parameters // first is the http.HandlerFunc which you want to cache its result // the second is, optional, the cache Entry's expiration duration // if the expiration <=2 seconds then expiration is taken by the "cache-control's maxage" header // returns an http.HandlerFunc, which you can use as ...
c173635
// CacheFasthttp accepts two parameters // first is the fasthttp.RequestHandler which you want to cache its result // the second is, optional, the cache Entry's expiration duration // if the expiration <=2 seconds then expiration is taken by the "cache-control's maxage" header // returns a fhttp.Handler with a ServeHTT...
c173636
// CacheFasthttpFunc accepts two parameters // first is the fasthttp.RequestHandler which you want to cache its result // the second is, optional, the cache Entry's expiration duration // if the expiration <=2 seconds then expiration is taken by the "cache-control's maxage" header // returns a fasthttp.RequestHandler, ...
c173637
// ContentType returns a valid content type
c173638
// ServeHTTP serves the cache Service to the outside world, // it is used only when you want to achieve something like horizontal scaling // it parses the request and tries to return the response with the cached body of the requested cache key // server-side function
c173639
// the actual work is done on the handler.go // here we just provide a helper for the main package to create // an http.Server and serve a cache remote service, without any user touches // New returns a http.Server which hosts // the server-side handler for the remote cache service. // // it doesn't listens to the serv...
c173640
// AcquireResponseRecorder returns a ResponseRecorder
c173641
// ReleaseResponseRecorder releases a ResponseRecorder which has been previously received by AcquireResponseRecorder
c173642
// Rule sets the ruleset for this handler. // // returns itself.
c173643
// NoCache called when a particular handler is not valid for cache. // If this function called inside a handler then the handler is not cached.
c173644
// ClientOAuth instantiates ClientOAuthAuthentication with the client OAuth tokens
c173645
// Client OAuth authentication requires us to attach an unexpired OAuth token to // the request header
c173646
// ApiKeyAuth instantiates ApiKeyAuthentication with the API key & secret
c173647
// API Key + Secret authentication requires a request header of the HMAC SHA-256 // signature of the "message" as well as an incrementing nonce and the API key
c173648
// ServiceOAuth instantiates ServiceOAuthAuthentication with the coinbase certificate file
c173649
// Service OAuth authentication requires no additional headers to be sent. The // Coinbase Public Certificate is set as a TLS config in the http.Client
c173650
// OAuthService Instantiates OAuth Struct in order to send service related OAuth requests
c173651
// CreateAuthorizeUrl create the Authorize Url used to redirect users for // coinbase app authorization. The scope parameter includes the specific // permissions one wants to ask from the user
c173652
// RefreshTokens refreshes a users existing OAuth tokens
c173653
// NewTokens generates new tokens for an OAuth user
c173654
// NewTokensRequest generates new tokens for OAuth user given an http request // containing the query parameter 'code'
c173655
// Request sends a request with params marshaled into a JSON payload in the body // The response value is marshaled from JSON into the specified holder struct
c173656
// CreateRequest formats a request with all the necessary headers
c173657
// executeRequest takes a prepared http.Request and returns the body of the response // If the response is not of HTTP Code 200, an error is returned
c173658
// simulateRequest simulates a request by returning a sample JSON from file
c173659
// ApiKeyClient instantiates the client with ApiKey Authentication
c173660
// OAuthClient instantiates the client with OAuth Authentication
c173661
// Get sends a GET request and marshals response data into holder
c173662
// GetBalance returns current balance in BTC
c173663
// GetAllAddresses returns bitcoin addresses associated with client account
c173664
// GenerateReceiveAddress generates and returns a new bitcoin receive address
c173665
// SendMoney to either a bitcoin or email address
c173666
// RequestMoney from either a bitcoin or email address
c173667
// ResendRequest resends a transaction request referenced by id
c173668
// CancelRequest cancels a transaction request referenced by id
c173669
// CompleteRequest completes a money request referenced by id
c173670
// CreateButton gets a new payment button including EmbedHtml as a field on button struct
c173671
// CreateOrderFromButtonCode creates an order for a given button code
c173672
// CreateUser creates a new user given an email and password
c173673
// Buy an amount of BTC and bypass rate limits by setting agreeBtcAmountVaries to true
c173674
// GetContacts gets a users contacts
c173675
// GetCurrencies gets all currency names and ISO's
c173676
// GetExchangeRates gets the current exchange rates
c173677
// GetExchangeRate gets the exchange rate between two specified currencies
c173678
// GetTransactions gets transactions associated with an account
c173679
// GetOrders gets orders associated with an account
c173680
// GetTransfers get transfers associated with an account
c173681
// GetBuyPrice gets the current BTC buy price
c173682
// GetSellPrice gets the current BTC sell price
c173683
// GetTransaction gets a particular transaction referenced by id
c173684
// GetOrder gets a particular order referenced by id
c173685
// GetUser gets the user associated with the authentication
c173686
// NewSerialDispatcher creates a new PrallelDispatcher with the given handlers
c173687
// AppendHandlers implements `Dispatcher.AppendHandlers`
c173688
// DispatchOptional implements `Dispatcher.DispatchOptional`
c173689
// NewParallelDispatcher creates a new PrallelDispatcher with the given handlers
c173690
// ReleaseMsg releases a buffer
c173691
// ReleaseBuffer puts the given byte array back into the appropriate // global buffer pool based on its capacity.
c173692
// close is the internal close function, called by ContextCloser.Close
c173693
// Write writes data, net.Conn style
c173694
// Accept waits for and returns the next connection to the listener.
c173695
// AddDialer adds a sub-dialer usable by this dialer. // Dialers added first will be selected first, based on the address.
c173696
// returns dialer that can dial the given address
c173697
// rawConnDial dials the underlying net.Conn + manet.Conns
c173698
// MultiaddrProtocolsMatch returns whether two multiaddrs match in protocol stacks.
c173699
// MultiaddrNetMatch returns the first Multiaddr found to match network.