Add docs about how to connect to swiftfs

This commit is contained in:
kolaente 2020-09-26 13:03:26 +02:00
parent 9be4eec9c9
commit 5b730cb442
No known key found for this signature in database
GPG Key ID: F40E70337AB24C9B
1 changed files with 18 additions and 0 deletions

View File

@ -270,6 +270,24 @@ Some known limitations of the existing implementation:
* No Chtimes support - Could be simulated with attributes (gcs a/m-times are set implicitly) but that's is left for another version. * No Chtimes support - Could be simulated with attributes (gcs a/m-times are set implicitly) but that's is left for another version.
* Not thread safe - Also assumes all file operations are done through the same instance of the GcsFs. File operations between different GcsFs instances are not guaranteed to be consistent. * Not thread safe - Also assumes all file operations are done through the same instance of the GcsFs. File operations between different GcsFs instances are not guaranteed to be consistent.
### SwiftFs
Afero has experimental support for openstack swift storage as a backend.
To use it, you need a `username`, `api key`, `auth url`, `domain` and `container name` for an openstack switch store:
```go
fs, err = NewSwiftFs(&swift.Connection{
UserName: "swift_username",
ApiKey: "swift_apikey",
AuthUrl: "swift_authurl",
Domain: "swift_domain",
}, "containername")
if err != nil {
fmt.Println("Error connecting to swift storage")
}
```
After creating a connection, you can use the backend in the same way as usual.
## Filtering Backends ## Filtering Backends