_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c174700
test
// monitorVersions checks the member's version every monitorVersionInterval. // It updates the cluster version if all members agrees on a higher one. // It prints out log if there is a member with a higher version than the // local version.
{ "resource": "" }
c174701
test
// goAttach creates a goroutine on a given function and tracks it using // the etcdserver waitgroup.
{ "resource": "" }
c174702
test
// NewRoundrobinBalanced returns a new roundrobin balanced picker.
{ "resource": "" }
c174703
test
// Pick is called for every client request.
{ "resource": "" }
c174704
test
// NewTLSListener handshakes TLS connections and performs optional CRL checking.
{ "resource": "" }
c174705
test
// acceptLoop launches each TLS handshake in a separate goroutine // to prevent a hanging TLS connection from blocking other connections.
{ "resource": "" }
c174706
test
// SetEndpoints updates the endpoints for ResolverGroup. All registered resolver are updated // immediately with the new endpoints.
{ "resource": "" }
c174707
test
// Target constructs a endpoint target using the endpoint id of the ResolverGroup.
{ "resource": "" }
c174708
test
// Target constructs a endpoint resolver target.
{ "resource": "" }
c174709
test
// Build creates or reuses an etcd resolver for the etcd cluster name identified by the authority part of the target.
{ "resource": "" }
c174710
test
// Handle interprets r and performs an operation on s.store according to r.Method // and other fields. If r.Method is "POST", "PUT", "DELETE", or a "GET" with // Quorum == true, r will be sent through consensus before performing its // respective operation. Do will block until an action is performed or there is // an e...
{ "resource": "" }
c174711
test
// NewElectionCommand returns the cobra command for "election runner".
{ "resource": "" }
c174712
test
// nodeToMember builds member from a key value node. // the child nodes of the given node MUST be sorted by key.
{ "resource": "" }
c174713
test
// NewTmpBackend creates a backend implementation for testing.
{ "resource": "" }
c174714
test
// newRevision creates a new instance of Revisonal compactor that purges // the log older than retention revisions from the current revision.
{ "resource": "" }
c174715
test
// Run runs revision-based compactor.
{ "resource": "" }
c174716
test
// Pause pauses revision-based compactor.
{ "resource": "" }
c174717
test
// Resume resumes revision-based compactor.
{ "resource": "" }
c174718
test
// voteResponseType maps vote and prevote message types to their corresponding responses.
{ "resource": "" }
c174719
test
// DescribeMessage returns a concise human-readable description of a // Message for debugging.
{ "resource": "" }
c174720
test
// DescribeEntry returns a concise human-readable description of an // Entry for debugging.
{ "resource": "" }
c174721
test
// DescribeEntries calls DescribeEntry for each Entry, adding a newline to // each.
{ "resource": "" }
c174722
test
// SetLogger sets client-side Logger.
{ "resource": "" }
c174723
test
// GetLogger returns the current logutil.Logger.
{ "resource": "" }
c174724
test
// maybeFirstIndex returns the index of the first possible entry in entries // if it has a snapshot.
{ "resource": "" }
c174725
test
// maybeLastIndex returns the last index if it has at least one // unstable entry or snapshot.
{ "resource": "" }
c174726
test
// maybeTerm returns the term of the entry at index i, if there // is any.
{ "resource": "" }
c174727
test
// shrinkEntriesArray discards the underlying array used by the entries slice // if most of it isn't being used. This avoids holding references to a bunch of // potentially large entries that aren't needed anymore. Simply clearing the // entries wouldn't be safe because clients might still be using them.
{ "resource": "" }
c174728
test
// SaveSnap saves the snapshot to disk and release the locked // wal files since they will not be used.
{ "resource": "" }
c174729
test
// New creates a new etcdv3 client from a given configuration.
{ "resource": "" }
c174730
test
// NewCtxClient creates a client with a context but no underlying grpc // connection. This is useful for embedded cases that override the // service interface implementations and do not need connection management.
{ "resource": "" }
c174731
test
// NewFromURL creates a new etcdv3 client from a URL.
{ "resource": "" }
c174732
test
// Close shuts down the client's etcd connections.
{ "resource": "" }
c174733
test
// Endpoints lists the registered endpoints for the client.
{ "resource": "" }
c174734
test
// SetEndpoints updates client's endpoints.
{ "resource": "" }
c174735
test
// dialSetupOpts gives the dial opts prior to any authentication.
{ "resource": "" }
c174736
test
// Dial connects to a single endpoint using the client's config.
{ "resource": "" }
c174737
test
// dialWithBalancer dials the client's current load balanced resolver group. The scheme of the host // of the provided endpoint determines the scheme used for all endpoints of the client connection.
{ "resource": "" }
c174738
test
// dial configures and dials any grpc balancer target.
{ "resource": "" }
c174739
test
// WithRequireLeader requires client requests to only succeed // when the cluster has a leader.
{ "resource": "" }
c174740
test
// roundRobinQuorumBackoff retries against quorum between each backoff. // This is intended for use with a round robin load balancer.
{ "resource": "" }
c174741
test
// isHaltErr returns true if the given error and context indicate no forward // progress can be made, even after reconnecting.
{ "resource": "" }
c174742
test
// NewLease wraps a Lease interface to filter for only keys with a prefix // and remove that prefix when fetching attached keys through TimeToLive.
{ "resource": "" }
c174743
test
// IsCreate returns true if the event tells that the key is newly created.
{ "resource": "" }
c174744
test
// Err is the error value if this WatchResponse holds an error.
{ "resource": "" }
c174745
test
// IsProgressNotify returns true if the WatchResponse is progress notification.
{ "resource": "" }
c174746
test
// RequestProgress requests a progress notify response be sent in all watch channels.
{ "resource": "" }
c174747
test
// nextResume chooses the next resuming to register with the grpc stream. Abandoned // streams are marked as nil in the queue since the head must wait for its inflight registration.
{ "resource": "" }
c174748
test
// dispatchEvent sends a WatchResponse to the appropriate watcher stream
{ "resource": "" }
c174749
test
// broadcastResponse send a watch response to all watch substreams.
{ "resource": "" }
c174750
test
// unicastResponse sends a watch response to a specific watch substream.
{ "resource": "" }
c174751
test
// joinSubstreams waits for all substream goroutines to complete.
{ "resource": "" }
c174752
test
// toPB converts an internal watch request structure to its protobuf WatchRequest structure.
{ "resource": "" }
c174753
test
// toPB converts an internal progress request structure to its protobuf WatchRequest structure.
{ "resource": "" }
c174754
test
// Contains returns whether the set contains the given value
{ "resource": "" }
c174755
test
// ContainsAll returns whether the set contains all given values
{ "resource": "" }
c174756
test
// Equals returns whether the contents of two sets are identical
{ "resource": "" }
c174757
test
// Values returns the values of the Set in an unspecified order.
{ "resource": "" }
c174758
test
// Copy creates a new Set containing the values of the first
{ "resource": "" }
c174759
test
// Sub removes all elements in other from the set
{ "resource": "" }
c174760
test
// v2MembersURL add the necessary path to the provided endpoint // to route requests to the default v2 members API.
{ "resource": "" }
c174761
test
// NewMigrateCommand returns the cobra command for "migrate".
{ "resource": "" }
c174762
test
// publishEntries writes committed log entries to commit channel and returns // whether all entries could be published.
{ "resource": "" }
c174763
test
// openWAL returns a WAL ready for reading.
{ "resource": "" }
c174764
test
// replayWAL replays WAL entries into the raft instance.
{ "resource": "" }
c174765
test
// stop closes http, closes all channels, and stops raft.
{ "resource": "" }
c174766
test
// NewWatchCommand returns the cobra command for "watch".
{ "resource": "" }
c174767
test
// InitialState implements the Storage interface.
{ "resource": "" }
c174768
test
// SetHardState saves the current HardState.
{ "resource": "" }
c174769
test
// Entries implements the Storage interface.
{ "resource": "" }
c174770
test
// Term implements the Storage interface.
{ "resource": "" }
c174771
test
// LastIndex implements the Storage interface.
{ "resource": "" }
c174772
test
// FirstIndex implements the Storage interface.
{ "resource": "" }
c174773
test
// Snapshot implements the Storage interface.
{ "resource": "" }
c174774
test
// ApplySnapshot overwrites the contents of this Storage object with // those of the given snapshot.
{ "resource": "" }
c174775
test
// Compact discards all log entries prior to compactIndex. // It is the application's responsibility to not attempt to compact an index // greater than raftLog.applied.
{ "resource": "" }
c174776
test
// unreachable notices the picker that the given url is unreachable, // and it should use other possible urls.
{ "resource": "" }
c174777
test
// NewEndpointCommand returns the cobra command for "endpoint".
{ "resource": "" }
c174778
test
// epHealthCommandFunc executes the "endpoint-health" command.
{ "resource": "" }
c174779
test
// NewElectCommand returns the cobra command for "elect".
{ "resource": "" }
c174780
test
// NewDefragCommand returns the cobra command for "Defrag".
{ "resource": "" }
c174781
test
// RegisterBuilder creates and registers a builder. Since this function calls balancer.Register, it // must be invoked at initialization time.
{ "resource": "" }
c174782
test
// Build is called initially when creating "ccBalancerWrapper". // "grpc.Dial" is called to this client connection. // Then, resolved addresses will be handled via "HandleResolvedAddrs".
{ "resource": "" }
c174783
test
// recordTransition records state change happening in every subConn and based on // that it evaluates what aggregated state should be. // It can only transition between Ready, Connecting and TransientFailure. Other states, // Idle and Shutdown are transitioned into by ClientConn; in the beginning of the connection // b...
{ "resource": "" }
c174784
test
// doSerialize handles the auth logic, with permissions checked by "chk", for a serialized request "get". Returns a non-nil error on authentication failure.
{ "resource": "" }
c174785
test
// send filters out repeated events by discarding revisions older // than the last one sent over the watch channel.
{ "resource": "" }
c174786
test
// post puts a watch response on the watcher's proxy stream channel
{ "resource": "" }
c174787
test
// OriginAllowed determines whether the server will allow a given CORS origin. // If CORS is empty, allow all.
{ "resource": "" }
c174788
test
// IsHostWhitelisted returns true if the host is whitelisted. // If whitelist is empty, allow all.
{ "resource": "" }
c174789
test
// Valids returns the list of valid strings.
{ "resource": "" }
c174790
test
// NewSelectiveStringsValue creates a new string slice flag // for which any one of the given strings is a valid value, // and any other value is an error.
{ "resource": "" }
c174791
test
// NewKV wraps a KV instance so that all requests // are prefixed with a given string.
{ "resource": "" }
c174792
test
// NewURLsValue implements "url.URL" slice as flag.Value interface. // Given value is to be separated by comma.
{ "resource": "" }
c174793
test
// URLsFromFlag returns a slices from url got from the flag.
{ "resource": "" }
c174794
test
// configure peer handlers after rafthttp.Transport started
{ "resource": "" }
c174795
test
// NewStore returns a new store. It is useful to create a store inside // mvcc pkg. It should only be used for testing externally.
{ "resource": "" }
c174796
test
// appendMarkTombstone appends tombstone mark to normal revision bytes.
{ "resource": "" }
c174797
test
// CreateDirAll is similar to TouchDirAll but returns error // if the deepest directory was not empty.
{ "resource": "" }
c174798
test
// ZeroToEnd zeros a file starting from SEEK_CUR to its SEEK_END. May temporarily // shorten the length of the file.
{ "resource": "" }
c174799
test
// Open returns a fresh file for writing. Rename the file before calling // Open again or there will be file collisions.
{ "resource": "" }