_id stringlengths 2 7 | title stringclasses 1
value | partition stringclasses 3
values | text stringlengths 6 2.61k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
c174600 | test | // the caller of this function must have the peers mutex. | {
"resource": ""
} | ||
c174601 | test | // ActivePeers returns a channel that closes when an initial
// peer connection has been established. Use this to wait until the
// first peer connection becomes active. | {
"resource": ""
} | ||
c174602 | test | // taken from go's ResolveTCP code but uses configurable ctx | {
"resource": ""
} | ||
c174603 | test | // resolveTCPAddrs is a convenience wrapper for net.ResolveTCPAddr.
// resolveTCPAddrs return a new set of url.URLs, in which all DNS hostnames
// are resolved. | {
"resource": ""
} | ||
c174604 | test | // urlsEqual checks equality of url.URLS between two arrays.
// This check pass even if an URL is in hostname and opposite is in IP address. | {
"resource": ""
} | ||
c174605 | test | // URLStringsEqual returns "true" if given URLs are valid
// and resolved to same IP addresses. Otherwise, return "false"
// and error, if any. | {
"resource": ""
} | ||
c174606 | test | // NewLeaseCommand returns the cobra command for "lease". | {
"resource": ""
} | ||
c174607 | test | // NewLeaseGrantCommand returns the cobra command for "lease grant". | {
"resource": ""
} | ||
c174608 | test | // leaseGrantCommandFunc executes the "lease grant" command. | {
"resource": ""
} | ||
c174609 | test | // NewLeaseRevokeCommand returns the cobra command for "lease revoke". | {
"resource": ""
} | ||
c174610 | test | // leaseRevokeCommandFunc executes the "lease grant" command. | {
"resource": ""
} | ||
c174611 | test | // NewLeaseTimeToLiveCommand returns the cobra command for "lease timetolive". | {
"resource": ""
} | ||
c174612 | test | // leaseTimeToLiveCommandFunc executes the "lease timetolive" command. | {
"resource": ""
} | ||
c174613 | test | // NewLeaseListCommand returns the cobra command for "lease list". | {
"resource": ""
} | ||
c174614 | test | // leaseListCommandFunc executes the "lease list" command. | {
"resource": ""
} | ||
c174615 | test | // NewLeaseKeepAliveCommand returns the cobra command for "lease keep-alive". | {
"resource": ""
} | ||
c174616 | test | // leaseKeepAliveCommandFunc executes the "lease keep-alive" command. | {
"resource": ""
} | ||
c174617 | test | // NewAlarmCommand returns the cobra command for "alarm". | {
"resource": ""
} | ||
c174618 | test | // alarmDisarmCommandFunc executes the "alarm disarm" command. | {
"resource": ""
} | ||
c174619 | test | // alarmListCommandFunc executes the "alarm list" command. | {
"resource": ""
} | ||
c174620 | test | // Flags returns etcd flags in string slice. | {
"resource": ""
} | ||
c174621 | test | // EmbedConfig returns etcd embed.Config. | {
"resource": ""
} | ||
c174622 | test | // PProfHandlers returns a map of pprof handlers keyed by the HTTP path. | {
"resource": ""
} | ||
c174623 | test | // NewBackendQuota creates a quota layer with the given storage limit. | {
"resource": ""
} | ||
c174624 | test | // NewClusterProxy takes optional prefix to fetch grpc-proxy member endpoints.
// The returned channel is closed when there is grpc-proxy endpoint registered
// and the client's context is canceled so the 'register' loop returns. | {
"resource": ""
} | ||
c174625 | test | // NewHandler returns an http Handler for lease renewals | {
"resource": ""
} | ||
c174626 | test | // TimeToLiveHTTP retrieves lease information of the given lease ID. | {
"resource": ""
} | ||
c174627 | test | // newWatcherBatch maps watchers to their matched events. It enables quick
// events look up by watcher. | {
"resource": ""
} | ||
c174628 | test | // add puts a watcher in the group. | {
"resource": ""
} | ||
c174629 | test | // contains is whether the given key has a watcher in the group. | {
"resource": ""
} | ||
c174630 | test | // delete removes a watcher from the group. | {
"resource": ""
} | ||
c174631 | test | // choose selects watchers from the watcher group to update | {
"resource": ""
} | ||
c174632 | test | // watcherSetByKey gets the set of watchers that receive events on the given key. | {
"resource": ""
} | ||
c174633 | test | // Compare on an interval gives == if the interval overlaps. | {
"resource": ""
} | ||
c174634 | test | // successor is the next in-order node in the tree | {
"resource": ""
} | ||
c174635 | test | // updateMax updates the maximum values for a node and its ancestors | {
"resource": ""
} | ||
c174636 | test | // visit will call a node visitor on each node that overlaps the given interval | {
"resource": ""
} | ||
c174637 | test | // Delete removes the node with the given interval from the tree, returning
// true if a node is in fact removed. | {
"resource": ""
} | ||
c174638 | test | // Insert adds a node with the given interval into the tree. | {
"resource": ""
} | ||
c174639 | test | // rotateLeft moves x so it is left of its right child | {
"resource": ""
} | ||
c174640 | test | // replaceParent replaces x's parent with y | {
"resource": ""
} | ||
c174641 | test | // MaxHeight is the expected maximum tree height given the number of nodes | {
"resource": ""
} | ||
c174642 | test | // Visit calls a visitor function on every tree node intersecting the given interval.
// It will visit each interval [x, y) in ascending order sorted on x. | {
"resource": ""
} | ||
c174643 | test | // find the exact node for a given interval | {
"resource": ""
} | ||
c174644 | test | // Find gets the IntervalValue for the node matching the given interval | {
"resource": ""
} | ||
c174645 | test | // Intersects returns true if there is some tree node intersecting the given interval. | {
"resource": ""
} | ||
c174646 | test | // Contains returns true if the interval tree's keys cover the entire given interval. | {
"resource": ""
} | ||
c174647 | test | // Stab returns a slice with all elements in the tree intersecting the interval. | {
"resource": ""
} | ||
c174648 | test | // Union merges a given interval tree into the receiver. | {
"resource": ""
} | ||
c174649 | test | // NewExactReadCloser returns a ReadCloser that returns errors if the underlying
// reader does not read back exactly the requested number of bytes. | {
"resource": ""
} | ||
c174650 | test | // NewElection returns a new election on a given key prefix. | {
"resource": ""
} | ||
c174651 | test | // ResumeElection initializes an election with a known leader. | {
"resource": ""
} | ||
c174652 | test | // Proclaim lets the leader announce a new value without another election. | {
"resource": ""
} | ||
c174653 | test | // Resign lets a leader start a new election. | {
"resource": ""
} | ||
c174654 | test | // Leader returns the leader value for the current election. | {
"resource": ""
} | ||
c174655 | test | // Observe returns a channel that reliably observes ordered leader proposals
// as GetResponse values on every current elected leader key. It will not
// necessarily fetch all historical leader updates, but will always post the
// most recent leader value.
//
// The channel closes when the context is canceled or the un... | {
"resource": ""
} | ||
c174656 | test | // check whether request satisfies the quota. If there is not enough space,
// ignore request and raise the free space alarm. | {
"resource": ""
} | ||
c174657 | test | // NewExecWatchCommand returns the CLI command for "exec-watch". | {
"resource": ""
} | ||
c174658 | test | // execWatchCommandFunc executes the "exec-watch" command. | {
"resource": ""
} | ||
c174659 | test | // NewListener returns a listener for raft message transfer between peers.
// It uses timeout listener to identify broken streams promptly. | {
"resource": ""
} | ||
c174660 | test | // NewRoundTripper returns a roundTripper used to send requests
// to rafthttp listener of remote peers. | {
"resource": ""
} | ||
c174661 | test | // createPostRequest creates a HTTP POST request that sends raft message. | {
"resource": ""
} | ||
c174662 | test | // checkPostResponse checks the response of the HTTP POST request that sends
// raft message. | {
"resource": ""
} | ||
c174663 | test | // serverVersion returns the server version from the given header. | {
"resource": ""
} | ||
c174664 | test | // checkVersionCompatibility checks whether the given version is compatible
// with the local version. | {
"resource": ""
} | ||
c174665 | test | // setPeerURLsHeader reports local urls for peer discovery | {
"resource": ""
} | ||
c174666 | test | // addRemoteFromRequest adds a remote peer according to an http request header | {
"resource": ""
} | ||
c174667 | test | // NewKeysAPIWithPrefix acts like NewKeysAPI, but allows the caller
// to provide a custom base URL path. This should only be used in
// very rare cases. | {
"resource": ""
} | ||
c174668 | test | // TTLDuration returns the Node's TTL as a time.Duration object | {
"resource": ""
} | ||
c174669 | test | // SetPflagsFromEnv is similar to SetFlagsFromEnv. However, the accepted flagset type is pflag.FlagSet
// and it does not do any logging. | {
"resource": ""
} | ||
c174670 | test | // FlagToEnv converts flag string to upper-case environment variable key string. | {
"resource": ""
} | ||
c174671 | test | // excerpt replaces middle part with ellipsis and returns a double-quoted
// string safely escaped with Go syntax. | {
"resource": ""
} | ||
c174672 | test | // The 9 pass functions below takes the raftpb.Entry and return if the entry should be printed and the type of entry,
// the type of the entry will used in the following print function | {
"resource": ""
} | ||
c174673 | test | // The 4 print functions below print the entry format based on there types
// printInternalRaftRequest is used to print entry information for IRRRange, IRRPut,
// IRRDeleteRange and IRRTxn entries | {
"resource": ""
} | ||
c174674 | test | // listEntriesType filters and prints entries based on the entry-type flag, | {
"resource": ""
} | ||
c174675 | test | // newLog returns log using the given storage and default options. It
// recovers the log to the state that it just commits and applies the
// latest snapshot. | {
"resource": ""
} | ||
c174676 | test | // newLogWithSize returns a log using the given storage and max
// message size. | {
"resource": ""
} | ||
c174677 | test | // findConflict finds the index of the conflict.
// It returns the first pair of conflicting entries between the existing
// entries and the given entries, if there are any.
// If there is no conflicting entries, and the existing entries contains
// all the given entries, zero will be returned.
// If there is no confli... | {
"resource": ""
} | ||
c174678 | test | // nextEnts returns all the available entries for execution.
// If applied is smaller than the index of snapshot, it returns all committed
// entries after the index of snapshot. | {
"resource": ""
} | ||
c174679 | test | // allEntries returns all entries in the log. | {
"resource": ""
} | ||
c174680 | test | // slice returns a slice of log entries from lo through hi-1, inclusive. | {
"resource": ""
} | ||
c174681 | test | // NewSession gets the leased session for a client. | {
"resource": ""
} | ||
c174682 | test | // Close orphans the session and revokes the session lease. | {
"resource": ""
} | ||
c174683 | test | // WithTTL configures the session's TTL in seconds.
// If TTL is <= 0, the default 60 seconds TTL will be used. | {
"resource": ""
} | ||
c174684 | test | // WithLease specifies the existing leaseID to be used for the session.
// This is useful in process restart scenario, for example, to reclaim
// leadership from an election prior to restart. | {
"resource": ""
} | ||
c174685 | test | // addRequest adds a read only reuqest into readonly struct.
// `index` is the commit index of the raft state machine when it received
// the read only request.
// `m` is the original read only request message from the local or remote node. | {
"resource": ""
} | ||
c174686 | test | // recvAck notifies the readonly struct that the raft state machine received
// an acknowledgment of the heartbeat that attached with the read only request
// context. | {
"resource": ""
} | ||
c174687 | test | // advance advances the read only request queue kept by the readonly struct.
// It dequeues the requests until it finds the read only request that has
// the same context as the given `m`. | {
"resource": ""
} | ||
c174688 | test | // lastPendingRequestCtx returns the context of the last pending read only
// request in readonly struct. | {
"resource": ""
} | ||
c174689 | test | // Start performs any initialization of the Server necessary for it to
// begin serving requests. It must be called before Do or Process.
// Start must be non-blocking; any long-running server functionality
// should be implemented in goroutines. | {
"resource": ""
} | ||
c174690 | test | // start prepares and starts server in a new goroutine. It is no longer safe to
// modify a server's fields after it has been sent to Start.
// This function is just used for testing. | {
"resource": ""
} | ||
c174691 | test | // Process takes a raft message and applies it to the server's raft state
// machine, respecting any timeout of the given context. | {
"resource": ""
} | ||
c174692 | test | // ReportSnapshot reports snapshot sent status to the raft state machine,
// and clears the used snapshot from the snapshot store. | {
"resource": ""
} | ||
c174693 | test | // MoveLeader transfers the leader to the given transferee. | {
"resource": ""
} | ||
c174694 | test | // TransferLeadership transfers the leader to the chosen transferee. | {
"resource": ""
} | ||
c174695 | test | // configure sends a configuration change through consensus and
// then waits for it to be applied to the server. It
// will block until the change is performed or there is an error. | {
"resource": ""
} | ||
c174696 | test | // sync proposes a SYNC request and is non-blocking.
// This makes no guarantee that the request will be proposed or performed.
// The request will be canceled after the given timeout. | {
"resource": ""
} | ||
c174697 | test | // publish registers server information into the cluster. The information
// is the JSON representation of this server's member struct, updated with the
// static clientURLs of the server.
// The function keeps attempting to register until it succeeds,
// or its server is stopped. | {
"resource": ""
} | ||
c174698 | test | // applyEntryNormal apples an EntryNormal type raftpb request to the EtcdServer | {
"resource": ""
} | ||
c174699 | test | // applyConfChange applies a ConfChange to the server. It is only
// invoked with a ConfChange that has already passed through Raft | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.