Make donut fully integrated back into API handlers

This commit is contained in:
Harshavardhana
2015-07-02 20:31:22 -07:00
parent 12bde7df30
commit 7c37e9d06a
18 changed files with 971 additions and 595 deletions

View File

@@ -16,6 +16,8 @@
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{}
@@ -23,10 +25,16 @@ type Operation 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,
}
}