_id
stringlengths
2
7
text
stringlengths
6
2.61k
title
stringclasses
1 value
c175000
// NewSetCommand returns the CLI command for "set".
c175001
// setCommandFunc executes the "set" command.
c175002
// waitOnLowest will wait on the last key with a revision < rwm.myKey.Revision with a // given prefix. If there are no keys left to wait on, return true.
c175003
// GetDefaultInterfaces fetches the device name of default routable interface.
c175004
// NewSnapshotCommand returns the cobra command for "snapshot".
c175005
// NewMoveLeaderCommand returns the cobra command for "move-leader".
c175006
// transferLeadershipCommandFunc executes the "compaction" command.
c175007
// OpenDir opens a directory in windows with write access for syncing.
c175008
// NewRemoveDirCommand returns the CLI command for "rmdir".
c175009
// rmdirCommandFunc executes the "rmdir" command.
c175010
// NewDelCommand returns the cobra command for "del".
c175011
// delCommandFunc executes the "del" command.
c175012
// NewExpect creates a new process for expect testing.
c175013
// NewExpectWithEnv creates a new process with user defined env variables for expect testing.
c175014
// ExpectFunc returns the first line satisfying the function f.
c175015
// Expect returns the first line containing the given string.
c175016
// LineCount returns the number of recorded lines since // the beginning of the process.
c175017
// Signal sends a signal to the expect process
c175018
// keyFunc returns the key of a request, which is used to look up its caching response in the cache.
c175019
// Add adds the response of a request to the cache if its revision is larger than the compacted revision of the cache.
c175020
// Get looks up the caching response for a given request. // Get is also responsible for lazy eviction when accessing compacted entries.
c175021
// Invalidate invalidates the cache entries that intersecting with the given range from key to endkey.
c175022
// Compact invalidate all caching response before the given rev. // Replace with the invalidation is lazy. The actual removal happens when the entries is accessed.
c175023
// NewUniqueURLsWithExceptions implements "url.URL" slice as flag.Value interface. // Given value is to be separated by comma.
c175024
// UniqueURLsFromFlag returns a slice from urls got from the flag.
c175025
// UniqueURLsMapFromFlag returns a map from url strings got from the flag.
c175026
// Hold creates the barrier key causing processes to block on Wait.
c175027
// Release deletes the barrier key to unblock all waiting processes.
c175028
// Wait blocks on the barrier key until it is deleted. If there is no key, Wait // assumes Release has already been called and returns immediately.
c175029
// NewLockRacerCommand returns the cobra command for "lock-racer runner".
c175030
// ElectionTimeout returns an election timeout duration.
c175031
// DialEtcdGRPCServer creates a raw gRPC connection to an etcd member.
c175032
// CreateEtcdClientConfig creates a client configuration from member.
c175033
// CreateEtcdClient creates a client from member.
c175034
// CheckCompact ensures that historical data before given revision has been compacted.
c175035
// Defrag runs defragmentation on this member.
c175036
// RevHash fetches current revision and hash on this member.
c175037
// Rev fetches current revision on this member.
c175038
// Compact compacts member storage with given revision. // It blocks until it's physically done.
c175039
// IsLeader returns true if this member is the current cluster leader.
c175040
// WriteHealthKey writes a health key to this member.
c175041
// SaveSnapshot downloads a snapshot file from this member, locally. // It's meant to requested remotely, so that local member can store // snapshot file on local disk.
c175042
// RestoreSnapshot restores a cluster from a given snapshot file on disk. // It's meant to requested remotely, so that local member can load the // snapshot file from local disk.
c175043
// NewWatcher wraps a Watcher instance so that all Watch requests // are prefixed with a given string and all Watch responses have // the prefix removed.
c175044
// NewRawNode returns a new RawNode given configuration and a list of raft peers.
c175045
// Campaign causes this RawNode to transition to candidate state.
c175046
// Propose proposes data be appended to the raft log.
c175047
// ProposeConfChange proposes a config change.
c175048
// ApplyConfChange applies a config change to the local node.
c175049
// Step advances the state machine using the given message.
c175050
// Ready returns the current point-in-time state of this RawNode.
c175051
// WithProgress is a helper to introspect the Progress for this node and its // peers.
c175052
// ReportUnreachable reports the given node is not reachable for the last send.
c175053
// ReportSnapshot reports the status of the sent snapshot.
c175054
// TransferLeader tries to transfer leadership to the given transferee.
c175055
// ReadIndex requests a read state. The read state will be set in ready. // Read State has a read index. Once the application advances further than the read // index, any linearizable read requests issued before the read request can be // processed safely. The read state will have the same rctx attached.
c175056
// printcURL prints the cURL equivalent request to stderr. // It returns an error if the body of the request cannot // be read. // The caller MUST cancel the request if there is an error.
c175057
// StartNode returns a new Node given configuration and a list of raft peers. // It appends a ConfChangeAddNode entry for each given peer to the initial log.
c175058
// RestartNode is similar to StartNode but does not take a list of peers. // The current membership of the cluster will be restored from the Storage. // If the caller has an existing state machine, pass in the last log index that // has been applied to it; otherwise use zero.
c175059
// Tick increments the internal logical clock for this Node. Election timeouts // and heartbeat timeouts are in units of ticks.
c175060
// MustSync returns true if the hard state and count of Raft entries indicate // that a synchronous write to persistent storage is required.
c175061
// NewGRPC17Health returns a new health balancer with gRPC v1.7.
c175062
// NeedUpdate returns true if all connections are down or // addresses do not include current pinned address.
c175063
// dflSignal sets the given signal to SIG_DFL
c175064
// New creates a store where the given namespaces will be created as initial directories.
c175065
// Index retrieves the current index of the store.
c175066
// Get returns a get event. // If recursive is true, it will return all the content under the node path. // If sorted is true, it will sort the content by keys.
c175067
// Create creates the node at nodePath. Create will help to create intermediate directories with no ttl. // If the node has already existed, create will fail. // If any node on the path is a file, create will fail.
c175068
// Set creates or replace the node at nodePath.
c175069
// returns user-readable cause of failed comparison
c175070
// Delete deletes the node at the given path. // If the node is a directory, recursive must be true to delete it.
c175071
// walk walks all the nodePath and apply the walkFunc on each directory
c175072
// InternalGet gets the node of the given nodePath.
c175073
// DeleteExpiredKeys will delete all expired keys
c175074
// checkDir will check whether the component is a directory under parent node. // If it is a directory, this function will return the pointer to that node. // If it does not exist, this function will create a new directory and return the pointer to that node. // If it is a file, this function will return error.
c175075
// Save saves the static state of the store system. // It will not be able to save the state of watchers. // It will not save the parent field of the node. Or there will // be cyclic dependencies issue for the json package.
c175076
// Recovery recovers the store system from a static state // It needs to recover the parent field of the nodes. // It needs to delete the expired nodes since the saved time and also // needs to create monitoring go routines.
c175077
// Next generates a id that is unique.
c175078
// NewMakeMirrorCommand returns the cobra command for "makeMirror".
c175079
// NewZapCoreLoggerBuilder generates a zap core logger builder.
c175080
// NewSyncer creates a Syncer.
c175081
// DropPort drops all tcp packets that are received from the given port and sent to the given port.
c175082
// SetLatency adds latency in millisecond scale with random variations.
c175083
// RemoveLatency resets latency configurations.
c175084
// NewTxnCommand returns the cobra command for "txn".
c175085
// txnCommandFunc executes the "txn" command.
c175086
// New returns a new Compactor based on given "mode".
c175087
// printResponseKey only supports to print key correctly.
c175088
// RegisterLockHandler registers the http handlers for service Lock to "mux". // The handlers forward requests to the grpc endpoint over "conn".
c175089
// grpcHandlerFunc returns an http.Handler that delegates to grpcServer on incoming gRPC // connections or otherHandler otherwise. Given in gRPC docs.
c175090
// addCORSHeader adds the correct cors headers given an origin
c175091
// fallback computes the ops to fetch all possible conflicting // leasing keys for a list of ops.
c175092
// IDFromString attempts to create an ID from a base-16 string.
c175093
// Release deletes the pid file and releases our lock on the directory.
c175094
// EncodedSize is the size of the ValueStruct when encoded
c175095
// Decode uses the length of the slice to infer the length of the Value field.
c175096
// NewMergeIterator returns a new MergeIterator from a list of Iterators.
c175097
// initHeap checks all iterators and initializes our heap and array of keys. // Whenever we reverse direction, we need to run this.
c175098
// Valid returns whether the MergeIterator is at a valid element.
c175099
// Key returns the key associated with the current iterator