_id stringlengths 2 7 | text stringlengths 6 2.61k | title stringclasses 1
value |
|---|---|---|
c11400 | // Cast casts a buffer onto a multihash, and returns an error
// if it does not work. | |
c11401 | // Decode parses multihash bytes into a DecodedMultihash. | |
c11402 | // Sum obtains the cryptographic sum of a given buffer. The length parameter
// indicates the length of the resulting digest and passing a negative value
// use default length values for the selected hash function. | |
c11403 | // RegisterHashFunc adds an entry to the package-level code -> hash func map.
// The hash function must return at least the requested number of bytes. If it
// returns more, the hash will be truncated. | |
c11404 | // init initializes a scanner with a new buffer. | |
c11405 | // read returns the next unicode character. It returns eof at
// the end of the string buffer. | |
c11406 | // skip skips over the curring unicode character in the buffer
// by slicing and removing from the buffer. | |
c11407 | // scan reads the next token or Unicode character from source and
// returns it. It returns EOF at the end of the source. | |
c11408 | // scanIdent reads the next token or Unicode character from source
// and returns true if the Ident character is accepted. | |
c11409 | // scanLbrack reads the next token or Unicode character from source
// and returns true if the open bracket is encountered. | |
c11410 | // scanRbrack reads the next token or Unicode character from source
// and returns true if the closing bracket is encountered. | |
c11411 | // scanEscaped reads the next token or Unicode character from source
// and returns true if it being escaped and should be sipped. | |
c11412 | // Parse parses the string and returns a Tree. | |
c11413 | // Parse parses the string buffer to construct an ast
// representation for expansion. | |
c11414 | // parse a substitution function parameter. | |
c11415 | // parse either a default or substring substitution function. | |
c11416 | // consumeRbrack consumes a right closing bracket. If a closing
// bracket token is not consumed an ErrBadSubstitution is returned. | |
c11417 | // toLen returns the length of string s. | |
c11418 | // toLowerFirst returns a copy of the string s with the first
// character mapped to its lower case. | |
c11419 | // toUpperFirst returns a copy of the string s with the first
// character mapped to its upper case. | |
c11420 | // toDefault returns a copy of the string s if not empty, else
// returns a copy of the first string arugment. | |
c11421 | // toSubstr returns a slice of the string s at the specified
// length and position. | |
c11422 | // replaceAll returns a copy of the string s with all instances
// of the substring replaced with the replacement string. | |
c11423 | // replaceFirst returns a copy of the string s with the first
// instance of the substring replaced with the replacement string. | |
c11424 | // replacePrefix returns a copy of the string s with the matching
// prefix replaced with the replacement string. | |
c11425 | // replaceSuffix returns a copy of the string s with the matching
// suffix replaced with the replacement string. | |
c11426 | // Parse creates a new shell format template and parses the template
// definition from string s. | |
c11427 | // Execute applies a parsed template to the specified data mapping. | |
c11428 | // lookupFunc returns the parameters substitution function by name. If the
// named function does not exists, a default function is returned. | |
c11429 | // Backoff returns whether the client should backoff from dialing
// peer p | |
c11430 | // Clear removes a backoff record. Clients should call this after a
// successful Dial. | |
c11431 | // doDial is an ugly shim method to retain all the logging and backoff logic
// of the old dialsync code | |
c11432 | // dial is the actual swarm's dial logic, gated by Dial. | |
c11433 | // limitedDial will start a dial to the given peer when
// it is able, respecting the various different types of rate
// limiting that occur without using extra goroutines per addr | |
c11434 | // freeFDToken frees FD token and if there are any schedules another waiting dialJob
// in it's place | |
c11435 | // AddDialJob tries to take the needed tokens for starting the given dial job.
// If it acquires all needed tokens, it immediately starts the dial, otherwise
// it will put it on the waitlist for the requested token. | |
c11436 | // executeDial calls the dialFunc, and reports the result through the response
// channel when finished. Once the response is sent it also releases all tokens
// it held during the dial. | |
c11437 | // TransportForDialing retrieves the appropriate transport for dialing the given
// multiaddr. | |
c11438 | // AddTransport adds a transport to this swarm.
//
// Satisfies the Network interface from go-libp2p-transport. | |
c11439 | // AddListenAddr tells the swarm to listen on a single address. Unlike Listen,
// this method does not attempt to filter out bad addresses. | |
c11440 | // NewDialSync constructs a new DialSync | |
c11441 | // DialLock initiates a dial to the given peer if there are none in progress
// then waits for the dial to that peer to complete. | |
c11442 | // CancelDial cancels all in-progress dials to the given peer. | |
c11443 | // listens for new streams.
//
// The caller must take a swarm ref before calling. This function decrements the
// swarm ref count. | |
c11444 | // NewStream returns a new Stream from this connection | |
c11445 | // GetStreams returns the streams associated with this connection. | |
c11446 | // Read reads bytes from a stream. | |
c11447 | // Write writes bytes to a stream, flushing for each call. | |
c11448 | // Close closes the stream, indicating this side is finished
// with the stream. | |
c11449 | // Reset resets the stream, closing both ends. | |
c11450 | // NewSwarm constructs a Swarm | |
c11451 | // AddAddrFilter adds a multiaddr filter to the set of filters the swarm will use to determine which
// addresses not to dial to. | |
c11452 | // ConnHandler gets the handler for new connections. | |
c11453 | // SetStreamHandler assigns the handler for new streams. | |
c11454 | // StreamHandler gets the handler for new streams. | |
c11455 | // NewStream creates a new stream on any available connection to peer, dialing
// if necessary. | |
c11456 | // ConnsToPeer returns all the live connections to peer. | |
c11457 | // bestConnToPeer returns the best connection to peer. | |
c11458 | // Conns returns a slice of all connections. | |
c11459 | // ClosePeer closes all connections to the given peer. | |
c11460 | // Peers returns a copy of the set of peers swarm is connected to. | |
c11461 | // notifyAll sends a signal to all Notifiees | |
c11462 | // ListenAddresses returns a list of addresses at which this swarm listens. | |
c11463 | // NewWithServer wraps an existing http.Server object and returns a
// GracefulServer that supports all of the original Server operations. | |
c11464 | // RoutinesCount returns the number of currently running routines | |
c11465 | // runSubcommand executes a command with arguments in the context
// of an environment populated with secret values. | |
c11466 | // Resolve resolves a filepath to a provider
// Checks the CLI arg, environment and then default path | |
c11467 | // Call shells out to a provider and return its output
// If call succeeds, stdout is returned with no error
// If call fails, "" is return with error containing stderr | |
c11468 | // Create a temp file with given value. Returns the path. | |
c11469 | // Cleanup removes the temporary files created with this factory. | |
c11470 | // runAction encapsulates the logic of Action without cli Context for easier testing | |
c11471 | // formatForEnv returns a string in %k=%v format, where %k=namespace of the secret and
// %v=the secret value or path to a temporary file containing the secret | |
c11472 | // scans arguments for the magic string; if found,
// creates a tempfile to which all the environment mappings are dumped
// and replaces the magic string with its path.
// Returns the path if so, returns an empty string otherwise. | |
c11473 | // convertSubsToMap converts the list of substitutions passed in via
// command line to a map | |
c11474 | // ParseFromString parses a string in secrets.yml format to a map. | |
c11475 | // ParseFromFile parses a file in secrets.yml format to a map. | |
c11476 | // Wrapper for parsing yaml contents | |
c11477 | // Parse secrets yaml that has environment sections | |
c11478 | // Parse a secrets yaml that has no environment sections | |
c11479 | // tagInSlice determines whether a YamlTag is in a list of YamlTag | |
c11480 | // ListenAndServe listens on the UDP network address addr and then calls
// Serve with handler to handle requests on incoming packets. | |
c11481 | // get gets the Pather object wrapped in a node, instantiating if required. | |
c11482 | // Path calculates a short path and the distance between the two Pather nodes.
//
// If no path is found, found will be false. | |
c11483 | // PathNeighbors returns the neighbors of the Truck | |
c11484 | // PathNeighborCost returns the cost of the tube leading to Truck. | |
c11485 | // PathEstimatedCost uses Manhattan distance to estimate orthogonal distance
// between non-adjacent nodes. | |
c11486 | // RenderPath renders a path on top of a Goreland world. | |
c11487 | // IPLess returns where IP a is less than IP b. | |
c11488 | // OptionsLeaseTime - converts a time.Duration to a 4 byte slice, compatible
// with OptionIPAddressLeaseTime. | |
c11489 | // JoinIPs returns a byte slice of IP addresses, one immediately after the other
// This may be useful for creating multiple IP options such as OptionRouter. | |
c11490 | // Parses the packet's options into an Options map | |
c11491 | // Appends a DHCP option to the end of a packet | |
c11492 | // Creates a request packet that a Client would send to a server. | |
c11493 | // Creates listener on all interfaces and then filters packets not received by interfaceName | |
c11494 | // Dial establishes a connection to a log daemon by connecting to
// address raddr on the specified network. Each write to the returned
// writer sends a log message with the given facility, severity and
// tag.
// If network is empty, Dial will connect to the local syslog server. | |
c11495 | // unixSyslog opens a connection to the syslog daemon running on the
// local machine using a Unix domain socket. | |
c11496 | // WriteLevel writes out a message at the given priority | |
c11497 | // facilityPriority converts a facility string into
// an appropriate priority level or returns an error | |
c11498 | // Decrypt decrypts the input with a given mechanism. | |
c11499 | // IV returns a copy of the actual IV used for the operation.
//
// Some HSMs may ignore the user-specified IV and write their own at the end of
// the encryption operation; this method allows you to retrieve it. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.