headsvc

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2020 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("object header not found")

Functions

This section is empty.

Types

type Option

type Option func(*cfg)

func WithClientCache added in v0.12.1

func WithClientCache(v *cache.ClientCache) Option

func WithClientOptions added in v0.12.1

func WithClientOptions(opts ...client.Option) Option

func WithContainerSource

func WithContainerSource(v container.Source) Option

func WithKeyStorage

func WithKeyStorage(v *objutil.KeyStorage) Option

func WithLocalAddressSource

func WithLocalAddressSource(v network.LocalAddressSource) Option

func WithLocalStorage

func WithLocalStorage(v *localstore.Storage) Option

func WithLogger added in v0.12.1

func WithLogger(l *logger.Logger) Option

func WithNetworkMapSource

func WithNetworkMapSource(v netmap.Source) Option

func WithRightChildSearcher

func WithRightChildSearcher(v RelationSearcher) Option

func WithWorkerPool

func WithWorkerPool(v util.WorkerPool) Option

type Prm

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

func (*Prm) Short

func (p *Prm) Short(v bool) *Prm

func (*Prm) WithAddress

func (p *Prm) WithAddress(v *object.Address) *Prm

func (*Prm) WithCommonPrm

func (p *Prm) WithCommonPrm(v *util.CommonPrm) *Prm

type RelationHeader

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

func NewRelationHeader

func NewRelationHeader(srch RelationSearcher, svc *Service) *RelationHeader

func (*RelationHeader) HeadRelation

func (h *RelationHeader) HeadRelation(ctx context.Context, addr *objectSDK.Address, prm *objutil.CommonPrm) (*object.Object, error)

type RelationSearcher

type RelationSearcher interface {
	SearchRelation(context.Context, *objectSDK.Address, *objutil.CommonPrm) (*objectSDK.ID, error)
}

type RemoteHeadPrm

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

RemoteHeadPrm groups remote header operation parameters.

func (*RemoteHeadPrm) WithNodeAddress

func (p *RemoteHeadPrm) WithNodeAddress(v *network.Address) *RemoteHeadPrm

WithNodeAddress sets network address of the remote node.

func (*RemoteHeadPrm) WithObjectAddress

func (p *RemoteHeadPrm) WithObjectAddress(v *objectSDK.Address) *RemoteHeadPrm

WithObjectAddress sets object address.

type RemoteHeader

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

RemoteHeader represents utility for getting the object header from a remote host.

func NewRemoteHeader

func NewRemoteHeader(keyStorage *util.KeyStorage, cache *cache.ClientCache, opts ...client.Option) *RemoteHeader

NewRemoteHeader creates, initializes and returns new RemoteHeader instance.

func (*RemoteHeader) Head

func (h *RemoteHeader) Head(ctx context.Context, prm *RemoteHeadPrm) (*object.Object, error)

Head requests object header from the remote node.

type Response

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

func (*Response) Header

func (r *Response) Header() *object.Object

func (*Response) RightChild

func (r *Response) RightChild() *object.Object

type Service

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

func NewService

func NewService(opts ...Option) *Service

func (*Service) Head

func (s *Service) Head(ctx context.Context, prm *Prm) (*Response, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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