// Config returns a new ociCommon.ConfigurationProvider instance
357061
func (j JujuConfigProvider) Config() (ociCommon.ConfigurationProvider, error) {
	if err := j.Validate(); err != nil {
		return nil, err
	}
	return &j, nil
}
427968
func (d *DotGit) Config() (billy.File, error) {
	return d.fs.Open(configPath)
}
1339204
func (s *UpdateResolverRuleInput) SetConfig(v *ResolverRuleConfig) *UpdateResolverRuleInput {
	s.Config = v
	return s
}
682542
func NewConfig() Config {
	cfg := make(Config)
	cfg[Globals] = make(map[GlobalOption]string)
	return cfg
}
907304
func DefaultConfig() *Config {
	hostname, _ := os.Hostname()
	return &Config{
		NodeID:            stringid.TruncateID(stringid.GenerateRandomID()),
		Hostname:          hostname,
		BindAddr:          "0.0.0.0",
		PacketBufferSize:  1400,
		StatsPrintPeriod:  5 * time.Minute,
		HealthPrintPeriod: 1 * time.Minute,
		reapEntryInterval: 30 * time.Minute,
	}
}
164622
func (s *SvcManager) Config(name string) (mgr.Config, error) {
	exists, err := s.exists(name)
	if err != nil {
		return mgr.Config{}, err
	}
	if !exists {
		return mgr.Config{}, c_ERROR_SERVICE_DOES_NOT_EXIST
	}
	service, err := s.getService(name)
	if err != nil {
		return mgr.Config{}, errors.Trace(err)
	}
	defer service.Close()
	return service.Config()
}
937997
func (s *DirectStore) Config(ctx context.Context) chronograf.ConfigStore {
	return s.ConfigStore
}
755423
func (a *Application) Config() map[string]interface{} {
	a.mu.Lock()
	cfg := make(map[string]interface{}, len(a.details.Config))
	for k, v := range a.details.Config {
		cfg[k] = v
	}
	a.mu.Unlock()
	a.metrics.ApplicationConfigReads.Inc()
	return cfg
}
817651
func Config(c *cli.Context) {
	// This will create the configuration directory and file if it does not
	// already exist.
	cfg, err := config.New()
	if err != nil {
		log.Fatal(err)
	}

	if c.Bool("server-url") {
		if len(c.Args()) > 1 {
			log.Fatal("invalid number of argument")
		}

		if !c.Args().Present() {
			fmt.Println("server-url = ", cfg.DownloadServerURL)
			return
		}

		cfg.DownloadServerURL = c.Args().First()
		if err = cfg.Save(); err != nil {
			log.Fatal(err)
		}

		log.Success("download server URL successfully updated")
		return
	}
}
556751
func (p provider) NewConfig() (*osincli.ClientConfig, error) {
	config := &osincli.ClientConfig{
		ClientId:                 p.ClientID,
		ClientSecret:             p.ClientSecret,
		ErrorsInStatusCode:       true,
		SendClientSecretInParams: true,
		AuthorizeUrl:             p.AuthorizeURL,
		TokenUrl:                 p.TokenURL,
		Scope:                    strings.Join(p.Scopes, " "),
	}
	return config, nil
}
998084
func (c *Pre182) Config() *Config {
	cfg := &Config{
		Root:   c.Root.StoreConfig(),
		Mounts: make(map[string]*StoreConfig, len(c.Mounts)),
	}
	for k, v := range c.Mounts {
		cfg.Mounts[k] = v.StoreConfig()
	}
	return cfg
}
763234
func Config() (c *ConfigController) {
	return &ConfigController{
		List:   configList,
		Delete: configDelete,
		New:    configNew,
		Create: configCreate,
		Edit:   configEdit,
		Update: configUpdate,
	}
}
701908
func Config(config amqp.Config) ClientOpt {
	return func(c *Client) {
		c.config = config
	}
}
409166
func (b SAControllerClientBuilder) Config(name string) (*restclient.Config, error) {
	sa, err := getOrCreateServiceAccount(b.CoreClient, b.Namespace, name)
	if err != nil {
		return nil, err
	}

	var clientConfig *restclient.Config
	fieldSelector := fields.SelectorFromSet(map[string]string{
		api.SecretTypeField: string(v1.SecretTypeServiceAccountToken),
	}).String()
	lw := &cache.ListWatch{
		ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
			options.FieldSelector = fieldSelector
			return b.CoreClient.Secrets(b.Namespace).List(options)
		},
		WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
			options.FieldSelector = fieldSelector
			return b.CoreClient.Secrets(b.Namespace).Watch(options)
		},
	}
	ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
	defer cancel()
	_, err = watchtools.UntilWithSync(ctx, lw, &v1.Secret{}, nil,
		func(event watch.Event) (bool, error) {
			switch event.Type {
			case watch.Deleted:
				return false, nil
			case watch.Error:
				return false, fmt.Errorf("error watching")

			case watch.Added, watch.Modified:
				secret, ok := event.Object.(*v1.Secret)
				if !ok {
					return false, fmt.Errorf("unexpected object type: %T", event.Object)
				}
				if !serviceaccount.IsServiceAccountToken(secret, sa) {
					return false, nil
				}
				if len(secret.Data[v1.ServiceAccountTokenKey]) == 0 {
					return false, nil
				}
				validConfig, valid, err := b.getAuthenticatedConfig(sa, string(secret.Data[v1.ServiceAccountTokenKey]))
				if err != nil {
					klog.Warningf("error validating API token for %s/%s in secret %s: %v", sa.Namespace, sa.Name, secret.Name, err)
					// continue watching for good tokens
					return false, nil
				}
				if !valid {
					klog.Warningf("secret %s contained an invalid API token for %s/%s", secret.Name, sa.Namespace, sa.Name)
					// try to delete the secret containing the invalid token
					if err := b.CoreClient.Secrets(secret.Namespace).Delete(secret.Name, &metav1.DeleteOptions{}); err != nil && !apierrors.IsNotFound(err) {
						klog.Warningf("error deleting secret %s containing invalid API token for %s/%s: %v", secret.Name, sa.Namespace, sa.Name, err)
					}
					// continue watching for good tokens
					return false, nil
				}
				clientConfig = validConfig
				return true, nil

			default:
				return false, fmt.Errorf("unexpected event type: %v", event.Type)
			}
		})
	if err != nil {
		return nil, fmt.Errorf("unable to get token for service account: %v", err)
	}

	return clientConfig, nil
}
986841
func DefaultConfig() *Config {
	return &Config{
		DisableCoordinates:     false,
		Tags:                   make(map[string]string),
		BindAddr:               "0.0.0.0",
		AdvertiseAddr:          "",
		LogLevel:               "INFO",
		RPCAddr:                "127.0.0.1:7373",
		Protocol:               serf.ProtocolVersionMax,
		ReplayOnJoin:           false,
		Profile:                "lan",
		RetryInterval:          30 * time.Second,
		SyslogFacility:         "LOCAL0",
		QueryResponseSizeLimit: 1024,
		QuerySizeLimit:         1024,
		UserEventSizeLimit:     512,
		BroadcastTimeout:       5 * time.Second,
	}
}
558861
func (p *Project) Config() (string, error) {
	cfg := ExportedConfig{
		Version:  "2.0",
		Services: p.ServiceConfigs.All(),
		Volumes:  p.VolumeConfigs,
		Networks: p.NetworkConfigs,
	}

	bytes, err := yaml.Marshal(cfg)
	return string(bytes), err
}
367697
func (api *LoadBalancerAPI) Config(id int64) (bool, error) {
	var (
		method = "PUT"
		uri    = fmt.Sprintf("%s/%d/config", api.getResourceURL(), id)
	)
	return api.modify(method, uri, nil)
}