_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c168200
validation
// getReleaseURL gets the latest release URL of Boot2Docker.
{ "resource": "" }
c168201
validation
// version scans the volume ID in b and returns its version tag.
{ "resource": "" }
c168202
validation
// DownloadISO downloads boot2docker ISO image for the given tag and save it at dest.
{ "resource": "" }
c168203
validation
// Authenticate creates a Rackspace-specific Gophercloud client.
{ "resource": "" }
c168204
validation
// GetInstanceIPAddresses can be short-circuited with the server's AccessIPv4Addr on Rackspace.
{ "resource": "" }
c168205
validation
// targetHost returns a specific host name if one is indicated by the first CLI // arg, or the default host name if no host is specified.
{ "resource": "" }
c168206
validation
// machineCommand maps the command name to the corresponding machine command. // We run commands concurrently and communicate back an error if there was one.
{ "resource": "" }
c168207
validation
// runActionForeachMachine will run the command across multiple machines
{ "resource": "" }
c168208
validation
// Create is the wrapper method which covers all of the boilerplate around // actually creating, provisioning, and persisting an instance in the store.
{ "resource": "" }
c168209
validation
// GenerateRandomID returns an unique id
{ "resource": "" }
c168210
validation
// GetCreateFlags registers the "machine create" flags recognized by this driver, including // their help text and defaults.
{ "resource": "" }
c168211
validation
// NewDriver instantiates a Rackspace driver.
{ "resource": "" }
c168212
validation
// SetConfigFromFlags assigns and verifies the command-line arguments presented to the driver.
{ "resource": "" }
c168213
validation
// URL returns the Docker host URL
{ "resource": "" }
c168214
validation
// newAzureClient creates an AzureClient helper from the Driver context and // initiates authentication if required.
{ "resource": "" }
c168215
validation
// generateSSHKey creates a ssh key pair locally and saves the public key file // contents in OpenSSH format to the DeploymentContext.
{ "resource": "" }
c168216
validation
// parseSecurityRuleProtocol parses a protocol string into a network.SecurityRuleProtocol // and returns error if the protocol is not supported
{ "resource": "" }
c168217
validation
// Given a State type, returns its string representation
{ "resource": "" }
c168218
validation
// randomString generates a random string of given length using specified alphabet.
{ "resource": "" }
c168219
validation
// GetCreateFlags registers the flags this driver adds to // "docker-machine create"
{ "resource": "" }
c168220
validation
// Make a boot2docker userdata.tar key bundle
{ "resource": "" }
c168221
validation
// NewDriver creates a new VirtualBox driver with default settings.
{ "resource": "" }
c168222
validation
// PreCreateCheck checks that VBoxManage exists and works
{ "resource": "" }
c168223
validation
// validateNoIPCollisions ensures no conflicts between the host's network interfaces and the vbox host-only network that // will be used for machine vm instances.
{ "resource": "" }
c168224
validation
// Select an available port, trying the specified // port first, falling back on an OS selected port.
{ "resource": "" }
c168225
validation
// Setup a NAT port forwarding entry.
{ "resource": "" }
c168226
validation
// getRandomIPinSubnet returns a pseudo-random net.IP in the same // subnet as the IP passed
{ "resource": "" }
c168227
validation
// Detect detects user's current shell.
{ "resource": "" }
c168228
validation
// vaultRenewDuration accepts a secret and returns the recommended amount of // time to sleep.
{ "resource": "" }
c168229
validation
// printVaultWarnings prints warnings for a given dependency.
{ "resource": "" }
c168230
validation
// vaultSecretRenewable determines if the given secret is renewable.
{ "resource": "" }
c168231
validation
// transformSecret transforms an api secret into our secret. This does not deep // copy underlying deep data structures, so it's not safe to modify the vault // secret as that may modify the data in the transformed secret.
{ "resource": "" }
c168232
validation
// updateSecret updates our secret with the new data from the api, careful to // not overwrite missing data. Renewals don't include the original secret, and // we don't want to delete that data accidentally.
{ "resource": "" }
c168233
validation
// Display is the human-friendly form of this configuration. It tries to // describe this template in as much detail as possible in a single line, so // log consumers can uniquely identify it.
{ "resource": "" }
c168234
validation
// NewVaultWriteQuery creates a new datacenter dependency.
{ "resource": "" }
c168235
validation
// sha1Map returns the sha1 hash of the data in the map. The reason this data is // hashed is because it appears in the output and could contain sensitive // information.
{ "resource": "" }
c168236
validation
// NewView constructs a new view with the given inputs.
{ "resource": "" }
c168237
validation
// Data returns the most-recently-received data from Consul for this View.
{ "resource": "" }
c168238
validation
// DataAndLastIndex returns the most-recently-received data from Consul for // this view, along with the last index. This is atomic so you will get the // index that goes with the data you are fetching.
{ "resource": "" }
c168239
validation
// poll queries the Consul instance for data using the fetch function, but also // accounts for interrupts on the interrupt channel. This allows the poll // function to be fired in a goroutine, but then halted even if the fetch // function is in the middle of a blocking query.
{ "resource": "" }
c168240
validation
// fetch queries the Consul instance for the attached dependency. This API // promises that either data will be written to doneCh or an error will be // written to errCh. It is designed to be run in a goroutine that selects the // result of doneCh and errCh. It is assumed that only one instance of fetch // is running p...
{ "resource": "" }
c168241
validation
// NewCatalogNodeQuery parses the given string into a dependency. If the name is // empty then the name of the local agent is used.
{ "resource": "" }
c168242
validation
// Fetch queries the Consul API defined by the given client and returns a // of CatalogNode object.
{ "resource": "" }
c168243
validation
// String is the string representation of this authentication. If authentication // is not enabled, this returns the empty string. The username and password will // be separated by a colon.
{ "resource": "" }
c168244
validation
// NewVaultListQuery creates a new datacenter dependency.
{ "resource": "" }
c168245
validation
// Remember accepts a dependency and the data to store associated with that // dep. This function converts the given data to a proper type and stores // it interally.
{ "resource": "" }
c168246
validation
// Recall gets the current value for the given dependency in the Brain.
{ "resource": "" }
c168247
validation
// ForceSet is used to force set the value of a dependency // for a given hash code
{ "resource": "" }
c168248
validation
// Forget accepts a dependency and removes all associated data with this // dependency. It also resets the "receivedData" internal map.
{ "resource": "" }
c168249
validation
// NewCatalogDatacentersQuery creates a new datacenter dependency.
{ "resource": "" }
c168250
validation
// Fetch queries the Consul API defined by the given client and returns a slice // of strings representing the datacenters
{ "resource": "" }
c168251
validation
// NewCatalogNodesQuery parses the given string into a dependency. If the name is // empty then the name of the local agent is used.
{ "resource": "" }
c168252
validation
// Fetch queries the Consul API defined by the given client and returns a slice // of Node objects
{ "resource": "" }
c168253
validation
// Parse parses the given string as a signal. If the signal is not found, // an error is returned.
{ "resource": "" }
c168254
validation
// DefaultVaultConfig returns a configuration that is populated with the // default values.
{ "resource": "" }
c168255
validation
// NewTemplate creates and parses a new Consul Template template at the given // path. If the template does not exist, an error is returned. During // initialization, the template is read and is parsed for dependencies. Any // errors that occur are returned.
{ "resource": "" }
c168256
validation
// Execute evaluates this template in the provided context.
{ "resource": "" }
c168257
validation
// funcMap is the map of template functions to their respective functions.
{ "resource": "" }
c168258
validation
// StringToFileModeFunc returns a function that converts strings to os.FileMode // value. This is designed to be used with mapstructure for parsing out a // filemode value.
{ "resource": "" }
c168259
validation
// StringToWaitDurationHookFunc returns a function that converts strings to wait // value. This is designed to be used with mapstructure for parsing out a wait // value.
{ "resource": "" }
c168260
validation
// ConsulStringToStructFunc checks if the value set for the key should actually // be a struct and sets the appropriate value in the struct. This is for // backwards-compatability with older versions of Consul Template.
{ "resource": "" }
c168261
validation
// Key returns a boolean indicating whether the given key exists in the map.
{ "resource": "" }
c168262
validation
// Get returns a value previously set by Add or Set
{ "resource": "" }
c168263
validation
// Set stores the value v at the key k. It will overwrite an existing value // if present.
{ "resource": "" }
c168264
validation
// SetX behaves the same as Set, except it will not overwrite existing keys if // already present.
{ "resource": "" }
c168265
validation
// MapSet stores the value v into a key mk in the map named k.
{ "resource": "" }
c168266
validation
// MapSetX behaves the same as MapSet, except it will not overwrite the map // key if it already exists.
{ "resource": "" }
c168267
validation
// mapSet is sets the value in the map, overwriting if o is true. This function // does not perform locking; callers should lock before invoking.
{ "resource": "" }
c168268
validation
// MapValues returns the list of values in the map sorted by key.
{ "resource": "" }
c168269
validation
// init initializes the scratch.
{ "resource": "" }
c168270
validation
// Render atomically renders a file contents to disk, returning a result of // whether it would have rendered and actually did render.
{ "resource": "" }
c168271
validation
// copyFile copies the file at src to the path at dst. Any errors that occur // are returned.
{ "resource": "" }
c168272
validation
// Copy returns a deep copy of the current configuration. This is useful because // the nested data structures may be shared.
{ "resource": "" }
c168273
validation
// Merge merges the values in config into this config object. Values in the // config object overwrite the values in c.
{ "resource": "" }
c168274
validation
// Parse parses the given string contents as a config
{ "resource": "" }
c168275
validation
// Must returns a config object that must compile. If there are any errors, this // function will panic. This is most useful in testing or constants.
{ "resource": "" }
c168276
validation
// FromFile reads the configuration file at the given path and returns a new // Config struct with the data populated.
{ "resource": "" }
c168277
validation
// FromPath iterates and merges all configuration files in a given // directory, returning the resulting config.
{ "resource": "" }
c168278
validation
// DefaultConfig returns the default configuration struct. Certain environment // variables may be set which control the values for the default configuration.
{ "resource": "" }
c168279
validation
// NewWatcher creates a new watcher using the given API client.
{ "resource": "" }
c168280
validation
// Watching determines if the given dependency is being watched.
{ "resource": "" }
c168281
validation
// ForceWatching is used to force setting the internal state of watching // a dependency. This is only used for unit testing purposes.
{ "resource": "" }
c168282
validation
// Remove removes the given dependency from the list and stops the // associated View. If a View for the given dependency does not exist, this // function will return false. If the View does exist, this function will return // true upon successful deletion.
{ "resource": "" }
c168283
validation
// Size returns the number of views this watcher is watching.
{ "resource": "" }
c168284
validation
// Stop halts this watcher and any currently polling views immediately. If a // view was in the middle of a poll, no data will be returned.
{ "resource": "" }
c168285
validation
// Add adds a new element to the set if it does not already exist.
{ "resource": "" }
c168286
validation
// Get retrieves a single element from the set by name.
{ "resource": "" }
c168287
validation
// List returns the insertion-ordered list of dependencies.
{ "resource": "" }
c168288
validation
// Len is the size of the set.
{ "resource": "" }
c168289
validation
// String is a string representation of the set.
{ "resource": "" }
c168290
validation
// deepCopyAndSortTags deep copies the tags in the given string slice and then // sorts and returns the copied result.
{ "resource": "" }
c168291
validation
// respWithMetadata is a short wrapper to return the given interface with fake // response metadata for non-Consul dependencies.
{ "resource": "" }
c168292
validation
// regexpMatch matches the given regexp and extracts the match groups into a // named map.
{ "resource": "" }
c168293
validation
// NewCatalogServiceQuery parses a string into a CatalogServiceQuery.
{ "resource": "" }
c168294
validation
// NewKVListQuery parses a string into a dependency.
{ "resource": "" }
c168295
validation
// NewDedupManager creates a new Dedup manager
{ "resource": "" }
c168296
validation
// Start is used to start the de-duplication manager
{ "resource": "" }
c168297
validation
// Stop is used to stop the de-duplication manager
{ "resource": "" }
c168298
validation
// createSession is used to create and maintain a session to Consul
{ "resource": "" }
c168299
validation
// IsLeader checks if we are currently the leader instance
{ "resource": "" }