Commit 62117b70 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 4eaaf186
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
// See COPYING file for full licensing terms. // See COPYING file for full licensing terms.
// See https://www.nexedi.com/licensing for rationale and options. // See https://www.nexedi.com/licensing for rationale and options.
// Package client provides ZODB interface for accessing NEO cluster. // Package client provides ZODB storage interface for accessing NEO cluster.
package client package client
import ( import (
...@@ -41,7 +41,7 @@ import ( ...@@ -41,7 +41,7 @@ import (
"lab.nexedi.com/kirr/neo/go/xcommon/xnet" "lab.nexedi.com/kirr/neo/go/xcommon/xnet"
) )
// Client talks to NEO cluster and exposes access to it via ZODB interfaces // Client talks to NEO cluster and exposes access to it via ZODB interfaces.
type Client struct { type Client struct {
node neo.NodeCommon node neo.NodeCommon
...@@ -73,7 +73,8 @@ func (c *Client) StorageName() string { ...@@ -73,7 +73,8 @@ func (c *Client) StorageName() string {
} }
// NewClient creates new client node. // NewClient creates new client node.
// it will connect to master @masterAddr and identify with sepcified cluster name //
// It will connect to master @masterAddr and identify with sepcified cluster name.
func NewClient(clusterName, masterAddr string, net xnet.Networker) *Client { func NewClient(clusterName, masterAddr string, net xnet.Networker) *Client {
cli := &Client{ cli := &Client{
node: neo.NodeCommon{ node: neo.NodeCommon{
......
...@@ -42,12 +42,15 @@ func RegisterStorage(scheme string, opener StorageOpener) { ...@@ -42,12 +42,15 @@ func RegisterStorage(scheme string, opener StorageOpener) {
storageRegistry[scheme] = opener storageRegistry[scheme] = opener
} }
// OpenStorage opens ZODB storage by URL // OpenStorage opens ZODB storage by URL.
//
// Only URL schemes registered to zodb package are handled. // Only URL schemes registered to zodb package are handled.
// Users should user import in storage packages they use or zodb/wks package to // Users should import in storage packages they use or zodb/wks package to
// get support work well-known storages. // get support for well-known storages.
// Storage authors should register their storages with RegisterStorage //
// Storage authors should register their storages with RegisterStorage.
// //
// TODO automatically wrap a storage with Cache.
// TODO readonly // TODO readonly
func OpenStorageURL(ctx context.Context, storageURL string) (IStorage, error) { func OpenStorageURL(ctx context.Context, storageURL string) (IStorage, error) {
// no scheme -> file:// // no scheme -> file://
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment