Documentation ¶
Overview ¶
distributor is a complex implementation of a Torus storage interface, that understands rebalancing it's underlying storage and fetching data from peers, as necessary.
Index ¶
- Variables
- func ListenReplication(s *torus.Server, addr *url.URL) error
- func OpenReplication(s *torus.Server) error
- type Distributor
- func (d *Distributor) Block(ctx context.Context, ref torus.BlockRef) ([]byte, error)
- func (d *Distributor) BlockIterator() torus.BlockIterator
- func (d *Distributor) BlockSize() uint64
- func (d *Distributor) Close() error
- func (d *Distributor) DeleteBlock(ctx context.Context, i torus.BlockRef) error
- func (d *Distributor) Flush() error
- func (d *Distributor) GetBlock(ctx context.Context, i torus.BlockRef) ([]byte, error)
- func (d *Distributor) HasBlock(ctx context.Context, i torus.BlockRef) (bool, error)
- func (d *Distributor) Kind() string
- func (d *Distributor) NumBlocks() uint64
- func (d *Distributor) PutBlock(ctx context.Context, ref torus.BlockRef, data []byte) error
- func (d *Distributor) RebalanceCheck(ctx context.Context, refs []torus.BlockRef) ([]bool, error)
- func (d *Distributor) Ring() torus.Ring
- func (d *Distributor) UUID() string
- func (d *Distributor) UsedBlocks() uint64
- func (d *Distributor) WriteBlock(ctx context.Context, i torus.BlockRef, data []byte) error
- func (d *Distributor) WriteBuf(ctx context.Context, i torus.BlockRef) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoPeersBlock = errors.New("distributor: no peers available for a block")
)
Functions ¶
func ListenReplication ¶
ListenReplication opens the internal networking port and connects to the cluster
func OpenReplication ¶
OpenReplication connects to the cluster without opening the internal networking.
Types ¶
type Distributor ¶
type Distributor struct {
// contains filtered or unexported fields
}
func (*Distributor) BlockIterator ¶
func (d *Distributor) BlockIterator() torus.BlockIterator
func (*Distributor) BlockSize ¶
func (d *Distributor) BlockSize() uint64
func (*Distributor) Close ¶
func (d *Distributor) Close() error
func (*Distributor) DeleteBlock ¶
func (*Distributor) Flush ¶
func (d *Distributor) Flush() error
func (*Distributor) Kind ¶
func (d *Distributor) Kind() string
func (*Distributor) NumBlocks ¶
func (d *Distributor) NumBlocks() uint64
func (*Distributor) RebalanceCheck ¶
func (*Distributor) Ring ¶
func (d *Distributor) Ring() torus.Ring
func (*Distributor) UUID ¶
func (d *Distributor) UUID() string
func (*Distributor) UsedBlocks ¶
func (d *Distributor) UsedBlocks() uint64
func (*Distributor) WriteBlock ¶
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
protocols is the metapackage for the RPC protocols for how Torus' storage layer communicates with other storage servers.
|
protocols is the metapackage for the RPC protocols for how Torus' storage layer communicates with other storage servers. |
rebalance provides the implementation of the rebalancer, which continually checks the data stored on a host, knows where data should live, and moves it to the appropriate servers.
|
rebalance provides the implementation of the rebalancer, which continually checks the data stored on a host, knows where data should live, and moves it to the appropriate servers. |
Click to show internal directories.
Click to hide internal directories.