transport

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: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// KeyID is a filter key to object ID field.
	KeyID = "ID"

	// KeyTombstone is a filter key to tombstone header.
	KeyTombstone = "TOMBSTONE"

	// KeyStorageGroup is a filter key to storage group link.
	KeyStorageGroup = "STORAGE_GROUP"

	// KeyNoChildren is a filter key to objects w/o child links.
	KeyNoChildren = "LEAF"

	// KeyParent is a filter key to parent link.
	KeyParent = "PARENT"

	// KeyHasParent is a filter key to objects with parent link.
	KeyHasParent = "HAS_PAR"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressInfo

type AddressInfo interface {
	MetaInfo
	GetAddress() refs.Address
}

AddressInfo is an interface of the container of object request by Address.

type Connection

type Connection interface {
	manet.Conn
	Closed() bool
}

Connection is an interface of network connection.

type GetInfo

type GetInfo interface {
	AddressInfo
}

GetInfo is an interface of the container of object Get operation parameters.

type HeadInfo

type HeadInfo interface {
	GetInfo
	GetFullHeaders() bool
}

HeadInfo is an interface of the container of object Head operation parameters.

type MetaInfo

type MetaInfo interface {
	GetTTL() uint32
	GetTimeout() time.Duration
	service.SessionTokenSource
	GetRaw() bool
	Type() object.RequestType
	service.BearerTokenSource
	service.ExtendedHeadersSource
}

MetaInfo is an interface of the container of cross-operation values.

type ObjectTransport

type ObjectTransport interface {
	Transport(context.Context, ObjectTransportParams)
}

ObjectTransport is an interface of the executor of object remote operations.

type ObjectTransportParams

type ObjectTransportParams struct {
	TransportInfo MetaInfo
	TargetNode    multiaddr.Multiaddr
	ResultHandler ResultHandler
}

ObjectTransportParams groups the parameters of remote object operation.

type PutInfo

type PutInfo interface {
	MetaInfo
	GetHead() *object.Object
	Payload() io.Reader
	CopiesNumber() uint32
}

PutInfo is an interface of the container of object Put operation parameters.

type RangeHashInfo

type RangeHashInfo interface {
	AddressInfo
	GetRanges() []object.Range
	GetSalt() []byte
}

RangeHashInfo is an interface of the container of object GetRangeHash operation parameters.

type RangeInfo

type RangeInfo interface {
	AddressInfo
	GetRange() object.Range
}

RangeInfo is an interface of the container of object GetRange operation parameters.

type ResultHandler

type ResultHandler interface {
	HandleResult(context.Context, multiaddr.Multiaddr, interface{}, error)
}

ResultHandler is an interface of remote object operation's result handler.

type SearchInfo

type SearchInfo interface {
	MetaInfo
	GetCID() refs.CID
	GetQuery() []byte
}

SearchInfo is an interface of the container of object Search operation parameters.

type Transport

type Transport interface {
	Dial(context.Context, multiaddr.Multiaddr, bool) (Connection, error)
	Listen(multiaddr.Multiaddr) (manet.Listener, error)
}

Transport is an interface of network connection listener.

func New

func New(threshold int64, timeout time.Duration) Transport

New is a transport component's constructor.

Jump to

Keyboard shortcuts

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