rest

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleError

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"`
	RevisionCounterDisabled bool                        `json:"revisioncounterdisabled"`
}

func NewReplica

func NewReplica(context *api.ApiContext, state types.ReplicaState, 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