1
0
mirror of https://github.com/gluster/glusterd2.git synced 2026-02-05 12:45:38 +01:00
Files
glusterd2/plugins/quota/init.go
Hari Gowtham 806a203695 quota: disable quotad
quota enable and disable as a volume set option
The daemon start and stop are called using the actor
framework.

Updates: #421
Signed-off-by: Hari Gowtham <hgowtham@redhat.com>
2018-07-04 12:37:40 +05:30

47 lines
1.0 KiB
Go

package quota
import (
"github.com/gluster/glusterd2/glusterd2/servers/rest/route"
)
const name = "quota"
// Plugin is a structure which implements GlusterdPlugin interface
type Plugin struct {
}
// Name returns name of plugin
func (p *Plugin) Name() string {
return name
}
// RestRoutes returns list of REST API routes to register with Glusterd
func (p *Plugin) RestRoutes() route.Routes {
return route.Routes{
route.Route{
Name: "QuotaList",
Method: "GET",
Pattern: "/quota/{volname}/limit",
Version: 1,
HandlerFunc: quotaListHandler},
route.Route{
Name: "QuotaLimit",
Method: "POST",
Pattern: "/quota/{volname}/limit",
Version: 1,
HandlerFunc: quotaLimitHandler},
route.Route{
Name: "QuotaRemove",
Method: "DELETE",
Pattern: "/quota/{volname}/limit",
Version: 1,
HandlerFunc: quotaRemoveHandler},
}
}
// RegisterStepFuncs registers transaction step functions with
// Glusterd Transaction framework
func (p *Plugin) RegisterStepFuncs() {
return
}