controller

package
v0.8.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoBackend = errors.New("No backend available")
)
View Source
var (
	Frontends = map[string]types.Frontend{}
)

Functions

This section is empty.

Types

type BackendError

type BackendError struct {
	Errors map[string]error
}

func (*BackendError) Error

func (b *BackendError) Error() string

type Controller

type Controller struct {
	sync.RWMutex
	Name string

	GRPCAddress string
	GRPCServer  *grpc.Server

	ShutdownWG sync.WaitGroup
	// contains filtered or unexported fields
}

func NewController

func NewController(name string, factory types.BackendFactory, frontend types.Frontend, isUpgrade bool) *Controller

func (*Controller) AddReplica

func (c *Controller) AddReplica(address string) error

func (*Controller) BackupReplicaMappingCreate

func (c *Controller) BackupReplicaMappingCreate(id string, replicaAddress string) error

func (*Controller) BackupReplicaMappingDelete

func (c *Controller) BackupReplicaMappingDelete(id string) error

func (*Controller) BackupReplicaMappingGet

func (c *Controller) BackupReplicaMappingGet() map[string]string

func (*Controller) Close

func (c *Controller) Close() error

func (*Controller) Endpoint

func (c *Controller) Endpoint() string

func (*Controller) Expand

func (c *Controller) Expand(size int64) error

func (*Controller) Frontend

func (c *Controller) Frontend() string

func (*Controller) FrontendState

func (c *Controller) FrontendState() string

func (*Controller) GetLatestMetics

func (c *Controller) GetLatestMetics() *types.Metrics

func (*Controller) IsExpanding

func (c *Controller) IsExpanding() bool

func (*Controller) ListReplicas

func (c *Controller) ListReplicas() []types.Replica

func (*Controller) PrepareRebuildReplica

func (c *Controller) PrepareRebuildReplica(address string) ([]types.SyncFileInfo, error)

func (*Controller) ReadAt

func (c *Controller) ReadAt(b []byte, off int64) (int, error)

func (*Controller) RemoveReplica

func (c *Controller) RemoveReplica(address string) error

func (*Controller) Revert

func (c *Controller) Revert(name string) error

func (*Controller) SetReplicaMode

func (c *Controller) SetReplicaMode(address string, mode types.Mode) error

func (*Controller) Shutdown

func (c *Controller) Shutdown() error

func (*Controller) ShutdownFrontend

func (c *Controller) ShutdownFrontend() error

func (*Controller) Size

func (c *Controller) Size() int64

func (*Controller) Snapshot

func (c *Controller) Snapshot(name string, labels map[string]string) (string, error)

func (*Controller) Start

func (c *Controller) Start(addresses ...string) error

func (*Controller) StartFrontend

func (c *Controller) StartFrontend(frontend string) error

func (*Controller) StartGRPCServer

func (c *Controller) StartGRPCServer() error

func (*Controller) VerifyRebuildReplica

func (c *Controller) VerifyRebuildReplica(address string) error

func (*Controller) WaitForShutdown

func (c *Controller) WaitForShutdown() error

func (*Controller) WriteAt

func (c *Controller) WriteAt(b []byte, off int64) (int, error)

type MultiWriterAt

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

func (*MultiWriterAt) WriteAt

func (m *MultiWriterAt) WriteAt(p []byte, off int64) (n int, err error)

type MultiWriterError

type MultiWriterError struct {
	Writers []io.WriterAt
	Errors  []error
}

func (*MultiWriterError) Error

func (m *MultiWriterError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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