_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c24900
train
// Open opens the store. If enableSingle is set, and there are no existing peers, // then this node becomes the first node, and therefore leader, of the cluster.
{ "resource": "" }
c24901
train
// Connect returns a new connection to the database. Changes made to the database // through this connection are applied via the Raft consensus system. The Store // must have been opened first. Must be called on the leader or an error will // we returned. // // Any connection returned by this call are READ_COMMITTED is...
{ "resource": "" }
c24902
train
// Execute executes queries that return no rows, but do modify the database. // Changes made to the database through this call are applied via the Raft // consensus system. The Store must have been opened first. Must be called // on the leader or an error will we returned. The changes are made using // the database con...
{ "resource": "" }
c24903
train
// ExecuteOrAbort executes the requests, but aborts any active transaction // on the underlying database in the case of any error. Any changes are made // using the database connection built-in to the Store.
{ "resource": "" }
c24904
train
// Query executes queries that return rows, and do not modify the database. // The queries are made using the database connection built-in to the Store. // Depending on the read consistency requested, it may or may not need to be // called on the leader.
{ "resource": "" }
c24905
train
// Close closes the store. If wait is true, waits for a graceful shutdown. // Once closed, a Store may not be re-opened.
{ "resource": "" }
c24906
train
// WaitForApplied waits for all Raft log entries to to be applied to the // underlying database.
{ "resource": "" }
c24907
train
// State returns the current node's Raft state
{ "resource": "" }
c24908
train
// Connection returns the connection for the given ID.
{ "resource": "" }
c24909
train
// LeaderID returns the node ID of the Raft leader. Returns a // blank string if there is no leader, or an error.
{ "resource": "" }
c24910
train
// Nodes returns the slice of nodes in the cluster, sorted by ID ascending.
{ "resource": "" }
c24911
train
// WaitForLeader blocks until a leader is detected, or the timeout expires.
{ "resource": "" }
c24912
train
// WaitForAppliedIndex blocks until a given log index has been applied, // or the timeout expires.
{ "resource": "" }
c24913
train
// Stats returns stats for the store.
{ "resource": "" }
c24914
train
// Backup writes a snapshot of the underlying database to dst // // If leader is true, this operation is performed with a read consistency // level equivalent to "weak". Otherwise no guarantees are made about the // read consistency level.
{ "resource": "" }
c24915
train
// Join joins a node, identified by id and located at addr, to this store. // The node must be ready to respond to Raft communications at that address.
{ "resource": "" }
c24916
train
// Remove removes a node from the store, specified by ID.
{ "resource": "" }
c24917
train
// Metadata returns the value for a given key, for a given node ID.
{ "resource": "" }
c24918
train
// SetMetadata adds the metadata md to any existing metadata for // this node.
{ "resource": "" }
c24919
train
// setMetadata adds the metadata md to any existing metadata for // the given node ID.
{ "resource": "" }
c24920
train
// disconnect removes a connection to the database, a connection // which was previously established via Raft consensus.
{ "resource": "" }
c24921
train
// Execute executes queries that return no rows, but do modify the database. If connection // is nil then the utility connection is used.
{ "resource": "" }
c24922
train
// Query executes queries that return rows, and do not modify the database. If // connection is nil, then the utility connection is used.
{ "resource": "" }
c24923
train
// createDatabase creates the the in-memory or file-based database.
{ "resource": "" }
c24924
train
// remove removes the node, with the given ID, from the cluster.
{ "resource": "" }
c24925
train
// raftConfig returns a new Raft config for the store.
{ "resource": "" }
c24926
train
// checkConnections periodically checks which connections should // close due to timeouts.
{ "resource": "" }
c24927
train
// Database copies contents of the underlying SQLite file to dst
{ "resource": "" }
c24928
train
// Snapshot returns a snapshot of the store. The caller must ensure that // no Raft transaction is taking place during this call. Hashicorp Raft // guarantees that this function will not be called concurrently with Apply.
{ "resource": "" }
c24929
train
// RegisterObserver registers an observer of Raft events
{ "resource": "" }
c24930
train
// DeregisterObserver deregisters an observer of Raft events
{ "resource": "" }
c24931
train
// pathExists returns true if the given path exists.
{ "resource": "" }
c24932
train
// tempfile returns a temporary file for use
{ "resource": "" }
c24933
train
// New returns an uninitialized HTTP service. If credentials is nil, then // the service performs no authentication and authorization checks.
{ "resource": "" }
c24934
train
// ServeHTTP allows Service to serve HTTP requests.
{ "resource": "" }
c24935
train
// RegisterStatus allows other modules to register status for serving over HTTP.
{ "resource": "" }
c24936
train
// createConnection creates a connection and returns its ID.
{ "resource": "" }
c24937
train
// deleteConnection closes a connection and makes it unavailable for // future use.
{ "resource": "" }
c24938
train
// handleJoin handles cluster-join requests from other nodes.
{ "resource": "" }
c24939
train
// handleRemove handles cluster-remove requests.
{ "resource": "" }
c24940
train
// handleBackup returns the consistent database snapshot.
{ "resource": "" }
c24941
train
// handleLoad loads the state contained in a .dump output.
{ "resource": "" }
c24942
train
// handleStatus returns status on the system.
{ "resource": "" }
c24943
train
// handleExecute handles queries that modify the database.
{ "resource": "" }
c24944
train
// handleQuery handles queries that do not modify the database.
{ "resource": "" }
c24945
train
// FormRedirect returns the value for the "Location" header for a 301 response.
{ "resource": "" }
c24946
train
// FormConnectionURL returns the URL of the new connection.
{ "resource": "" }
c24947
train
// CheckRequestPerm returns true if authentication is enabled and the user contained // in the BasicAuth request has either PermAll, or the given perm.
{ "resource": "" }
c24948
train
// addBuildVersion adds the build version to the HTTP response.
{ "resource": "" }
c24949
train
// queryParam returns whether the given query param is set to true.
{ "resource": "" }
c24950
train
// durationParam returns the duration of the given query param, if set.
{ "resource": "" }
c24951
train
// stmtParam returns the value for URL param 'q', if present.
{ "resource": "" }
c24952
train
// isAtomic returns whether the HTTP request is an atomic request.
{ "resource": "" }
c24953
train
// txTimeout returns the duration of any transaction timeout set.
{ "resource": "" }
c24954
train
// level returns the requested consistency level for a query
{ "resource": "" }
c24955
train
// backuFormat returns the request backup format, setting the response header // accordingly.
{ "resource": "" }
c24956
train
// New returns an instance of the database at path. If the database // has already been created and opened, this database will share // the data of that database when connected.
{ "resource": "" }
c24957
train
// Connect returns a connection to the database.
{ "resource": "" }
c24958
train
// Execute executes queries that modify the database.
{ "resource": "" }
c24959
train
// Query executes queries that return rows, but don't modify the database.
{ "resource": "" }
c24960
train
// EnableFKConstraints allows control of foreign key constraint checks.
{ "resource": "" }
c24961
train
// FKConstraints returns whether FK constraints are set or not.
{ "resource": "" }
c24962
train
// Load loads the connected database from the database connected to src. // It overwrites the data contained in this database. It is the caller's // responsibility to ensure that no other connections to this database // are accessed while this operation is in progress.
{ "resource": "" }
c24963
train
// Backup writes a snapshot of the database over the given database // connection, erasing all the contents of the destination database. // The consistency of the snapshot is READ_COMMITTED relative to any // other connections currently open to this database. The caller must // ensure that all connections to the destin...
{ "resource": "" }
c24964
train
// Dump writes a snapshot of the database in SQL text format. The consistency // of the snapshot is READ_COMMITTED relative to any other connections // currently open to this database.
{ "resource": "" }
c24965
train
// cliJSON fetches JSON from a URL, and displays it at the CLI.
{ "resource": "" }
c24966
train
// New returns an initialized Discovery Service client.
{ "resource": "" }
c24967
train
// Register attempts to register with the Discovery Service, using the given // address.
{ "resource": "" }
c24968
train
// startProfile initializes the CPU and memory profile, if specified.
{ "resource": "" }
c24969
train
// stopProfile closes the CPU and memory profiles if they are running.
{ "resource": "" }
c24970
train
// Join attempts to join the cluster at one of the addresses given in joinAddr. // It walks through joinAddr in order, and sets the node ID and Raft address of // the joining node as id addr respectively. It returns the endpoint // successfully used to join the cluster.
{ "resource": "" }
c24971
train
// Get implements textutil.Table interface
{ "resource": "" }
c24972
train
// NewCredentialsStore returns a new instance of a CredentialStore.
{ "resource": "" }
c24973
train
// Load loads credential information from a reader.
{ "resource": "" }
c24974
train
// Check returns true if the password is correct for the given username.
{ "resource": "" }
c24975
train
// CheckRequest returns true if b contains a valid username and password.
{ "resource": "" }
c24976
train
// HasPerm returns true if username has the given perm. It does not // perform any password checking.
{ "resource": "" }
c24977
train
// HasAnyPerm returns true if username has at least one of the given perms. // It does not perform any password checking.
{ "resource": "" }
c24978
train
// HasPermRequest returns true if the username returned by b has the givem perm. // It does not perform any password checking, but if there is no username // in the request, it returns false.
{ "resource": "" }
c24979
train
// NewConnection returns a connection to the database.
{ "resource": "" }
c24980
train
// Restore prepares a partially ready connection.
{ "resource": "" }
c24981
train
// SetLastUsedNow marks the connection as being used now.
{ "resource": "" }
c24982
train
// TransactionActive returns whether a transaction is active on the connection.
{ "resource": "" }
c24983
train
// Execute executes queries that return no rows, but do modify the database.
{ "resource": "" }
c24984
train
// ExecuteOrAbort executes the requests, but aborts any active transaction // on the underlying database in the case of any error.
{ "resource": "" }
c24985
train
// Query executes queries that return rows, and do not modify the database.
{ "resource": "" }
c24986
train
// Close closes the connection via consensus.
{ "resource": "" }
c24987
train
// Stats returns the status of the connection.
{ "resource": "" }
c24988
train
// IdleTimedOut returns if the connection has not been active in the idle time.
{ "resource": "" }
c24989
train
// TxTimedOut returns if the transaction has been open, without activity in // transaction-idle time.
{ "resource": "" }
c24990
train
// NewTxStateChange returns an initialized TxStateChange
{ "resource": "" }
c24991
train
// CheckAndSet sets whether a transaction has begun or ended on the // connection since the TxStateChange was created. Once CheckAndSet // has been called, this function will panic if called a second time.
{ "resource": "" }
c24992
train
// NewDBConfig returns a new DB config instance.
{ "resource": "" }
c24993
train
// StringOpen opens the string library. Usually passed to Require.
{ "resource": "" }
c24994
train
// AtPanic sets a new panic function and returns the old one.
{ "resource": "" }
c24995
train
// UpValue returns the name of the upvalue at index away from function, // where index cannot be greater than the number of upvalues. // // Returns an empty string and false if the index is greater than the number // of upvalues.
{ "resource": "" }
c24996
train
// UpValueJoin makes the n1-th upvalue of the Lua closure at index f1 refer to // the n2-th upvalue of the Lua closure at index f2.
{ "resource": "" }
c24997
train
// MathOpen opens the math library. Usually passed to Require.
{ "resource": "" }
c24998
train
// IOOpen opens the io library. Usually passed to Require.
{ "resource": "" }
c24999
train
// Traceback creates and pushes a traceback of the stack l1. If message is not // nil it is appended at the beginning of the traceback. The level parameter // tells at which level to start the traceback.
{ "resource": "" }