distributor

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2016 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoPeersBlock = errors.New("distributor: no peers available for a block")
)

Functions

func ListenReplication

func ListenReplication(s *torus.Server, addr *url.URL) error

ListenReplication opens the internal networking port and connects to the cluster

func OpenReplication

func OpenReplication(s *torus.Server) error

OpenReplication connects to the cluster without opening the internal networking.

Types

type Distributor

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

func (*Distributor) Block

func (d *Distributor) Block(ctx context.Context, ref torus.BlockRef) ([]byte, error)

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 (d *Distributor) DeleteBlock(ctx context.Context, i torus.BlockRef) error

func (*Distributor) Flush

func (d *Distributor) Flush() error

func (*Distributor) GetBlock

func (d *Distributor) GetBlock(ctx context.Context, i torus.BlockRef) ([]byte, error)

func (*Distributor) HasBlock

func (d *Distributor) HasBlock(ctx context.Context, i torus.BlockRef) (bool, error)

func (*Distributor) Kind

func (d *Distributor) Kind() string

func (*Distributor) NumBlocks

func (d *Distributor) NumBlocks() uint64

func (*Distributor) PutBlock

func (d *Distributor) PutBlock(ctx context.Context, ref torus.BlockRef, data []byte) error

func (*Distributor) RebalanceCheck

func (d *Distributor) RebalanceCheck(ctx context.Context, refs []torus.BlockRef) ([]bool, error)

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

func (d *Distributor) WriteBlock(ctx context.Context, i torus.BlockRef, data []byte) error

func (*Distributor) WriteBuf added in v0.1.0

func (d *Distributor) WriteBuf(ctx context.Context, i torus.BlockRef) ([]byte, error)

Directories

Path Synopsis
tdp

Jump to

Keyboard shortcuts

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