rest

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: Apache-2.0 Imports: 7 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 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,string"`
	BackingFile     string                      `json:"backingFile"`
	State           string                      `json:"state"`
	Chain           []string                    `json:"chain"`
	Disks           map[string]replica.DiskInfo `json:"disks"`
	RemainSnapshots int                         `json:"remainsnapshots"`
	RevisionCounter int64                       `json:"revisioncounter,string"`
}

func NewReplica

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

type Server

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

func NewServer

func NewServer(s *replica.Server) *Server

func (*Server) ListReplicas

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

func (*Server) Replica

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

Jump to

Keyboard shortcuts

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