_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c168300
validation
// UpdateDeps is used to update the values of the dependencies for a template
{ "resource": "" }
c168301
validation
// setLeader sets if we are currently the leader instance
{ "resource": "" }
c168302
validation
// parseData is used to update brain from a KV data pair
{ "resource": "" }
c168303
validation
// NewFileQuery creates a file dependency from the given path.
{ "resource": "" }
c168304
validation
// NewCLI creates a new CLI object with the given stdout and stderr streams.
{ "resource": "" }
c168305
validation
// Run accepts a slice of arguments and returns an int representing the exit // status from the command.
{ "resource": "" }
c168306
validation
// stop is used internally to shutdown a running CLI
{ "resource": "" }
c168307
validation
// loadConfigs loads the configuration from the list of paths. The optional // configuration is the list of overrides to apply at the very end, taking // precedence over any configurations that were loaded from the paths. If any // errors occur when reading or parsing those sub-configs, it is returned.
{ "resource": "" }
c168308
validation
// logError logs an error message and then returns the given status.
{ "resource": "" }
c168309
validation
// FileModeGoString returns the value of the os.FileMode for printing in a // string.
{ "resource": "" }
c168310
validation
// SignalVal returns the value of the os.Signal at the pointer, or 0 if the // pointer is nil.
{ "resource": "" }
c168311
validation
// SignalGoString returns the value of the os.Signal for printing in a string.
{ "resource": "" }
c168312
validation
// SignalPresent returns a boolean indicating if the pointer is nil, or if the pointer is pointing to the zero value..
{ "resource": "" }
c168313
validation
// TimeDurationVal returns the value of the string at the pointer, or 0 if the // pointer is nil.
{ "resource": "" }
c168314
validation
// TimeDurationGoString returns the value of the time.Duration for printing in a // string.
{ "resource": "" }
c168315
validation
// CreateConsulClient creates a new Consul API client from the given input.
{ "resource": "" }
c168316
validation
// Consul returns the Consul client for this set.
{ "resource": "" }
c168317
validation
// Vault returns the Vault client for this set.
{ "resource": "" }
c168318
validation
// Stop closes all idle connections for any attached clients.
{ "resource": "" }
c168319
validation
// NewVaultReadQuery creates a new datacenter dependency.
{ "resource": "" }
c168320
validation
// NewKVGetQuery parses a string into a dependency.
{ "resource": "" }
c168321
validation
// NewVaultAgentTokenQuery creates a new dependency.
{ "resource": "" }
c168322
validation
// watch watches the file for changes
{ "resource": "" }
c168323
validation
// NewKVKeysQuery parses a string into a dependency.
{ "resource": "" }
c168324
validation
// New creates a new child process for management with high-level APIs for // sending signals to the child process, restarting the child process, and // gracefully terminating the child process.
{ "resource": "" }
c168325
validation
// ExitCh returns the current exit channel for this child process. This channel // may change if the process is restarted, so implementers must not cache this // value.
{ "resource": "" }
c168326
validation
// Pid returns the pid of the child process. If no child process exists, 0 is // returned.
{ "resource": "" }
c168327
validation
// Command returns the human-formatted command with arguments.
{ "resource": "" }
c168328
validation
// Start starts and begins execution of the child process. A buffered channel // is returned which is where the command's exit code will be returned upon // exit. Any errors that occur prior to starting the command will be returned // as the second error argument, but any errors returned by the command after // executi...
{ "resource": "" }
c168329
validation
// Signal sends the signal to the child process, returning any errors that // occur.
{ "resource": "" }
c168330
validation
// Reload sends the reload signal to the child process and does not wait for a // response. If no reload signal was provided, the process is restarted and // replaces the process attached to this Child.
{ "resource": "" }
c168331
validation
// Kill sends the kill signal to the child process and waits for successful // termination. If no kill signal is defined, the process is killed with the // most aggressive kill signal. If the process does not gracefully stop within // the provided KillTimeout, the process is force-killed. If a splay was // provided, th...
{ "resource": "" }
c168332
validation
// Stop behaves almost identical to Kill except it suppresses future processes // from being started by this child and it prevents the killing of the child // process from sending its value back up the exit channel. This is useful // when doing a graceful shutdown of an application.
{ "resource": "" }
c168333
validation
// Env calculates and returns the finalized environment for this exec // configuration. It takes into account pristine, custom environment, whitelist, // and blacklist values.
{ "resource": "" }
c168334
validation
// NewHealthServiceQuery processes the strings to build a service dependency.
{ "resource": "" }
c168335
validation
// Fetch queries the Consul API defined by the given client and returns a slice // of HealthService objects.
{ "resource": "" }
c168336
validation
// acceptStatus allows us to check if a slice of health checks pass this filter.
{ "resource": "" }
c168337
validation
// RetryFunc returns the retry function associated with this configuration.
{ "resource": "" }
c168338
validation
// NewRunner accepts a slice of TemplateConfigs and returns a pointer to the new // Runner and any error that occurred during creation.
{ "resource": "" }
c168339
validation
// Stop halts the execution of this runner and its subprocesses.
{ "resource": "" }
c168340
validation
// RenderEvents returns the render events for each template was rendered. The // map is keyed by template ID.
{ "resource": "" }
c168341
validation
// Signal sends a signal to the child process, if it exists. Any errors that // occur are returned.
{ "resource": "" }
c168342
validation
// diffAndUpdateDeps iterates through the current map of dependencies on this // runner and stops the watcher for any deps that are no longer required. // // At the end of this function, the given depsMap is converted to a slice and // stored on the runner.
{ "resource": "" }
c168343
validation
// TemplateConfigFor returns the TemplateConfig for the given Template
{ "resource": "" }
c168344
validation
// TemplateConfigMapping returns a mapping between the template ID and the set // of TemplateConfig represented by the template ID
{ "resource": "" }
c168345
validation
// allTemplatesRendered returns true if all the templates in this Runner have // been rendered at least one time.
{ "resource": "" }
c168346
validation
// childEnv creates a map of environment variables for child processes to have // access to configurations in Consul Template's configuration.
{ "resource": "" }
c168347
validation
// storePid is used to write out a PID file to disk.
{ "resource": "" }
c168348
validation
// deletePid is used to remove the PID on exit.
{ "resource": "" }
c168349
validation
// spawnChild spawns a child process with the given inputs and returns the // resulting child.
{ "resource": "" }
c168350
validation
// newQuiescence creates a new quiescence timer for the given template.
{ "resource": "" }
c168351
validation
// tick updates the minimum quiescence timer.
{ "resource": "" }
c168352
validation
// findCommand searches the list of template configs for the given command and // returns it if it exists.
{ "resource": "" }
c168353
validation
// newWatcher creates a new watcher.
{ "resource": "" }
c168354
validation
// NewCatalogServicesQuery parses a string of the format @dc.
{ "resource": "" }
c168355
validation
// DefaultConsulConfig returns a configuration that is populated with the // default values.
{ "resource": "" }
c168356
validation
// StringToSignalFunc parses a string as a signal based on the signal lookup // table. If the user supplied an empty string or nil, a special "nil signal" // is returned. Clients should check for this value and set the response back // nil after mapstructure finishes parsing.
{ "resource": "" }
c168357
validation
// String returns the string format for this wait variable
{ "resource": "" }
c168358
validation
// NewVaultTokenQuery creates a new dependency.
{ "resource": "" }
c168359
validation
// NewLogFilter returns a LevelFilter that is configured with the log levels that // we use.
{ "resource": "" }
c168360
validation
// ValidateLevelFilter verifies that the log levels within the filter are valid.
{ "resource": "" }
c168361
validation
// datacentersFunc returns or accumulates datacenter dependencies.
{ "resource": "" }
c168362
validation
// envFunc returns a function which checks the value of an environment variable. // Invokers can specify their own environment, which takes precedences over any // real environment variables
{ "resource": "" }
c168363
validation
// executeTemplateFunc executes the given template in the context of the // parent. If an argument is specified, it will be used as the context instead. // This can be used for nested template definitions.
{ "resource": "" }
c168364
validation
// fileFunc returns or accumulates file dependencies.
{ "resource": "" }
c168365
validation
// keyFunc returns or accumulates key dependencies.
{ "resource": "" }
c168366
validation
// keyExistsFunc returns true if a key exists, false otherwise.
{ "resource": "" }
c168367
validation
// nodeFunc returns or accumulates catalog node dependency.
{ "resource": "" }
c168368
validation
// nodesFunc returns or accumulates catalog node dependencies.
{ "resource": "" }
c168369
validation
// secretFunc returns or accumulates secret dependencies from Vault.
{ "resource": "" }
c168370
validation
// secretsFunc returns or accumulates a list of secret dependencies from Vault.
{ "resource": "" }
c168371
validation
// serviceFunc returns or accumulates health service dependencies.
{ "resource": "" }
c168372
validation
// servicesFunc returns or accumulates catalog services dependencies.
{ "resource": "" }
c168373
validation
// treeFunc returns or accumulates keyPrefix dependencies.
{ "resource": "" }
c168374
validation
// base64Decode decodes the given string as a base64 string, returning an error // if it fails.
{ "resource": "" }
c168375
validation
// base64Encode encodes the given value into a string represented as base64.
{ "resource": "" }
c168376
validation
// base64URLDecode decodes the given string as a URL-safe base64 string.
{ "resource": "" }
c168377
validation
// base64URLEncode encodes the given string to be URL-safe.
{ "resource": "" }
c168378
validation
// byTag is a template func that takes the provided services and // produces a map based on Service tags. // // The map key is a string representing the service tag. The map value is a // slice of Services which have the tag assigned.
{ "resource": "" }
c168379
validation
// explode is used to expand a list of keypairs into a deeply-nested hash.
{ "resource": "" }
c168380
validation
// explodeHelper is a recursive helper for explode.
{ "resource": "" }
c168381
validation
// in searches for a given value in a given interface.
{ "resource": "" }
c168382
validation
// Indent prefixes each line of a string with the specified number of spaces
{ "resource": "" }
c168383
validation
// join is a version of strings.Join that can be piped
{ "resource": "" }
c168384
validation
// parseBool parses a string into a boolean
{ "resource": "" }
c168385
validation
// parseFloat parses a string into a base 10 float
{ "resource": "" }
c168386
validation
// parseInt parses a string into a base 10 int
{ "resource": "" }
c168387
validation
// parseJSON returns a structure for valid JSON
{ "resource": "" }
c168388
validation
// parseUint parses a string into a base 10 int
{ "resource": "" }
c168389
validation
// plugin executes a subprocess as the given command string. It is assumed the // resulting command returns JSON which is then parsed and returned as the // value for use in the template.
{ "resource": "" }
c168390
validation
// replaceAll replaces all occurrences of a value in a string with the given // replacement value.
{ "resource": "" }
c168391
validation
// regexReplaceAll replaces all occurrences of a regular expression with // the given replacement value.
{ "resource": "" }
c168392
validation
// regexMatch returns true or false if the string matches // the given regular expression
{ "resource": "" }
c168393
validation
// split is a version of strings.Split that can be piped
{ "resource": "" }
c168394
validation
// timestamp returns the current UNIX timestamp in UTC. If an argument is // specified, it will be used to format the timestamp.
{ "resource": "" }
c168395
validation
// toJSON converts the given structure into a deeply nested JSON string.
{ "resource": "" }
c168396
validation
// toJSONPretty converts the given structure into a deeply nested pretty JSON // string.
{ "resource": "" }
c168397
validation
// toYAML converts the given structure into a deeply nested YAML string.
{ "resource": "" }
c168398
validation
// toTOML converts the given structure into a deeply nested TOML string.
{ "resource": "" }
c168399
validation
// add returns the sum of a and b.
{ "resource": "" }