master

package
v0.0.0-...-9a1563a Latest Latest
Warning

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

Go to latest
Published: May 29, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyConfig = errors.New("empty config")

Functions

This section is empty.

Types

type AllocDisksArgs

type AllocDisksArgs struct {
}

type Config

type Config struct {
	Host      string `yaml:"host"`
	TimeoutMS int64  `yaml:"timeout_ms"`
}

type ListDisksArgs

type ListDisksArgs struct {
	Host  string          `in:"query=host"`
	State proto.DiskState `in:"query=state"`
}

type Master

type Master struct {
	Host string
	*http.Client
}

func New

func New(cfg *Config) (*Master, error)

func (*Master) AllocDiskLabel

func (m *Master) AllocDiskLabel() (*proto.DiskLabel, error)

func (*Master) AllocDisks

func (m *Master) AllocDisks()

func (*Master) AllocStripes

func (m *Master) AllocStripes() ([]*proto.Stripe, error)

func (*Master) GetDisk

func (m *Master) GetDisk(diskID uint32) (*proto.Disk, error)

func (*Master) ListDisks

func (m *Master) ListDisks(args *ListDisksArgs) ([]*proto.Disk, error)

func (*Master) RegisterDisks

func (m *Master) RegisterDisks(disks []*proto.Disk) ([]*proto.Disk, error)

Jump to

Keyboard shortcuts

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