resolver

package
v0.29.0-rc.6 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

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

Variables

View Source
var ErrNoResolvers = errors.New("no resolvers")

ErrNoResolvers returns when trying to resolve container without any resolver.

Functions

This section is empty.

Types

type BucketResolver

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

func NewBucketResolver

func NewBucketResolver(resolverNames []string, cfg *Config) (*BucketResolver, error)

func (*BucketResolver) Resolve

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

func (*BucketResolver) UpdateResolvers

func (r *BucketResolver) UpdateResolvers(resolverNames []string) error

type Config

type Config struct {
	FrostFS    FrostFS
	RPCAddress string
	Settings   Settings
}

type FrostFS

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

FrostFS represents virtual connection to the FrostFS network.

type Resolver

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

func NewDNSResolver

func NewDNSResolver(frostFS FrostFS, settings Settings) (*Resolver, error)

func NewNNSResolver

func NewNNSResolver(address string, settings Settings) (*Resolver, error)

func (*Resolver) Resolve

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

func (*Resolver) SetResolveFunc

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

type Settings added in v0.29.0

type Settings interface {
	FormContainerZone(ns string) (zone string, isDefault bool)
}

Jump to

Keyboard shortcuts

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