dex

package
v0.51.4 Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LookupBlockFromNetwork

type LookupBlockFromNetwork interface {
	// Directive indicates LookupBlockFromNetwork is a directive.
	directive.Directive

	// LookupBlockFromNetworkBucketId returns the associated bucket id.
	// Can be empty.
	LookupBlockFromNetworkBucketId() string
	// LookupBlockFromNetworkRef returns the desired block ref.
	LookupBlockFromNetworkRef() *block.BlockRef
}

LookupBlockFromNetwork is a directive to find a block from remote DHT.

func NewLookupBlockFromNetwork

func NewLookupBlockFromNetwork(bucketID string, ref *block.BlockRef) LookupBlockFromNetwork

NewLookupBlockFromNetwork constructs an LookupBlockFromNetwork.

type LookupBlockFromNetworkRequest

type LookupBlockFromNetworkRequest struct {

	// BucketId is the associated bucket ID with the lookup.
	BucketId string `protobuf:"bytes,1,opt,name=bucket_id,json=bucketId,proto3" json:"bucketId,omitempty"`
	// Ref is the reference.
	Ref *block.BlockRef `protobuf:"bytes,2,opt,name=ref,proto3" json:"ref,omitempty"`
	// contains filtered or unexported fields
}

LookupBlockFromNetworkRequest requests that Data-Exchange (DEX) find data.

func (*LookupBlockFromNetworkRequest) CloneMessageVT

func (*LookupBlockFromNetworkRequest) CloneVT

func (*LookupBlockFromNetworkRequest) EqualMessageVT

func (this *LookupBlockFromNetworkRequest) EqualMessageVT(thatMsg any) bool

func (*LookupBlockFromNetworkRequest) EqualVT

func (*LookupBlockFromNetworkRequest) GetBucketId

func (x *LookupBlockFromNetworkRequest) GetBucketId() string

func (*LookupBlockFromNetworkRequest) GetDebugVals

GetDebugString returns the directive arguments stringified.

func (*LookupBlockFromNetworkRequest) GetName

GetName returns the directive's type name. This is not necessarily unique, and is primarily intended for display.

func (*LookupBlockFromNetworkRequest) GetRef

func (*LookupBlockFromNetworkRequest) GetValueOptions

GetValueLookupBlockFromNetworkOptions returns options relating to value handling.

func (*LookupBlockFromNetworkRequest) IsEquivalent

func (d *LookupBlockFromNetworkRequest) IsEquivalent(other directive.Directive) bool

IsEquivalent checks if the other directive is equivalent. If two directives are equivalent, and the new directive does not superceed the old, then the new directive will be merged (de-duplicated) into the old.

func (*LookupBlockFromNetworkRequest) LookupBlockFromNetworkBucketId

func (d *LookupBlockFromNetworkRequest) LookupBlockFromNetworkBucketId() string

LookupBlockFromNetworkBucketId returns the desired bucket id. Can be empty.

func (*LookupBlockFromNetworkRequest) LookupBlockFromNetworkRef

func (d *LookupBlockFromNetworkRequest) LookupBlockFromNetworkRef() *block.BlockRef

LookupBlockFromNetworkVolumeIDRe returns the volume ID constraint. Can be empty.

func (*LookupBlockFromNetworkRequest) MarshalJSON

func (x *LookupBlockFromNetworkRequest) MarshalJSON() ([]byte, error)

MarshalJSON marshals the LookupBlockFromNetworkRequest to JSON.

func (*LookupBlockFromNetworkRequest) MarshalProtoJSON

func (x *LookupBlockFromNetworkRequest) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the LookupBlockFromNetworkRequest message to JSON.

func (*LookupBlockFromNetworkRequest) MarshalProtoText

func (x *LookupBlockFromNetworkRequest) MarshalProtoText() string

func (*LookupBlockFromNetworkRequest) MarshalToSizedBufferVT

func (m *LookupBlockFromNetworkRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*LookupBlockFromNetworkRequest) MarshalToVT

func (m *LookupBlockFromNetworkRequest) MarshalToVT(dAtA []byte) (int, error)

func (*LookupBlockFromNetworkRequest) MarshalVT

func (m *LookupBlockFromNetworkRequest) MarshalVT() (dAtA []byte, err error)

func (*LookupBlockFromNetworkRequest) ProtoMessage

func (*LookupBlockFromNetworkRequest) ProtoMessage()

func (*LookupBlockFromNetworkRequest) Reset

func (x *LookupBlockFromNetworkRequest) Reset()

func (*LookupBlockFromNetworkRequest) SizeVT

func (m *LookupBlockFromNetworkRequest) SizeVT() (n int)

func (*LookupBlockFromNetworkRequest) String

func (*LookupBlockFromNetworkRequest) Superceeds

Superceeds checks if the directive overrides another. The other directive will be canceled if superceded.

func (*LookupBlockFromNetworkRequest) UnmarshalJSON

func (x *LookupBlockFromNetworkRequest) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the LookupBlockFromNetworkRequest from JSON.

func (*LookupBlockFromNetworkRequest) UnmarshalProtoJSON

func (x *LookupBlockFromNetworkRequest) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the LookupBlockFromNetworkRequest message from JSON.

func (*LookupBlockFromNetworkRequest) UnmarshalVT

func (m *LookupBlockFromNetworkRequest) UnmarshalVT(dAtA []byte) error

func (*LookupBlockFromNetworkRequest) Validate

func (d *LookupBlockFromNetworkRequest) Validate() error

Validate validates the directive. This is a cursory validation to see if the values "look correct."

type LookupBlockFromNetworkValue

type LookupBlockFromNetworkValue interface {
	// GetError returns any error.
	GetError() error
	// GetData returns the returned data.
	// Returns nil if not found.
	GetData() []byte
}

LookupBlockFromNetworkValue is the result type for LookupBlockFromNetwork. Contains: error, data, ref, bucket id, source peer id, source volume id (?)

func NewLookupBlockFromNetworkValue

func NewLookupBlockFromNetworkValue(data []byte, err error) LookupBlockFromNetworkValue

NewLookupBlockFromNetworkValue builds a new LookupBlockFromNetworkValue.

Directories

Path Synopsis
Package dex_session provides shared block transfer session logic for DEX backends.
Package dex_session provides shared block transfer session logic for DEX backends.

Jump to

Keyboard shortcuts

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