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