mirror of
https://github.com/restic/restic.git
synced 2025-12-03 20:51:47 +00:00
Backend: Expose connections parameter
This commit is contained in:
@@ -24,6 +24,7 @@ import (
|
||||
type Backend struct {
|
||||
accountName string
|
||||
container *storage.Container
|
||||
connections uint
|
||||
sem *backend.Semaphore
|
||||
prefix string
|
||||
listMaxItems int
|
||||
@@ -55,6 +56,7 @@ func open(cfg Config, rt http.RoundTripper) (*Backend, error) {
|
||||
be := &Backend{
|
||||
container: service.GetContainerReference(cfg.Container),
|
||||
accountName: cfg.AccountName,
|
||||
connections: cfg.Connections,
|
||||
sem: sem,
|
||||
prefix: cfg.Prefix,
|
||||
Layout: &backend.DefaultLayout{
|
||||
@@ -109,6 +111,10 @@ func (be *Backend) Join(p ...string) string {
|
||||
return path.Join(p...)
|
||||
}
|
||||
|
||||
func (be *Backend) Connections() uint {
|
||||
return be.connections
|
||||
}
|
||||
|
||||
// Location returns this backend's location (the container name).
|
||||
func (be *Backend) Location() string {
|
||||
return be.Join(be.container.Name, be.prefix)
|
||||
|
||||
Reference in New Issue
Block a user