Beispiel #1
0
// Create a pool for an environment
func PoolCreate(configStore *config.Store, env, pool string) error {
	exists, err := configStore.PoolExists(env, pool)
	if err != nil {
		return err
	} else if exists {
		return fmt.Errorf("pool '%s' exists", pool)
	}

	_, err = configStore.CreatePool(pool, env)
	if err != nil {
		return err
	}

	return nil
}