Ejemplo n.º 1
0
// Init initializes the driver.
func (d *driver) Init(context types.Context, config gofig.Config) error {
	// Ensure backwards compatibility with ebs and ec2 in config
	ebs.BackCompat(config)
	d.config = config
	d.accessKey = d.getAccessKey()
	if v := d.getRegion(); v != "" {
		d.region = &v
	}
	if v := d.getEndpoint(); v != "" {
		d.endpoint = &v
	}
	maxRetries := d.getMaxRetries()
	d.maxRetries = &maxRetries
	d.kmsKeyID = d.getKmsKeyID()
	log.Info("storage driver initialized")
	return nil
}
Ejemplo n.º 2
0
func (d *driver) Init(ctx types.Context, config gofig.Config) error {
	// ensure backwards compatibility with ebs and ec2 in config
	ebs.BackCompat(config)
	d.config = config
	return nil
}