client

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoRequest

func DoRequest(url string) ([]byte, error)

DoRequest Http Post Request

Types

type Connection

type Connection interface {
	GetLvm(ctx context.Context, volGroup string, volumeID string) (string, error)
	CreateLvm(ctx context.Context, opt *LVMOptions) (string, error)
	DeleteLvm(ctx context.Context, volGroup string, volumeID string) error
	CreateSnapshot(ctx context.Context, volGroup string, snapVolumeID string, volumeID string, size uint64) (string, error)
	DeleteSnapshot(ctx context.Context, volGroup string, snapVolumeID string) error
	ExpandLvm(ctx context.Context, volGroup string, volumeID string, size uint64) error
	CleanPath(ctx context.Context, path string) error
	Close() error
}

Connection lvm connection interface

func NewGrpcConnection

func NewGrpcConnection(address string, timeout time.Duration) (Connection, error)

NewGrpcConnection lvm connection

type LVMOptions

type LVMOptions struct {
	VolumeGroup string   `json:"volumeGroup,omitempty"`
	Name        string   `json:"name,omitempty"`
	Size        uint64   `json:"size,omitempty"`
	Tags        []string `json:"tags,omitempty"`
	Striping    bool     `json:"striping,omitempty"`
}

LVMOptions lvm options

Jump to

Keyboard shortcuts

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