storage

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2020 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLocalHeadIntegrityVerifier

func NewLocalHeadIntegrityVerifier() (verifier.Verifier, error)

NewLocalHeadIntegrityVerifier constructs local object head verifier and returns objutil.Verifier interface.

func NewLocalIntegrityVerifier

func NewLocalIntegrityVerifier() (verifier.Verifier, error)

NewLocalIntegrityVerifier constructs local object verifier and returns objutil.Verifier interface.

func NewObjectLocator

func NewObjectLocator(p LocatorParams) (replication.ObjectLocator, error)

NewObjectLocator constructs replication.ObjectLocator from SelectiveContainerExecutor.

func NewObjectValidator

func NewObjectValidator(p *ObjectValidatorParams) (replication.ObjectVerifier, error)

NewObjectValidator constructs universal replication.ObjectVerifier.

func NewPayloadVerifier

func NewPayloadVerifier() verifier.Verifier

NewPayloadVerifier constructs object payload verifier and returns objutil.Verifier.

Types

type AddressStore

type AddressStore interface {
	SelfAddr() (multiaddr.Multiaddr, error)
}

AddressStore is an interface of the container of local Multiaddr.

type AddressStoreComponent

type AddressStoreComponent interface {
	AddressStore
	NodePublicKeyReceiver
}

AddressStoreComponent is an interface of encapsulated AddressStore and NodePublicKeyReceiver pair.

func NewAddressStore

func NewAddressStore(ps peers.Store, log *zap.Logger) (AddressStoreComponent, error)

NewAddressStore wraps peer store and returns AddressStoreComponent.

type LocatorParams

type LocatorParams struct {
	SelectiveContainerExecutor transport.SelectiveContainerExecutor
	Logger                     *zap.Logger
}

LocatorParams groups the parameters of ObjectLocator constructor.

type NodePublicKeyReceiver

type NodePublicKeyReceiver interface {
	PublicKey(multiaddr.Multiaddr) *ecdsa.PublicKey
}

NodePublicKeyReceiver is an interface of Multiaddr to PublicKey converter.

type ObjectStorage

type ObjectStorage interface {
	replication.ObjectReceptacle
	replication.ObjectSource
}

ObjectStorage is an interface of encapsulated ObjectReceptacle and ObjectSource pair.

func NewObjectStorage

func NewObjectStorage(p ObjectStorageParams) (ObjectStorage, error)

NewObjectStorage encapsulates Localstore and SelectiveContainerExecutor and returns ObjectStorage interface.

type ObjectStorageParams

type ObjectStorageParams struct {
	Localstore                 localstore.Localstore
	SelectiveContainerExecutor transport.SelectiveContainerExecutor
	Logger                     *zap.Logger
}

ObjectStorageParams groups the parameters of ObjectStorage constructor.

type ObjectValidatorParams

type ObjectValidatorParams struct {
	AddressStore               AddressStore
	Localstore                 localstore.Localstore
	SelectiveContainerExecutor transport.SelectiveContainerExecutor
	Logger                     *zap.Logger

	Salitor             Salitor
	SaltSize            int
	MaxPayloadRangeSize uint64
	PayloadRangeCount   int

	Verifier verifier.Verifier
}

ObjectValidatorParams groups th

type Salitor

type Salitor func(data, salt []byte) []byte

Salitor is a salting data function.

Jump to

Keyboard shortcuts

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