_id
stringlengths
2
7
text
stringlengths
6
2.61k
title
stringclasses
1 value
c174500
// tickHeartbeat is run by leaders to send a MsgBeat after r.heartbeatTimeout.
c174501
// stepCandidate is shared by StateCandidate and StatePreCandidate; the difference is // whether they respond to MsgVoteResp or MsgPreVoteResp.
c174502
// restore recovers the state machine from a snapshot. It restores the log and the // configuration of state machine.
c174503
// promotable indicates whether state machine can be promoted to leader, // which is true when its own id is in progress list.
c174504
// checkQuorumActive returns true if the quorum is active from // the view of the local raft state machine. Otherwise, it returns // false. // checkQuorumActive also resets all RecentActive to false.
c174505
// increaseUncommittedSize computes the size of the proposed entries and // determines whether they would push leader over its maxUncommittedSize limit. // If the new entries would exceed the limit, the method returns false. If not, // the increase in uncommitted entry size is recorded and the method returns // true.
c174506
// reduceUncommittedSize accounts for the newly committed entries by decreasing // the uncommitted entry size limit.
c174507
// newPeriodic creates a new instance of Periodic compactor that purges // the log older than h Duration.
c174508
// Pause pauses periodic compactor.
c174509
// Resume resumes periodic compactor.
c174510
// Lock locks the mutex with a cancelable context. If the context is canceled // while trying to acquire the lock, the mutex tries to clean its stale lock entry.
c174511
// NewLocker creates a sync.Locker backed by an etcd mutex.
c174512
// NewFIFOScheduler returns a Scheduler that schedules jobs in FIFO // order sequentially
c174513
// Schedule schedules a job that will be ran in FIFO order sequentially.
c174514
// Stop stops the scheduler and cancels all pending jobs.
c174515
// NewServer returns a new agent server.
c174516
// StartServe starts serving agent server.
c174517
// Stop stops serving gRPC server.
c174518
// Transport communicates with etcd tester.
c174519
// RegisterInterruptHandler registers a new InterruptHandler. Handlers registered // after interrupt handing was initiated will not be executed.
c174520
// HandleInterrupts calls the handler functions on receiving a SIGINT or SIGTERM.
c174521
// OpGet returns "get" operation based on given key and operation options.
c174522
// OpDelete returns "delete" operation based on given key and operation options.
c174523
// OpPut returns "put" operation based on given key-value and operation options.
c174524
// OpTxn returns "txn" operation based on given transaction conditions.
c174525
// WithFromKey specifies the range of 'Get', 'Delete', 'Watch' requests // to be equal or greater than the key in the argument.
c174526
// withTop gets the first key over the get's prefix given a sort order
c174527
// Exist returns true if there are any files in a given directory.
c174528
// NewListener creates a new listner.
c174529
// cafiles returns a list of CA file paths.
c174530
// ServerConfig generates a tls.Config object for use by an HTTP server.
c174531
// ClientConfig generates a tls.Config object for use by an HTTP client.
c174532
// applyV2Request interprets r as a call to v2store.X // and returns a Response interpreted from v2store.Event
c174533
// NewRoleCommand returns the cobra command for "role".
c174534
// roleAddCommandFunc executes the "role add" command.
c174535
// roleGetCommandFunc executes the "role get" command.
c174536
// roleGrantPermissionCommandFunc executes the "role grant-permission" command.
c174537
// roleRevokePermissionCommandFunc executes the "role revoke-permission" command.
c174538
// NewCluster returns an unlaunched cluster of the given size which has been // set to use static bootstrap.
c174539
// NewClusterByConfig returns an unlaunched cluster defined by a cluster configuration
c174540
// HTTPMembers returns a list of all active members as client.Members
c174541
// waitLeader waits until given members agree on the same leader.
c174542
// waitNoLeader waits until given members lose leader.
c174543
// isMembersEqual checks whether two members equal except ID field. // The given wmembs should always set ID field to empty string.
c174544
// listenGRPC starts a grpc server over a unix domain socket on the member
c174545
// NewClientV3 creates a new grpc client connection to the member
c174546
// Clone returns a member with the same server configuration. The returned // member will not set PeerListeners and ClientListeners.
c174547
// Close stops the member's etcdserver and closes its connections
c174548
// Stop stops the member, but the data dir of the member is preserved.
c174549
// checkLeaderTransition waits for leader transition, returning the new leader ID.
c174550
// Restart starts the member using the preserved data dir.
c174551
// Terminate stops the member and removes the data dir.
c174552
// Metric gets the metric value for a member
c174553
// InjectPartition drops connections from m to others, vice versa.
c174554
// RecoverPartition recovers connections from m to others, vice versa.
c174555
// NewClusterV3 returns a launched cluster with a grpc client connection // for each cluster member.
c174556
// ParseWithDefaults will load options from the specified map or set defaults where appropriate
c174557
// Parse will load options from the specified map
c174558
// Key will parse and return the appropriately typed key for the selected signature method
c174559
// fill populates pb.ResponseHeader using etcdserver information
c174560
// add puts a watcher into receiving a broadcast if its revision at least // meets the broadcast revision. Returns true if added.
c174561
// Watch creates a new watcher in the stream and returns its WatchID.
c174562
// newFileEncoder creates a new encoder with current file offset for the page writer.
c174563
// purgeFile is the internal implementation for PurgeFile which can post purged files to purgec if non-nil.
c174564
// Set parses a command line set of strings, separated by comma. // Implements "flag.Value" interface.
c174565
// NewStringsValue implements string slice as "flag.Value" interface. // Given value is to be separated by comma.
c174566
// StringsFromFlag returns a string slice from the flag.
c174567
// Cluster only keeps the major.minor.
c174568
// NewPageWriter creates a new PageWriter. pageBytes is the number of bytes // to write per page. pageOffset is the starting offset of io.Writer.
c174569
// Watch function returns a Watcher. // If recursive is true, the first change after index under key will be sent to the event channel of the watcher. // If recursive is false, the first change after index at key will be sent to the event channel of the watcher. // If index is zero, watch will start from the current in...
c174570
// notify function accepts an event and notify to the watchers.
c174571
// clone function clones the watcherHub and return the cloned one. // only clone the static content. do not clone the current watchers.
c174572
// isHidden checks to see if key path is considered hidden to watch path i.e. the // last element is hidden or it's within a hidden directory
c174573
// just archive the first file
c174574
// start but do not wait for it to complete
c174575
// SIGQUIT to exit with stackstrace
c174576
// stop proxy, etcd, delete data directory
c174577
// LimitListener returns a Listener that accepts at most n simultaneous // connections from the provided Listener.
c174578
// allowMethod verifies that the given method is one of the allowed methods, // and if not, it writes an error to w. A boolean is returned indicating // whether or not the method is allowed.
c174579
// NewWatchServer returns a new watch server.
c174580
// FiltersFromRequest returns "mvcc.FilterFunc" from a given watch create request.
c174581
// newPipelineHandler returns a handler for handling raft messages // from pipeline for RaftPrefix. // // The handler reads out the raft message from request body, // and forwards it to the given raft state machine for processing.
c174582
// checkClusterCompatibilityFromHeader checks the cluster compatibility of // the local member from the given header. // It checks whether the version of local member is compatible with // the versions in the header, and whether the cluster ID of local member // matches the one in the header.
c174583
// KeyExists returns a comparison operation that evaluates to true iff the given // key exists. It does this by checking if the key `Version` is greater than 0. // It is a useful guard in transaction delete operations.
c174584
// KeyMissing returns a comparison operation that evaluates to true iff the // given key does not exist.
c174585
// ValidateSecureEndpoints scans the given endpoints against tls info, returning only those // endpoints that could be validated as secure.
c174586
// putNewKV attempts to create the given key, only succeeding if the key did // not yet exist.
c174587
// newUniqueEphemeralKey creates a new unique valueless key associated with a session lease
c174588
// NewUpdateDirCommand returns the CLI command for "updatedir".
c174589
// updatedirCommandFunc executes the "updatedir" command.
c174590
// handleBackup handles a request that intends to do a backup.
c174591
// saveDB copies the v3 backend and strips cluster information.
c174592
// NewWatchCommand returns the cobra command for "watcher runner".
c174593
// NewV3 returns a new snapshot Manager for v3.x snapshot.
c174594
// Save fetches snapshot from remote etcd server and saves data to target path.
c174595
// Status returns the snapshot file information.
c174596
// Restore restores a new etcd data directory from given snapshot file.
c174597
// NewAuthStore creates a new AuthStore.
c174598
// NewTokenProvider creates a new token provider.
c174599
// MendPeer recovers the message dropping behavior of the given peer.