MongoDBServerResource.WithKeyFile
Method
type MongoDBServerResource interface { // ... omitted for brevity WithKeyFile( keyValue ExpressionValue, options ...*WithKeyFileOptions, ) MongoDBServerResource}Signature
method
WithKeyFile builderSets up a keyfile for internal authentication between members of a MongoDB replica set, with the specified
keyValue as the content of the file.WithKeyFile( keyValue ExpressionValue, options ...*WithKeyFileOptions,) MongoDBServerResourceParameters
keyValue ExpressionValue The content of the keyfile. This is a shared secret: every member of the replica set has to be given the same value, and anything holding it can authenticate as a member of the cluster.options...*WithKeyFileOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*WithKeyFileOptions argument.
KeyFilePath *stringThe absolute path the keyfile is mounted at inside the container, which has to include a file name. Defaults to /etc/rs.key .Returns
MongoDBServerResource The resource builder.
Returns a handle; failures surface later via Err().
Defined on
This method is defined on the following type: