mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-08-24 21:55:17 +08:00
re-organize code directory structure
This commit is contained in:
parent
d3b267bac2
commit
cb4e8ec16b
@ -2,8 +2,8 @@ package directory
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"pkg/storage"
|
"weed/storage"
|
||||||
"pkg/util"
|
"weed/util"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
@ -7,8 +7,8 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"pkg/directory"
|
"weed/directory"
|
||||||
"pkg/storage"
|
"weed/storage"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"text/template"
|
"text/template"
|
@ -4,7 +4,7 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"pkg/storage"
|
"weed/storage"
|
||||||
"strconv"
|
"strconv"
|
||||||
)
|
)
|
||||||
|
|
@ -5,9 +5,9 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"pkg/replication"
|
"weed/replication"
|
||||||
"pkg/storage"
|
"weed/storage"
|
||||||
"pkg/topology"
|
"weed/topology"
|
||||||
"runtime"
|
"runtime"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
@ -4,9 +4,9 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"net/url"
|
"net/url"
|
||||||
"pkg/storage"
|
"weed/storage"
|
||||||
"pkg/topology"
|
"weed/topology"
|
||||||
"pkg/util"
|
"weed/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AllocateVolumeResult struct {
|
type AllocateVolumeResult struct {
|
@ -5,8 +5,8 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
_ "fmt"
|
_ "fmt"
|
||||||
"net/url"
|
"net/url"
|
||||||
"pkg/storage"
|
"weed/storage"
|
||||||
"pkg/util"
|
"weed/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Location struct {
|
type Location struct {
|
@ -4,9 +4,9 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"pkg/operation"
|
"weed/operation"
|
||||||
"pkg/storage"
|
"weed/storage"
|
||||||
"pkg/topology"
|
"weed/topology"
|
||||||
"sync"
|
"sync"
|
||||||
)
|
)
|
||||||
|
|
@ -4,8 +4,8 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"pkg/storage"
|
"weed/storage"
|
||||||
"pkg/topology"
|
"weed/topology"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
@ -3,7 +3,7 @@ package storage
|
|||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"pkg/util"
|
"weed/util"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
@ -7,7 +7,7 @@ import (
|
|||||||
"mime"
|
"mime"
|
||||||
"net/http"
|
"net/http"
|
||||||
"path"
|
"path"
|
||||||
"pkg/util"
|
"weed/util"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
@ -3,7 +3,7 @@ package storage
|
|||||||
import (
|
import (
|
||||||
//"log"
|
//"log"
|
||||||
"os"
|
"os"
|
||||||
"pkg/util"
|
"weed/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type NeedleMap struct {
|
type NeedleMap struct {
|
@ -5,7 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"pkg/util"
|
"weed/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
@ -6,7 +6,7 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
"net/url"
|
"net/url"
|
||||||
"pkg/util"
|
"weed/util"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
@ -2,7 +2,7 @@ package topology
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
_ "fmt"
|
_ "fmt"
|
||||||
"pkg/storage"
|
"weed/storage"
|
||||||
"strconv"
|
"strconv"
|
||||||
)
|
)
|
||||||
|
|
@ -2,7 +2,7 @@ package topology
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"pkg/storage"
|
"weed/storage"
|
||||||
)
|
)
|
||||||
|
|
||||||
type NodeId string
|
type NodeId string
|
@ -3,7 +3,7 @@ package topology
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"pkg/storage"
|
"weed/storage"
|
||||||
)
|
)
|
||||||
|
|
||||||
type NodeList struct {
|
type NodeList struct {
|
@ -4,7 +4,7 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"pkg/storage"
|
"weed/storage"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
@ -4,9 +4,9 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"pkg/directory"
|
"weed/directory"
|
||||||
"pkg/sequence"
|
"weed/sequence"
|
||||||
"pkg/storage"
|
"weed/storage"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Topology struct {
|
type Topology struct {
|
@ -5,8 +5,8 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/url"
|
"net/url"
|
||||||
"pkg/storage"
|
"weed/storage"
|
||||||
"pkg/util"
|
"weed/util"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
@ -3,7 +3,7 @@ package topology
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"pkg/storage"
|
"weed/storage"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
@ -4,7 +4,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"pkg/storage"
|
"weed/storage"
|
||||||
)
|
)
|
||||||
|
|
||||||
type VolumeLayout struct {
|
type VolumeLayout struct {
|
@ -7,8 +7,8 @@ import (
|
|||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"pkg/operation"
|
"weed/operation"
|
||||||
"pkg/util"
|
"weed/util"
|
||||||
"strconv"
|
"strconv"
|
||||||
)
|
)
|
||||||
|
|
@ -7,8 +7,8 @@ import (
|
|||||||
"mime"
|
"mime"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"pkg/operation"
|
"weed/operation"
|
||||||
"pkg/storage"
|
"weed/storage"
|
||||||
"runtime"
|
"runtime"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
@ -242,7 +242,7 @@ func DeleteHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
n.Size = 0
|
n.Size = 0
|
||||||
ret, err := store.Delete(volumeId, n)
|
ret, err := store.Delete(volumeId, n)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println("delete error: %s", err)
|
log.Printf("delete error: %s\n", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user