objio

package
v0.10.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address = refs.Address

Address is a type alias of Address from refs package of neofs-api-go.

type CharybdisParams

type CharybdisParams struct {
	Addr        Address
	ChildLister ChildLister

	ReadySelection []RangeDescriptor
}

CharybdisParams groups the parameters of Charybdis chopper.

type ChildLister

type ChildLister interface {
	List(ctx context.Context, parent Address) ([]RangeDescriptor, error)
}

ChildLister is an interface of object children info storage.

type ChopperParams

type ChopperParams struct {
	RelativeReceiver RelativeReceiver
	Addr             Address
}

ChopperParams groups the parameters of Scylla chopper.

type ChopperTable

type ChopperTable interface {
	PutChopper(addr Address, chopper RangeChopper) error
	GetChopper(addr Address, rc RCType) (RangeChopper, error)
}

ChopperTable is an interface of RangeChopper storage.

func NewChopperTable

func NewChopperTable() ChopperTable

NewChopperTable is a RangeChopper storage constructor.

type RCType

type RCType int

RCType is an enumeration of object payload range chopper types.

const (
	// RCScylla is an RCType of payload range post-pouncing chopper.
	RCScylla RCType = iota

	// RCCharybdis is an RCType of payload range pre-pouncing chopper.
	RCCharybdis
)

type RangeChopper

type RangeChopper interface {
	GetType() RCType
	GetAddress() Address
	Closed() bool
	Chop(ctx context.Context, length, offset int64, fromStart bool) ([]RangeDescriptor, error)
}

RangeChopper is an interface of the chooper of object payload range.

func NewCharybdis

func NewCharybdis(p *CharybdisParams) (RangeChopper, error)

NewCharybdis constructs object payload range that pre-collects all parts of the range.

func NewScylla

func NewScylla(p *ChopperParams) (RangeChopper, error)

NewScylla constructs object payload range chopper that collects parts of a range on the go.

type RangeDescriptor

type RangeDescriptor struct {
	Size   int64
	Offset int64
	Addr   Address

	LeftBound  bool
	RightBound bool
}

RangeDescriptor groups the information about object payload range.

type RelativeReceiver

type RelativeReceiver interface {
	Base(ctx context.Context, addr Address) (RangeDescriptor, error)
	Neighbor(ctx context.Context, addr Address, left bool) (RangeDescriptor, error)
}

RelativeReceiver is an interface of object relations controller.

Jump to

Keyboard shortcuts

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