// SetNodeConfig applies node-related command line flags to the config.
499117
func SetNodeConfig(ctx *cli.Context, cfg *node.Config) {
	SetP2PConfig(ctx, &cfg.P2P)
	setIPC(ctx, cfg)
	setHTTP(ctx, cfg)
	setGraphQL(ctx, cfg)
	setWS(ctx, cfg)
	setNodeUserIdent(ctx, cfg)
	setDataDir(ctx, cfg)

	if ctx.GlobalIsSet(ExternalSignerFlag.Name) {
		cfg.ExternalSigner = ctx.GlobalString(ExternalSignerFlag.Name)
	}

	if ctx.GlobalIsSet(KeyStoreDirFlag.Name) {
		cfg.KeyStoreDir = ctx.GlobalString(KeyStoreDirFlag.Name)
	}
	if ctx.GlobalIsSet(LightKDFFlag.Name) {
		cfg.UseLightweightKDF = ctx.GlobalBool(LightKDFFlag.Name)
	}
	if ctx.GlobalIsSet(NoUSBFlag.Name) {
		cfg.NoUSB = ctx.GlobalBool(NoUSBFlag.Name)
	}
	if ctx.GlobalIsSet(InsecureUnlockAllowedFlag.Name) {
		cfg.InsecureUnlockAllowed = ctx.GlobalBool(InsecureUnlockAllowedFlag.Name)
	}
}
68782
func (c *Client) SetClusterConfig(cc services.ClusterConfig) error {
	data, err := services.GetClusterConfigMarshaler().Marshal(cc)
	if err != nil {
		return trace.Wrap(err)
	}

	_, err = c.PostJSON(c.Endpoint("configuration"), &setClusterConfigReq{ClusterConfig: data})
	if err != nil {
		return trace.Wrap(err)
	}

	return nil
}
1121566
func (s *CodeGenNode) SetNodeType(v string) *CodeGenNode {
	s.NodeType = &v
	return s
}
415881
func (s *GetFunctionOutput) SetConfiguration(v *FunctionConfiguration) *GetFunctionOutput {
	s.Configuration = v
	return s
}
1336478
func (db *DB) SetConfig(config Config) error {
	db.mu.Lock()
	defer db.mu.Unlock()
	if db.closed {
		return ErrDatabaseClosed
	}
	switch config.SyncPolicy {
	default:
		return ErrInvalidSyncPolicy
	case Never, EverySecond, Always:
	}
	db.config = config
	return nil
}
439906
func (env *environ) SetConfig(cfg *config.Config) error {
	env.lock.Lock()
	defer env.lock.Unlock()

	ecfg, err := validateConfig(cfg, env.ecfg)
	if err != nil {
		return errors.Trace(err)
	}
	env.ecfg = ecfg

	return nil
}
573722
func (a *API) SetDomainConfig(domain int, key string, value string) (string, error) {
	url := a.BuildURL("/v2/domain/%d/config/%s/", domain, key)
	return a.putTextPlain(url, Params{}, value)
}
928735
func (r *Runtime) SetConfig(g *generate.Generator) error {
	if g == nil {
		return errors.New("cannot set a nil config")
	}
	return g.SaveToFile(filepath.Join(r.bundleDir(), "config.json"), generate.ExportOptions{})
}
1254527
func (l *Logger) SetConfig(source string, logLvl LogLevel, formatter Formatter, output io.Writer) {
	l.globalsL.Lock()
	defer l.globalsL.Unlock()

	if l.globals == nil {
		l.globals = make(map[string]interface{})
	}
	l.globals["source"] = source
	l.logLvl = logLvl
	l.fLogger.setFormatter(formatter)
	l.fLogger.setOutput(output)
}
1089326
func (s *SyncDeploymentJobOutput) SetDeploymentConfig(v *DeploymentConfig) *SyncDeploymentJobOutput {
	s.DeploymentConfig = v
	return s
}
1107189
func (s *UpdateGraphqlApiInput) SetLogConfig(v *LogConfig) *UpdateGraphqlApiInput {
	s.LogConfig = v
	return s
}
893633
func (s *ModifyClusterInput) SetNodeType(v string) *ModifyClusterInput {
	s.NodeType = &v
	return s
}
615308
func (s *RebootNodeInput) SetNodeId(v string) *RebootNodeInput {
	s.NodeId = &v
	return s
}
835212
func (s *PendingModifiedValues) SetNodeType(v string) *PendingModifiedValues {
	s.NodeType = &v
	return s
}
200046
func (c *configCommand) setConfig(client configCommandAPI, ctx *cmd.Context) error {
	attrs, err := c.setOptions.ReadAttrs(ctx)
	if err != nil {
		return errors.Trace(err)
	}
	var keys []string
	values := make(attributes)
	for k, v := range attrs {
		if k == config.AgentVersionKey {
			return errors.Errorf(`"agent-version"" must be set via "upgrade-model"`)
		}
		values[k] = v
		keys = append(keys, k)
	}

	for _, k := range c.resetKeys {
		if _, ok := values[k]; ok {
			return errors.Errorf(
				"key %q cannot be both set and reset in the same command", k)
		}
	}

	if err := c.verifyKnownKeys(client, keys); err != nil {
		return errors.Trace(err)
	}
	return block.ProcessBlockedError(client.ModelSet(values), block.BlockChange)
}
913980
func (s *Cluster) SetNodeType(v string) *Cluster {
	s.NodeType = &v
	return s
}
350344
func (s *GetNodeInput) SetNodeId(v string) *GetNodeInput {
	s.NodeId = &v
	return s
}