auth

package
v0.0.0-...-d88ec87 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ring

Ring initializes shards rings

Types

type BackendResolver

type BackendResolver interface {
	//ResolveClient returns a client that should be used for operations for the specified key and host
	ResolveClientForHost(hostURL, key, access string) (*s3.S3, error)
	//ResolveClient returns a client that should be used for operations for the specified backend
	ResolveClientForBackend(backendName, hostURL, access string) (*s3.S3, error)
	//GetShardsRing resolves a shard ring for a given domain
	GetShardsRing(domain string) (sharding.ShardsRingAPI, error)
}

BackendResolver resolves backends based on urls

type ConfigBasedBackendResolver

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

ConfigBasedBackendResolver points replicas where object should be stored

func NewConfigBasedBackendResolver

func NewConfigBasedBackendResolver(akubraConfig *akubraconfig.Config, brimConfig *config.BrimConf) *ConfigBasedBackendResolver

NewConfigBasedBackendResolver constructs new BackendSolver

func (*ConfigBasedBackendResolver) GetShardsRing

func (bs *ConfigBasedBackendResolver) GetShardsRing(domain string) (sharding.ShardsRingAPI, error)

GetShardsRing finds a ShardsRing for a given domain

func (*ConfigBasedBackendResolver) ResolveClientForBackend

func (bs *ConfigBasedBackendResolver) ResolveClientForBackend(backendName, hostURL, access string) (*s3.S3, error)

ResolveClient returns proper s3 client to perform operations on object

func (*ConfigBasedBackendResolver) ResolveClientForHost

func (bs *ConfigBasedBackendResolver) ResolveClientForHost(hostURL, key, access string) (*s3.S3, error)

ResolveClient returns proper s3 client to perform operations on object

Jump to

Keyboard shortcuts

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