api

package
v0.0.0-...-114edff Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2024 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LvolToProtoLvol

func LvolToProtoLvol(l *Lvol) *spdkrpc.Lvol

func ReplicaToProtoReplica

func ReplicaToProtoReplica(r *Replica) *spdkrpc.Replica

Types

type DiskInfo

type DiskInfo struct {
	ID          string
	Name        string
	UUID        string
	Path        string
	Type        string
	TotalSize   int64
	FreeSize    int64
	TotalBlocks int64
	FreeBlocks  int64
	BlockSize   int64
	ClusterSize int64
}

type Engine

type Engine struct {
	Name              string                `json:"name"`
	VolumeName        string                `json:"volumeName"`
	SpecSize          uint64                `json:"spec_size"`
	ActualSize        uint64                `json:"actual_size"`
	IP                string                `json:"ip"`
	Port              int32                 `json:"port"`
	TargetIP          string                `json:"target_ip"`
	TargetPort        int32                 `json:"target_port"`
	ReplicaAddressMap map[string]string     `json:"replica_address_map"`
	ReplicaModeMap    map[string]types.Mode `json:"replica_mode_map"`
	Head              *Lvol                 `json:"head"`
	Snapshots         map[string]*Lvol      `json:"snapshots"`
	Frontend          string                `json:"frontend"`
	Endpoint          string                `json:"endpoint"`
	State             string                `json:"state"`
	ErrorMsg          string                `json:"error_msg"`
}

func ProtoEngineToEngine

func ProtoEngineToEngine(e *spdkrpc.Engine) *Engine

type EngineStream

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

func (*EngineStream) Recv

func (s *EngineStream) Recv() (*emptypb.Empty, error)

type Lvol

type Lvol struct {
	Name              string          `json:"name"`
	UUID              string          `json:"uuid"`
	SpecSize          uint64          `json:"spec_size"`
	ActualSize        uint64          `json:"actual_size"`
	Parent            string          `json:"parent"`
	Children          map[string]bool `json:"children"`
	CreationTime      string          `json:"creation_time"`
	UserCreated       bool            `json:"user_created"`
	SnapshotTimestamp string          `json:"snapshot_timestamp"`
}

func ProtoLvolToLvol

func ProtoLvolToLvol(l *spdkrpc.Lvol) *Lvol

type Replica

type Replica struct {
	Name       string           `json:"name"`
	LvsName    string           `json:"lvs_name"`
	LvsUUID    string           `json:"lvs_uuid"`
	SpecSize   uint64           `json:"spec_size"`
	ActualSize uint64           `json:"actual_size"`
	Head       *Lvol            `json:"head"`
	Snapshots  map[string]*Lvol `json:"snapshots"`
	IP         string           `json:"ip"`
	PortStart  int32            `json:"port_start"`
	PortEnd    int32            `json:"port_end"`
	State      string           `json:"state"`
	ErrorMsg   string           `json:"error_msg"`
	Rebuilding bool             `json:"rebuilding"`
}

func ProtoReplicaToReplica

func ProtoReplicaToReplica(r *spdkrpc.Replica) *Replica

type ReplicaRebuildingStatus

type ReplicaRebuildingStatus struct {
	DstReplicaName    string `json:"dst_replica_name"`
	DstReplicaAddress string `json:"dst_replica_address"`
	SrcReplicaName    string `json:"src_replica_name"`
	SrcReplicaAddress string `json:"src_replica_address"`
	SnapshotName      string `json:"snapshot_name"`
	State             string `json:"state"`
	Progress          uint32 `json:"progress"`
	TotalState        string `json:"total_state"`
	TotalProgress     uint32 `json:"total_progress"`
	Error             string `json:"error"`
}

func ProtoShallowCopyStatusToReplicaRebuildingStatus

func ProtoShallowCopyStatusToReplicaRebuildingStatus(replicaName, replicaAddress string, status *spdkrpc.ReplicaRebuildingDstShallowCopyCheckResponse) *ReplicaRebuildingStatus

type ReplicaStream

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

func (*ReplicaStream) Recv

func (s *ReplicaStream) Recv() (*emptypb.Empty, error)

type SnapshotOptions

type SnapshotOptions struct {
	UserCreated bool
	Timestamp   string
}

Jump to

Keyboard shortcuts

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