Documentation ¶
Index ¶
- func Ring(conf *akubraconfig.Config, policy string) (sharding.ShardsRingAPI, string, error)
- type BackendResolver
- type ConfigBasedBackendResolver
- func (bs *ConfigBasedBackendResolver) GetShardsRing(domain string) (sharding.ShardsRingAPI, error)
- func (bs *ConfigBasedBackendResolver) ResolveClientForBackend(backendName, hostURL, access string) (*s3.S3, error)
- func (bs *ConfigBasedBackendResolver) ResolveClientForHost(hostURL, key, access string) (*s3.S3, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Ring ¶
func Ring(conf *akubraconfig.Config, policy string) (sharding.ShardsRingAPI, string, error)
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
Click to show internal directories.
Click to hide internal directories.