dh

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReplicationEncoder

func NewReplicationEncoder([]cluster.Slave)

Types

type DataHandler

type DataHandler interface {
	//AssignData assign data to slave list, return a map with single slave address as key and data as value
	AssignData(data []byte, slaveAddrList []string) (map[string][]byte, error)
}

type EcEncoder

type EcEncoder struct {
	reedsolomon.Encoder
}

func NewEcEncoder

func NewEcEncoder(dataNum int, parityNum int) (EcEncoder, error)

func (*EcEncoder) AssignData

func (ec *EcEncoder) AssignData(data []byte, slaveAddrList []cluster.Slave) (map[string][]byte, error)

type ReplicationEncoder

type ReplicationEncoder struct {
}

func (*ReplicationEncoder) AssignData

func (r *ReplicationEncoder) AssignData(data []byte, slaveAddrList []string) (map[string][]byte, error)

Jump to

Keyboard shortcuts

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