rest

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleError added in v0.2.0

func HandleError(s *client.Schemas, t func(http.ResponseWriter, *http.Request) error) http.Handler

func NewRouter

func NewRouter(s *Server) *mux.Router

func NewSchema

func NewSchema() *client.Schemas

Types

type CreateInput

type CreateInput struct {
	client.Resource
	Size string `json:"size"`
}

type PrepareRemoveDiskInput added in v0.2.0

type PrepareRemoveDiskInput struct {
	client.Resource
	Name string `json:"name"`
}

type PrepareRemoveDiskOutput added in v0.2.0

type PrepareRemoveDiskOutput struct {
	client.Resource
	Operations []replica.PrepareRemoveAction `json:"operations"`
}

type RebuildingInput

type RebuildingInput struct {
	client.Resource
	Rebuilding bool `json:"rebuilding"`
}

type RemoveDiskInput

type RemoveDiskInput struct {
	client.Resource
	Name     string `json:"name"`
	MarkOnly bool   `json:"markonly"`
}

type Replica

type Replica struct {
	client.Resource
	Dirty      bool     `json:"dirty"`
	Rebuilding bool     `json:"rebuilding"`
	Head       string   `json:"head"`
	Parent     string   `json:"parent"`
	Size       string   `json:"size"`
	SectorSize int64    `json:"sectorSize"`
	State      string   `json:"state"`
	Chain      []string `json:"chain"`
}

func NewReplica

func NewReplica(context *api.ApiContext, state replica.State, info replica.Info, rep *replica.Replica) *Replica

type RevertInput added in v0.2.0

type RevertInput struct {
	client.Resource
	Name string `json:"name"`
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(s *replica.Server) *Server

func (*Server) CloseReplica

func (s *Server) CloseReplica(rw http.ResponseWriter, req *http.Request) error

func (*Server) Create

func (s *Server) Create(rw http.ResponseWriter, req *http.Request) error

func (*Server) DeleteReplica

func (s *Server) DeleteReplica(rw http.ResponseWriter, req *http.Request) error

func (*Server) GetReplica

func (s *Server) GetReplica(rw http.ResponseWriter, req *http.Request) error

func (*Server) ListReplicas

func (s *Server) ListReplicas(rw http.ResponseWriter, req *http.Request) error

func (*Server) OpenReplica

func (s *Server) OpenReplica(rw http.ResponseWriter, req *http.Request) error

func (*Server) PrepareRemoveDisk added in v0.2.0

func (s *Server) PrepareRemoveDisk(rw http.ResponseWriter, req *http.Request) error

func (*Server) ReloadReplica

func (s *Server) ReloadReplica(rw http.ResponseWriter, req *http.Request) error

func (*Server) RemoveDisk

func (s *Server) RemoveDisk(rw http.ResponseWriter, req *http.Request) error

func (*Server) Replica

func (s *Server) Replica(apiContext *api.ApiContext) *Replica

func (*Server) RevertReplica added in v0.2.0

func (s *Server) RevertReplica(rw http.ResponseWriter, req *http.Request) error

func (*Server) SetRebuilding

func (s *Server) SetRebuilding(rw http.ResponseWriter, req *http.Request) error

func (*Server) SnapshotReplica

func (s *Server) SnapshotReplica(rw http.ResponseWriter, req *http.Request) error

type SnapshotInput

type SnapshotInput struct {
	client.Resource
	Name string `json:"Name"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL