Beispiel #1
0
// getNewAPI instantiate a new minio API
func getNewAPI() MinioAPI {
	// ignore errors for now
	d, err := donut.New()
	fatalIf(err.Trace(), "Instantiating donut failed.", nil)

	return MinioAPI{
		OP:    make(chan APIOperation),
		Donut: d,
	}
}
Beispiel #2
0
// New instantiate a new minio API
func New() Minio {
	// ignore errors for now
	d, err := donut.New()
	if err != nil {
		panic(err)
	}
	return Minio{
		OP:    make(chan Operation),
		Donut: d,
	}
}
Beispiel #3
0
// getNewAPI instantiate a new minio API
func getNewAPI(anonymous bool) API {
	// ignore errors for now
	d, err := donut.New()
	fatalIf(err.Trace(), "Instantiating donut failed.", nil)

	return API{
		OP:        make(chan APIOperation),
		Donut:     d,
		Anonymous: anonymous,
	}
}