_id stringlengths 2 7 | text stringlengths 6 2.61k | title stringclasses 1
value |
|---|---|---|
c9400 | // CreateFanout create a new fanout, and if it is non-blocked, it will start
// the fanout goroutine at once, otherwise it will start the goroutine when it
// get the first client | |
c9401 | // loadProcessConfig loads the process configuration from the provided path. | |
c9402 | // preCreateDirs creates necessary dirs for hyperstart | |
c9403 | // allInterfaces return all the network interfaces except loop | |
c9404 | // lock locks the sandbox to prevent it from being accessed by other processes. | |
c9405 | // unlock unlocks the sandbox to allow it being accessed by other processes. | |
c9406 | // SendVmEvent enqueues a VmEvent onto the context. Returns an error if there is
// no handler associated with the context. VmEvent handling happens in a
// separate goroutine, so this is thread-safe and asynchronous. | |
c9407 | // ReadByte works like bufio.ReadByte | |
c9408 | // ReadRune works like bufio.ReadRune | |
c9409 | // Read is for implement an io.Reader interface | |
c9410 | // ReadBytes works like bufio.ReadBytes | |
c9411 | // SkipBytes works like ReadBytes but skips all read data. | |
c9412 | // ReadString works like bufio.ReadString | |
c9413 | // ReadUntilIndex reads from connection until one of delimiters occurs. Returns
// read data and an index of delimiter or error. | |
c9414 | // ReadUntil works like ReadUntilIndex but don't return a delimiter index. | |
c9415 | // SkipUntilIndex works like ReadUntilIndex but skips all read data. | |
c9416 | // SkipUntil works like ReadUntil but skips all read data. | |
c9417 | // Write is for implement an io.Writer interface | |
c9418 | // This function will only be invoked during daemon start | |
c9419 | // This function should be put into the main process or somewhere that can be
// use to init the network namespace trap. | |
c9420 | // fatal prints the error's details if it is a runv specific error type
// then exits the program with an exit status of 1. | |
c9421 | // Error in spec, which is either mistake format or content inconsistency, and
// is checked when elements are being added to Sandbox. | |
c9422 | // On ARM platform, we have different gic interrupt controllers.
// We have to detect the correct gic chip to set parameter for lkvm. | |
c9423 | // boot vm from template, the returned vm is paused | |
c9424 | // Return locked processlist, which needs to be released by caller after using | |
c9425 | // NewServer initializes a brand new grpc server with registered grpc services | |
c9426 | // machineID returns the key MachineGuid in registry `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography`.
// If there is an error running the commad an empty string is returned. | |
c9427 | // ProtectedID returns a hashed version of the machine ID in a cryptographically secure way,
// using a fixed, application-specific key.
// Internally, this function calculates HMAC-SHA256 of the application ID, keyed by the machine ID. | |
c9428 | // machineID returns the uuid returned by `ioreg -rd1 -c IOPlatformExpertDevice`.
// If there is an error running the commad an empty string is returned. | |
c9429 | // run wraps `exec.Command` with easy access to stdout and stderr. | |
c9430 | // protect calculates HMAC-SHA256 of the application ID, keyed by the machine ID and returns a hex-encoded string. | |
c9431 | // Headers generates a map that can be used as headers to authenticate a request | |
c9432 | // NewFake returns a Fake that loads the package and finds the interface or the
// function. | |
c9433 | // IsInterface indicates whether the fake is for an interface. | |
c9434 | // IsFunction indicates whether the fake is for a function.. | |
c9435 | // Generate uses the Fake to generate an implementation, optionally running
// goimports on the output. | |
c9436 | // interfaceMethodSet identifies the methods that are exported for a given
// interface. | |
c9437 | // Slices returns those params that are a slice. | |
c9438 | // WithPrefix builds a string representing a functions parameters, and adds a
// prefix to each. | |
c9439 | // AsArgs builds a string that represents the parameters to a function as
// arguments to a function invocation. | |
c9440 | // AsNamedArgsWithTypes builds a string that represents parameters as named
// arugments to a function, with associated types. | |
c9441 | // AsNamedArgs builds a string that represents parameters as named arguments. | |
c9442 | // AsNamedArgsForInvocation builds a string that represents a function's
// arguments as required for invocation of the function. | |
c9443 | // AsReturnSignature builds a string representing signature for the params of
// a function. | |
c9444 | // String returns a string that may be used as an import line in a go source
// file. Imports with aliases that match the package basename are printed without
// an alias. | |
c9445 | // Add creates an import with the given alias and path, and adds it to
// Fake.Imports. | |
c9446 | // AliasForPackage returns a package alias for the package. | |
c9447 | // packageMethodSet identifies the functions that are exported from a given
// package. | |
c9448 | // addImportsFor inspects the given type and adds imports to the fake if importable
// types are found. | |
c9449 | // WithPrefix builds a string representing the parameters returned from a
// function, and adds a prefix to each. | |
c9450 | // AsArgs builds a string representing the arguments passed to a function. | |
c9451 | // AsNamedArgsWithTypes builds a string representing a function's named
// arguments, with associated types. | |
c9452 | // AsNamedArgs builds a string representing a function's named arguments. | |
c9453 | // AsReturnSignature builds a string representing signature for the returns of
// a function. | |
c9454 | // noop new, but in the future we may want to do some init work. | |
c9455 | // NewPeerstore creates a peerstore backed by the provided persistent datastore. | |
c9456 | // uniquePeerIds extracts and returns unique peer IDs from database keys. | |
c9457 | // RecordLatency records a new latency measurement | |
c9458 | // LatencyEWMA returns an exponentially-weighted moving avg.
// of all measurements of a peer's latency. | |
c9459 | // NewPopulatedProtoAddr generates a populated instance of the custom gogo type ProtoAddr.
// It is required by gogo-generated tests. | |
c9460 | // NewPopulatedProtoPeerID generates a populated instance of the custom gogo type ProtoPeerID.
// It is required by gogo-generated tests. | |
c9461 | // background periodically schedules a gc | |
c9462 | // gc garbage collects the in-memory address book. | |
c9463 | // UpdateAddrs updates the addresses associated with the given peer that have
// the given oldTTL to have the given newTTL. | |
c9464 | // ClearAddrs removes all previously stored addresses | |
c9465 | // Used internally by the address stream coroutine to remove a subscription
// from the manager. | |
c9466 | // BroadcastAddr broadcasts a new address to all subscribed streams. | |
c9467 | // AddrStream creates a new subscription for a given peer ID, pre-populating the
// channel with any addresses we might already have on file. | |
c9468 | // NewPeerstore creates a data structure that stores peer data, backed by the
// supplied implementations of KeyBook, AddrBook and PeerMetadata. | |
c9469 | // gc prunes expired addresses from the datastore at regular intervals. It should be spawned as a goroutine. | |
c9470 | // flush writes the record to the datastore by calling ds.Put, unless the record is
// marked for deletion, in which case we call ds.Delete. To be called within a lock. | |
c9471 | // AddAddr will add a new address if it's not already in the AddrBook. | |
c9472 | // AddAddrs will add many new addresses if they're not already in the AddrBook. | |
c9473 | // SetAddr will add or update the TTL of an address in the AddrBook. | |
c9474 | // SetAddrs will add or update the TTLs of addresses in the AddrBook. | |
c9475 | // UpdateAddrs will update any addresses for a given peer and TTL combination to
// have a new TTL. | |
c9476 | // Addrs returns all of the non-expired addresses for a given peer. | |
c9477 | // Peers returns all of the peer IDs for which the AddrBook has addresses. | |
c9478 | // ClearAddrs will delete all known addresses for a peer ID. | |
c9479 | // NewChanQueue creates a ChanQueue by wrapping pq. | |
c9480 | // AddQueryParameters adds query parameters to the URL. | |
c9481 | // BuildRequestObject creates the HTTP request object. | |
c9482 | // MakeRequest makes the API call. | |
c9483 | // BuildResponse builds the response struct. | |
c9484 | // The following functions enable the ability to define a
// custom HTTP Client
// MakeRequest makes the API call. | |
c9485 | // Send will build your request, make the request, and build your response. | |
c9486 | // Parse returns Result and error if any. If have not matches it returns nil, nil. | |
c9487 | // Add adds given rules to the main chain. | |
c9488 | // Use adds give functions to middlewares. | |
c9489 | // New returns Parser initialised with given options. | |
c9490 | // NewBreakerWithOptions creates a base breaker with a specified backoff, clock and TripFunc | |
c9491 | // NewRateBreaker creates a Breaker with a RateTripFunc. | |
c9492 | // Subscribe returns a channel of BreakerEvents. Whenever the breaker changes state,
// the state will be sent over the channel. See BreakerEvent for the types of events. | |
c9493 | // AddListener adds a channel of ListenerEvents on behalf of a listener.
// The listener channel must be buffered. | |
c9494 | // RemoveListener removes a channel previously added via AddListener.
// Once removed, the channel will no longer receive ListenerEvents.
// Returns true if the listener was found and removed. | |
c9495 | // ResetCounters will reset only the failures, consecFailures, and success counters | |
c9496 | // Fail is used to indicate a failure condition the Breaker should record. It will
// increment the failure counters and store the time of the last failure. If the
// breaker has a TripFunc it will be called, tripping the breaker if necessary. | |
c9497 | // Ready will return true if the circuit breaker is ready to call the function.
// It will be ready if the breaker is in a reset state, or if it is time to retry
// the call for auto resetting. | |
c9498 | // Call wraps a function the Breaker will protect. A failure is recorded
// whenever the function returns an error. If the called function takes longer
// than timeout to run, a failure will be recorded. | |
c9499 | // CallContext is same as Call but if the ctx is canceled after the circuit returned an error,
// the error will not be marked as a failure because the call was canceled intentionally. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.