resolver

package
v0.28.2 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: AGPL-3.0 Imports: 7 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, cfg *Config) error

type Config

type Config struct {
	FrostFS    FrostFS
	RPCAddress string
}

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) (*Resolver, error)

func NewNNSResolver

func NewNNSResolver(address string) (*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))

Jump to

Keyboard shortcuts

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