code: func (c *sioClient) init() error {
  	c.mtx.Lock()
  	defer c.mtx.Unlock()
  	if c.inited {
  		return nil
  	}
  	klog.V(4).Infoln(log("initializing scaleio client"))
  	client, err := sio.NewClientWithArgs(c.gateway, "", c.insecure, c.certsEnabled)
  	if err != nil {
  		klog.Error(log("failed to create client: %v", err))
  		return err
  	}
  	c.client = client
  	if _, err = c.client.Authenticate(
  		&sio.ConfigConnect{
  			Endpoint: c.gateway,
  			Version:  "",
  			Username: c.username,
  			Password: c.password},
  	); err != nil {
  		klog.Error(log("client authentication failed: %v", err))
  		return err
  	}
  
  	// retrieve system
  	if c.system, err = c.findSystem(c.sysName); err != nil {
  		klog.Error(log("unable to find system %s: %v", c.sysName, err))
  		return err
  	}
  
  	// retrieve protection domain
  	if c.protectionDomain, err = c.findProtectionDomain(c.pdName); err != nil {
  		klog.Error(log("unable to find protection domain %s: %v", c.protectionDomain, err))
  		return err
  	}
  	// retrieve storage pool
  	if c.storagePool, err = c.findStoragePool(c.spName); err != nil {
  		klog.Error(log("unable to find storage pool %s: %v", c.storagePool, err))
  		return err
  	}
  	c.inited = true
  	return nil
  }
docs: // init setups client and authenticate