Skip to content

Commit

Permalink
Make donut fully integrated back into API handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavardhana committed Jul 3, 2015
1 parent 12bde7d commit 7c37e9d
Show file tree
Hide file tree
Showing 18 changed files with 973 additions and 597 deletions.
12 changes: 0 additions & 12 deletions commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,6 @@ import (
"github.com/minio/minio/pkg/server/api"
)

func removeDuplicates(slice []string) []string {
newSlice := []string{}
seen := make(map[string]struct{})
for _, val := range slice {
if _, ok := seen[val]; !ok {
newSlice = append(newSlice, val)
seen[val] = struct{}{}
}
}
return newSlice
}

var commands = []cli.Command{
serverCmd,
controlCmd,
Expand Down
12 changes: 10 additions & 2 deletions pkg/server/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,25 @@

package api

import "github.com/minio/minio/pkg/storage/donut"

// Operation container for individual operations read by Ticket Master
type Operation struct {
ProceedCh chan struct{}
}

// Minio container for API and also carries OP (operation) channel
type Minio struct {
OP chan Operation
OP chan Operation
Donut donut.Interface
}

// New instantiate a new minio API
func New() Minio {
return Minio{OP: make(chan Operation)}
// ignore errors for now
d, _ := donut.LoadDonut()
return Minio{
OP: make(chan Operation),
Donut: d,
}
}
Loading

0 comments on commit 7c37e9d

Please sign in to comment.