code: func (p *ConnectManagedProxy) ParseConfig() (*ConnectManagedProxyConfig, error) {
  	var cfg ConnectManagedProxyConfig
  	d, err := mapstructure.NewDecoder(&mapstructure.DecoderConfig{
  		ErrorUnused:      false,
  		WeaklyTypedInput: true, // allow string port etc.
  		Result:           &cfg,
  	})
  	if err != nil {
  		return nil, err
  	}
  	err = d.Decode(p.Config)
  	if err != nil {
  		return nil, err
  	}
  	return &cfg, nil
  }
docs: // ParseConfig attempts to read the fields we care about from the otherwise
  // opaque config map. They are all optional but it may fail if one is specified
  // but an invalid value.