_id
stringlengths
2
7
text
stringlengths
6
2.61k
title
stringclasses
1 value
c172200
// Snapshot creates a new ZFS snapshot of the receiving dataset, using the // specified name. Optionally, the snapshot can be taken recursively, creating // snapshots of all descendent filesystems in a single, atomic operation.
c172201
// Rollback rolls back the receiving ZFS dataset to a previous snapshot. // Optionally, intermediate snapshots can be destroyed. A ZFS snapshot // rollback cannot be completed without this option, if more recent // snapshots exist. // An error will be returned if the input dataset is not of snapshot type.
c172202
// Children returns a slice of children of the receiving ZFS dataset. // A recursion depth may be specified, or a depth of 0 allows unlimited // recursion.
c172203
// Diff returns changes between a snapshot and the given ZFS dataset. // The snapshot name must include the filesystem part as it is possible to // compare clones with their origin snapshots.
c172204
// msb32 returns the number of bits required to store the value x
c172205
// msb64 returns the number of bits required to store the value x
c172206
// EncodeAll returns a packed slice of the values from src. It a value is over // 1 << 28, an error is returned.
c172207
// DecodeAll returns the uncompressed values from in
c172208
// returns true if the next n values in in can be packed using bits bits // per value.
c172209
// pack28 packs 28 values from in using 1 bit each
c172210
// pack14 packs 14 values from in using 2 bits each
c172211
// pack9 packs 9 values from in using 3 bits each
c172212
// pack7 packs 7 values from in using 4 bits each
c172213
// Decode writes the uncompressed values from src to dst. It returns the number // of values written or an error.
c172214
// Out returns the data to be sent to the server in the current step.
c172215
// Step processes the incoming data from the server and makes the // next round of data for the server available via Client.Out. // Step returns false if there are no errors and more data is // still expected.
c172216
// ParseURL parses a MongoDB URL as accepted by the Dial function and returns // a value suitable for providing into DialWithInfo. // // See Dial for more details on the format of url.
c172217
// LiveServers returns a list of server addresses which are // currently known to be alive.
c172218
// DB returns a value representing the named database. If name // is empty, the database name provided in the dialed URL is // used instead. If that is also empty, "test" is used as a // fallback in a way equivalent to the mongo shell. // // Creating this value is a very lightweight operation, and // involves no networ...
c172219
// C returns a value representing the named collection. // // Creating this value is a very lightweight operation, and // involves no network communication.
c172220
// With returns a copy of db that uses session s.
c172221
// With returns a copy of c that uses session s.
c172222
// Logout removes any established authentication credentials for the database.
c172223
// LogoutAll removes all established authentication credentials for the session.
c172224
// New creates a new session with the same parameters as the original // session, including consistency, batch size, prefetching, safety mode, // etc. The returned session will use sockets from the pool, so there's // a chance that writes just performed in another session may not yet // be visible. // // Login informat...
c172225
// Copy works just like New, but preserves the exact authentication // information from the original session.
c172226
// Close terminates the session. It's a runtime error to use a session // after it has been closed.
c172227
// Refresh puts back any reserved sockets in use and restarts the consistency // guarantees according to the current consistency setting for the session.
c172228
// SetSyncTimeout sets the amount of time an operation with this session // will wait before returning an error in case a connection to a usable // server can't be established. Set it to zero to wait forever. The // default value is 7 seconds.
c172229
// SetSocketTimeout sets the amount of time to wait for a non-responding // socket to the database before it is forcefully closed.
c172230
// SetCursorTimeout changes the standard timeout period that the server // enforces on created cursors. The only supported value right now is // 0, which disables the timeout. The standard server timeout is 10 minutes.
c172231
// SetPoolLimit sets the maximum number of sockets in use in a single server // before this session will block waiting for a socket to be available. // The default limit is 4096. // // This limit must be set to cover more than any expected workload of the // application. It is a bad practice and an unsupported use case...
c172232
// Safe returns the current safety mode for the session.
c172233
// Fsync flushes in-memory writes to disk on the server the session // is established with. If async is true, the call returns immediately, // otherwise it returns after the flush has been made.
c172234
// FsyncUnlock releases the server for writes. See FsyncLock for details.
c172235
// Repair returns an iterator that goes over all recovered documents in the // collection, in a best-effort manner. This is most useful when there are // damaged data files. Multiple copies of the same document may be returned // by the iterator. // // Repair is supported in MongoDB 2.7.8 and later.
c172236
// One executes the pipeline and unmarshals the first item from the // result set into the result parameter. // It returns ErrNotFound if no items are generated by the pipeline.
c172237
// Batch sets the batch size used when fetching documents from the database. // It's possible to change this setting on a per-session basis as well, using // the Batch method of Session. // // The default batch size is defined by the database server.
c172238
// DropCollection removes the entire collection including all of its documents.
c172239
// Skip skips over the n initial documents from the query results. Note that // this only makes sense with capped collections where documents are naturally // ordered by insertion time, or with sorted results.
c172240
// Limit restricts the maximum number of documents retrieved to n, and also // changes the batch size to the same value. Once n documents have been // returned by Next, the following call will return ErrNotFound.
c172241
// SetMaxScan constrains the query to stop after scanning the specified // number of documents. // // This modifier is generally used to prevent potentially long running // queries from disrupting performance by scanning through too much data.
c172242
// LogReplay enables an option that optimizes queries that are typically // made on the MongoDB oplog for replaying it. This is an internal // implementation aspect and most likely uninteresting for other uses. // It has seen at least one use case, though, so it's exposed via the API.
c172243
// CollectionNames returns the collection names present in the db database.
c172244
// DatabaseNames returns the names of non-empty databases present in the cluster.
c172245
// Timeout returns true if Next returned false due to a timeout of // a tailable cursor. In those cases, Next may be called again to continue // the iteration at the previous cursor position.
c172246
// Count returns the total number of documents in the result set.
c172247
// Count returns the total number of documents in the collection.
c172248
// VersionAtLeast returns whether the BuildInfo version is greater than or // equal to the provided version number. If more than one number is // provided, numbers will be considered as major, minor, and so on.
c172249
// BuildInfo retrieves the version and other details about the // running MongoDB server.
c172250
// setSocket binds socket to this section.
c172251
// Acquire increases the reference count for the cluster.
c172252
// Release decreases the reference count for the cluster. Once // it reaches zero, all servers will be closed.
c172253
// syncServersLoop loops while the cluster is alive to keep its idea of // the server topology up-to-date. It must be called just once from // newCluster. The loop iterates once syncServersDelay has passed, or // if somebody injects a value into the cluster.sync channel to force a // synchronization. A loop iteration...
c172254
// Close forces closing all sockets that are alive, whether // they're currently in use or not.
c172255
// RecycleSocket puts socket back into the unused cache.
c172256
// AbendSocket notifies the server that the given socket has terminated // abnormally, and thus should be discarded rather than cached.
c172257
// BestFit returns the best guess of what would be the most interesting // server to perform operations on at this point in time.
c172258
// Add assigns the name to the template
c172259
// Instance implements gin's HTML render interface
c172260
// loadTemplate parses the specified template and returns it
c172261
// New returns a fresh instance of Render
c172262
// Create goes through the `TemplatesDir` creating the template structure // for rendering. Returns the Render instance.
c172263
// Validate checks if the directory and the layout files exist as expected // and configured
c172264
// tokenFor returns a unique transaction token that // is composed by t's id and a nonce. If t already has // a nonce assigned to it, it will be used, otherwise // a new nonce will be generated.
c172265
// NewRunner returns a new transaction runner that uses tc to hold its // transactions. // // Multiple transaction collections may exist in a single database, but // all collections that are touched by operations in a given transaction // collection must be handled exclusively by it. // // A second collection with the ...
c172266
// Run creates a new transaction with ops and runs it immediately. // The id parameter specifies the transaction id, and may be written // down ahead of time to later verify the success of the change and // resume it, when the procedure is interrupted for any reason. If // empty, a random id will be generated. // The i...
c172267
// ResumeAll resumes all pending transactions. All ErrAborted errors // from individual transactions are ignored.
c172268
// Resume resumes the transaction with id. It returns mgo.ErrNotFound // if the transaction is not found. Otherwise, it has the same semantics // of the Run method after the transaction is inserted.
c172269
// SetChaos sets the failure injection parameters to c.
c172270
// Connect middleware clones the database session for each request and // makes the `db` object available for each handler
c172271
// ErrorHandler is a middleware to handle errors encountered during requests
c172272
// assert verifies that all assertions in t match the content that t // will be applied upon. If an assertion fails, the transaction state // is changed to aborted.
c172273
// Server returns the server that the socket is associated with. // It returns nil while the socket is cached in its respective server.
c172274
// ServerInfo returns details for the server at the time the socket // was initially acquired.
c172275
// InitialAcquire obtains the first reference to the socket, either // right after the connection is made or once a recycled socket is // being put back in use.
c172276
// Acquire obtains an additional reference to the socket. // The socket will only be recycled when it's released as many // times as it's been acquired.
c172277
// Release decrements a socket reference. The socket will be // recycled once its released as many times as it's been acquired.
c172278
// SetTimeout changes the timeout used on socket operations.
c172279
// This is intended for use in development + debugging and not intended to be a production error message. // it also allows FieldError to be used as an Error interface
c172280
// This is intended for use in development + debugging and not intended to be a production error message. // it also allows StructErrors to be used as an Error interface
c172281
// New creates a new Validate instance for use.
c172282
// Field allows validation of a single field, still using tag style validation to check multiple errors
c172283
// FieldWithValue allows validation of a single field, possibly even against another fields value, still using tag style validation to check multiple errors
c172284
// Create an article
c172285
// Edit an article
c172286
// List all articles
c172287
// Update an article
c172288
// Delete an article
c172289
// ObjectIdHex returns an ObjectId from the provided hex representation. // Calling this function with an invalid hex representation will // cause a runtime panic. See the IsObjectIdHex function.
c172290
// IsObjectIdHex returns whether s is a valid hex representation of // an ObjectId. See the ObjectIdHex function.
c172291
// NewObjectId returns a new unique ObjectId.
c172292
// NewObjectIdWithTime returns a dummy ObjectId with the timestamp part filled // with the provided number of seconds from epoch UTC, and all other parts // filled with zeroes. It's not safe to insert a document with an id generated // by this method, it is useful only for queries to find documents with ids // generate...
c172293
// MarshalJSON turns a bson.ObjectId into a json.Marshaller.
c172294
// byteSlice returns byte slice of id from start to end. // Calling this function with an invalid id will cause a runtime panic.
c172295
// Run runs all the operations queued up.
c172296
// min tests whether a variable value is larger or equal to a given // number. For number types, it's a simple lesser-than test; for // strings it tests the number of characters whereas for maps // and slices it tests the number of items.
c172297
// max tests whether a variable value is lesser than a given // value. For numbers, it's a simple lesser-than test; for // strings it tests the number of characters whereas for maps // and slices it tests the number of items.
c172298
// Connect connects to mongodb
c172299
// Enable the delivery of debug messages to the logger. Only meaningful // if a logger is also set.