resolver

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NNSResolver = "nns"
	DNSResolver = "dns"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BucketResolver

type BucketResolver struct {
	Name string
	// contains filtered or unexported fields
}

func NewDNSResolver

func NewDNSResolver(neoFS NeoFS, next *BucketResolver) (*BucketResolver, error)

func NewNNSResolver

func NewNNSResolver(address string, next *BucketResolver) (*BucketResolver, error)

func NewResolver

func NewResolver(order []string, cfg *Config) (*BucketResolver, error)

func (*BucketResolver) Resolve

func (r *BucketResolver) Resolve(ctx context.Context, name string) (*cid.ID, error)

func (*BucketResolver) SetResolveFunc added in v0.20.0

func (r *BucketResolver) SetResolveFunc(fn func(context.Context, string) (*cid.ID, error))

type Config

type Config struct {
	NeoFS      NeoFS
	RPCAddress string
}

type NeoFS

type NeoFS interface {
	// SystemDNS reads system DNS network parameters of the NeoFS.
	//
	// It returns exactly on non-zero value. It returns any error encountered
	// which prevented the parameter from being read.
	SystemDNS(context.Context) (string, error)
}

NeoFS represents virtual connection to the NeoFS network.

Jump to

Keyboard shortcuts

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