Documentation ¶
Overview ¶
Package client implements a client for Oasis storage nodes. The client obtains storage info by following scheduler committees.
Index ¶
- Constants
- Variables
- func New(ctx context.Context, namespace common.Namespace, ident *identity.Identity, ...) (api.Backend, error)
- func NewForCommittee(ctx context.Context, namespace common.Namespace, ident *identity.Identity, ...) (api.Backend, error)
- func NewStatic(ctx context.Context, namespace common.Namespace, ident *identity.Identity, ...) (api.Backend, error)
Constants ¶
View Source
const BackendName = "client"
BackendName is the name of this implementation.
Variables ¶
View Source
var ErrStorageNotAvailable = errors.New("storage/client: storage not available")
ErrStorageNotAvailable is the error returned when no storage node is available.
Functions ¶
func New ¶
func New( ctx context.Context, namespace common.Namespace, ident *identity.Identity, schedulerBackend scheduler.Backend, registryBackend registry.Backend, runtime registry.RuntimeDescriptorProvider, extraWatcherOpts ...committee.WatcherOption, ) (api.Backend, error)
New creates a new storage client that automatically follows a given runtime's storage committee.
func NewForCommittee ¶ added in v0.2010.0
func NewForCommittee( ctx context.Context, namespace common.Namespace, ident *identity.Identity, nodes committee.NodeDescriptorLookup, runtime registry.RuntimeDescriptorProvider, ) (api.Backend, error)
NewForCommittee creates a new storage client that tracks the specified committee.
func NewStatic ¶
func NewStatic( ctx context.Context, namespace common.Namespace, ident *identity.Identity, registryBackend registry.Backend, nodeID signature.PublicKey, ) (api.Backend, error)
NewStatic creates a new storage client that only follows a specific storage node. This is mostly useful for tests.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.