disk

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DiskTypeFilesystem = "filesystem"
	DiskTypeBlock      = "block"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockDiskOps added in v1.6.0

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

func (BlockDiskOps) DiskCreate added in v1.6.0

func (ops BlockDiskOps) DiskCreate(ctx context.Context, req *rpc.DiskCreateRequest) (*rpc.Disk, error)

func (BlockDiskOps) DiskDelete added in v1.6.0

func (ops BlockDiskOps) DiskDelete(req *rpc.DiskDeleteRequest) (*emptypb.Empty, error)

func (BlockDiskOps) DiskGet added in v1.6.0

func (ops BlockDiskOps) DiskGet(req *rpc.DiskGetRequest) (*rpc.Disk, error)

func (BlockDiskOps) DiskReplicaInstanceDelete added in v1.6.0

func (ops BlockDiskOps) DiskReplicaInstanceDelete(req *rpc.DiskReplicaInstanceDeleteRequest) (*emptypb.Empty, error)

func (BlockDiskOps) DiskReplicaInstanceList added in v1.6.0

type DiskOps added in v1.6.0

type DiskOps interface {
	DiskCreate(context.Context, *rpc.DiskCreateRequest) (*rpc.Disk, error)
	DiskDelete(*rpc.DiskDeleteRequest) (*emptypb.Empty, error)
	DiskGet(req *rpc.DiskGetRequest) (*rpc.Disk, error)
	DiskReplicaInstanceList(*rpc.DiskReplicaInstanceListRequest) (*rpc.DiskReplicaInstanceListResponse, error)
	DiskReplicaInstanceDelete(*rpc.DiskReplicaInstanceDeleteRequest) (*emptypb.Empty, error)
}

type FilesystemDiskOps added in v1.6.0

type FilesystemDiskOps struct{}

func (FilesystemDiskOps) DiskCreate added in v1.6.0

func (ops FilesystemDiskOps) DiskCreate(ctx context.Context, req *rpc.DiskCreateRequest) (*rpc.Disk, error)

func (FilesystemDiskOps) DiskDelete added in v1.6.0

func (ops FilesystemDiskOps) DiskDelete(req *rpc.DiskDeleteRequest) (*emptypb.Empty, error)

func (FilesystemDiskOps) DiskGet added in v1.6.0

func (ops FilesystemDiskOps) DiskGet(req *rpc.DiskGetRequest) (*rpc.Disk, error)

func (FilesystemDiskOps) DiskReplicaInstanceDelete added in v1.6.0

func (ops FilesystemDiskOps) DiskReplicaInstanceDelete(req *rpc.DiskReplicaInstanceDeleteRequest) (*emptypb.Empty, error)

func (FilesystemDiskOps) DiskReplicaInstanceList added in v1.6.0

type GRPCHealthChecker

type GRPCHealthChecker struct{}

func (*GRPCHealthChecker) IsRunning

func (c *GRPCHealthChecker) IsRunning(address string) bool

func (*GRPCHealthChecker) WaitForRunning

func (c *GRPCHealthChecker) WaitForRunning(address, name string, stopCh chan struct{}) bool

type HealthChecker

type HealthChecker interface {
	IsRunning(address string) bool
	WaitForRunning(address, name string, stopCh chan struct{}) bool
}

type Server

type Server struct {
	rpc.UnimplementedDiskServiceServer
	sync.RWMutex

	HealthChecker HealthChecker
	// contains filtered or unexported fields
}

func NewServer

func NewServer(ctx context.Context, spdkEnabled bool, spdkServiceAddress string) (srv *Server, err error)

func (*Server) DiskCreate

func (s *Server) DiskCreate(ctx context.Context, req *rpc.DiskCreateRequest) (*rpc.Disk, error)

func (*Server) DiskDelete

func (s *Server) DiskDelete(ctx context.Context, req *rpc.DiskDeleteRequest) (*emptypb.Empty, error)

func (*Server) DiskGet

func (s *Server) DiskGet(ctx context.Context, req *rpc.DiskGetRequest) (*rpc.Disk, error)

func (*Server) DiskReplicaInstanceDelete

func (s *Server) DiskReplicaInstanceDelete(ctx context.Context, req *rpc.DiskReplicaInstanceDeleteRequest) (*emptypb.Empty, error)

func (*Server) VersionGet

func (s *Server) VersionGet(ctx context.Context, req *emptypb.Empty) (*rpc.DiskVersionResponse, error)

Jump to

Keyboard shortcuts

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