_id stringlengths 2 7 | text stringlengths 6 2.61k | title stringclasses 1
value |
|---|---|---|
c174600 | // the caller of this function must have the peers mutex. | |
c174601 | // 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. | |
c174602 | // taken from go's ResolveTCP code but uses configurable ctx | |
c174603 | // resolveTCPAddrs is a convenience wrapper for net.ResolveTCPAddr.
// resolveTCPAddrs return a new set of url.URLs, in which all DNS hostnames
// are resolved. | |
c174604 | // 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. | |
c174605 | // URLStringsEqual returns "true" if given URLs are valid
// and resolved to same IP addresses. Otherwise, return "false"
// and error, if any. | |
c174606 | // NewLeaseCommand returns the cobra command for "lease". | |
c174607 | // NewLeaseGrantCommand returns the cobra command for "lease grant". | |
c174608 | // leaseGrantCommandFunc executes the "lease grant" command. | |
c174609 | // NewLeaseRevokeCommand returns the cobra command for "lease revoke". | |
c174610 | // leaseRevokeCommandFunc executes the "lease grant" command. | |
c174611 | // NewLeaseTimeToLiveCommand returns the cobra command for "lease timetolive". | |
c174612 | // leaseTimeToLiveCommandFunc executes the "lease timetolive" command. | |
c174613 | // NewLeaseListCommand returns the cobra command for "lease list". | |
c174614 | // leaseListCommandFunc executes the "lease list" command. | |
c174615 | // NewLeaseKeepAliveCommand returns the cobra command for "lease keep-alive". | |
c174616 | // leaseKeepAliveCommandFunc executes the "lease keep-alive" command. | |
c174617 | // NewAlarmCommand returns the cobra command for "alarm". | |
c174618 | // alarmDisarmCommandFunc executes the "alarm disarm" command. | |
c174619 | // alarmListCommandFunc executes the "alarm list" command. | |
c174620 | // Flags returns etcd flags in string slice. | |
c174621 | // EmbedConfig returns etcd embed.Config. | |
c174622 | // PProfHandlers returns a map of pprof handlers keyed by the HTTP path. | |
c174623 | // NewBackendQuota creates a quota layer with the given storage limit. | |
c174624 | // 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. | |
c174625 | // NewHandler returns an http Handler for lease renewals | |
c174626 | // TimeToLiveHTTP retrieves lease information of the given lease ID. | |
c174627 | // newWatcherBatch maps watchers to their matched events. It enables quick
// events look up by watcher. | |
c174628 | // add puts a watcher in the group. | |
c174629 | // contains is whether the given key has a watcher in the group. | |
c174630 | // delete removes a watcher from the group. | |
c174631 | // choose selects watchers from the watcher group to update | |
c174632 | // watcherSetByKey gets the set of watchers that receive events on the given key. | |
c174633 | // Compare on an interval gives == if the interval overlaps. | |
c174634 | // successor is the next in-order node in the tree | |
c174635 | // updateMax updates the maximum values for a node and its ancestors | |
c174636 | // visit will call a node visitor on each node that overlaps the given interval | |
c174637 | // Delete removes the node with the given interval from the tree, returning
// true if a node is in fact removed. | |
c174638 | // Insert adds a node with the given interval into the tree. | |
c174639 | // rotateLeft moves x so it is left of its right child | |
c174640 | // replaceParent replaces x's parent with y | |
c174641 | // MaxHeight is the expected maximum tree height given the number of nodes | |
c174642 | // 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. | |
c174643 | // find the exact node for a given interval | |
c174644 | // Find gets the IntervalValue for the node matching the given interval | |
c174645 | // Intersects returns true if there is some tree node intersecting the given interval. | |
c174646 | // Contains returns true if the interval tree's keys cover the entire given interval. | |
c174647 | // Stab returns a slice with all elements in the tree intersecting the interval. | |
c174648 | // Union merges a given interval tree into the receiver. | |
c174649 | // NewExactReadCloser returns a ReadCloser that returns errors if the underlying
// reader does not read back exactly the requested number of bytes. | |
c174650 | // NewElection returns a new election on a given key prefix. | |
c174651 | // ResumeElection initializes an election with a known leader. | |
c174652 | // Proclaim lets the leader announce a new value without another election. | |
c174653 | // Resign lets a leader start a new election. | |
c174654 | // Leader returns the leader value for the current election. | |
c174655 | // 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... | |
c174656 | // check whether request satisfies the quota. If there is not enough space,
// ignore request and raise the free space alarm. | |
c174657 | // NewExecWatchCommand returns the CLI command for "exec-watch". | |
c174658 | // execWatchCommandFunc executes the "exec-watch" command. | |
c174659 | // NewListener returns a listener for raft message transfer between peers.
// It uses timeout listener to identify broken streams promptly. | |
c174660 | // NewRoundTripper returns a roundTripper used to send requests
// to rafthttp listener of remote peers. | |
c174661 | // createPostRequest creates a HTTP POST request that sends raft message. | |
c174662 | // checkPostResponse checks the response of the HTTP POST request that sends
// raft message. | |
c174663 | // serverVersion returns the server version from the given header. | |
c174664 | // checkVersionCompatibility checks whether the given version is compatible
// with the local version. | |
c174665 | // setPeerURLsHeader reports local urls for peer discovery | |
c174666 | // addRemoteFromRequest adds a remote peer according to an http request header | |
c174667 | // NewKeysAPIWithPrefix acts like NewKeysAPI, but allows the caller
// to provide a custom base URL path. This should only be used in
// very rare cases. | |
c174668 | // TTLDuration returns the Node's TTL as a time.Duration object | |
c174669 | // SetPflagsFromEnv is similar to SetFlagsFromEnv. However, the accepted flagset type is pflag.FlagSet
// and it does not do any logging. | |
c174670 | // FlagToEnv converts flag string to upper-case environment variable key string. | |
c174671 | // excerpt replaces middle part with ellipsis and returns a double-quoted
// string safely escaped with Go syntax. | |
c174672 | // 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 | |
c174673 | // 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 | |
c174674 | // listEntriesType filters and prints entries based on the entry-type flag, | |
c174675 | // 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. | |
c174676 | // newLogWithSize returns a log using the given storage and max
// message size. | |
c174677 | // 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... | |
c174678 | // 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. | |
c174679 | // allEntries returns all entries in the log. | |
c174680 | // slice returns a slice of log entries from lo through hi-1, inclusive. | |
c174681 | // NewSession gets the leased session for a client. | |
c174682 | // Close orphans the session and revokes the session lease. | |
c174683 | // WithTTL configures the session's TTL in seconds.
// If TTL is <= 0, the default 60 seconds TTL will be used. | |
c174684 | // 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. | |
c174685 | // 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. | |
c174686 | // recvAck notifies the readonly struct that the raft state machine received
// an acknowledgment of the heartbeat that attached with the read only request
// context. | |
c174687 | // 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`. | |
c174688 | // lastPendingRequestCtx returns the context of the last pending read only
// request in readonly struct. | |
c174689 | // 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. | |
c174690 | // 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. | |
c174691 | // Process takes a raft message and applies it to the server's raft state
// machine, respecting any timeout of the given context. | |
c174692 | // ReportSnapshot reports snapshot sent status to the raft state machine,
// and clears the used snapshot from the snapshot store. | |
c174693 | // MoveLeader transfers the leader to the given transferee. | |
c174694 | // TransferLeadership transfers the leader to the chosen transferee. | |
c174695 | // 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. | |
c174696 | // 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. | |
c174697 | // 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. | |
c174698 | // applyEntryNormal apples an EntryNormal type raftpb request to the EtcdServer | |
c174699 | // applyConfChange applies a ConfChange to the server. It is only
// invoked with a ConfChange that has already passed through Raft |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.