Documentation ¶
Overview ¶
Package store provides an interface to open blob.KV instances named by string addresses or URLs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalidAddress is reported by Open when given an address that is // syntactically invalid or has no corresponding Opener. ErrInvalidAddress = errors.New("invalid address") )
Functions ¶
This section is empty.
Types ¶
type Opener ¶
An Opener opens a blob.Store instance associated with the given address. The address passed to the Opener has its dispatch tag removed. The format of the address is opaque to the registry, and the opener is responsible for checking its validity.
type Registry ¶
A Registry maintains a mapping from dispatch tags to Opener values.
func (Registry) Names ¶
Names returns a slice of the names of the storage implementations in r. The slice is sorted.
func (Registry) Open ¶
Open opens a blob.KV for the specified address of the form "tag" or "tag:value". If the address does not have this form, or if the tag does not correspond to any known implementation, Open reports ErrInvalidAddress.
On success, the caller is responsible for closing the store when it is no longer in use.