23 lines
552 B
Go
23 lines
552 B
Go
package registry
|
|
|
|
import (
|
|
"net/url"
|
|
|
|
"forge.cadoles.com/arcad/edge/pkg/storage"
|
|
"forge.cadoles.com/arcad/edge/pkg/storage/registry"
|
|
"forge.cadoles.com/arcad/edge/pkg/storage/rpc/client"
|
|
)
|
|
|
|
func init() {
|
|
registry.AddDocumentStoreFactory("rpc", documentStoreFactory)
|
|
registry.AddBlobStoreFactory("rpc", blobStoreFactory)
|
|
}
|
|
|
|
func documentStoreFactory(url *url.URL) (storage.DocumentStore, error) {
|
|
return client.NewDocumentStore(url), nil
|
|
}
|
|
|
|
func blobStoreFactory(url *url.URL) (storage.BlobStore, error) {
|
|
return client.NewBlobStore(url), nil
|
|
}
|