Documentation ¶
Index ¶
- Variables
- type API
- type Node
- func (n *Node) CreatePinSet(ctx context.Context, name string) (PinSetID, error)
- func (n *Node) DeletePinSet(ctx context.Context, pinset PinSetID) error
- func (n *Node) GetF(ctx context.Context, mh []byte, fn func([]byte) error) error
- func (n *Node) GetPinSet(ctx context.Context, pinset PinSetID) (*PinSet, error)
- func (n *Node) MaxBlobSize() int
- func (n *Node) Pin(ctx context.Context, pinset PinSetID, mh []byte) error
- func (n *Node) Post(ctx context.Context, pinset PinSetID, data []byte) ([]byte, error)
- func (n *Node) Shutdown() error
- func (n *Node) Unpin(ctx context.Context, pinset PinSetID, mh []byte) error
- type Params
- type PinSet
- type PinSetID
- type PinSetStore
- func (s *PinSetStore) Create(ctx context.Context, name string) (PinSetID, error)
- func (s *PinSetStore) Delete(ctx context.Context, id PinSetID) error
- func (s *PinSetStore) Exists(ctx context.Context, id blobs.ID) (bool, error)
- func (s *PinSetStore) Get(ctx context.Context, id PinSetID) (*PinSet, error)
- func (s *PinSetStore) List(ctx context.Context, prefix []byte, ids []blobs.ID) (n int, err error)
- func (s *PinSetStore) Pin(ctx context.Context, psID PinSetID, id blobs.ID) error
- func (s *PinSetStore) Unpin(ctx context.Context, psID PinSetID, id blobs.ID) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrPinSetExists = errors.New("pinset exists") ErrPinSetNotFound = errors.New("pinset not found") )
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface { // PinSets CreatePinSet(ctx context.Context, name string) (PinSetID, error) DeletePinSet(ctx context.Context, pinset PinSetID) error GetPinSet(ctx context.Context, pinset PinSetID) (*PinSet, error) Pin(ctx context.Context, pinset PinSetID, mh []byte) error Unpin(ctx context.Context, pinset PinSetID, mh []byte) error // Blobs Post(ctx context.Context, pinset PinSetID, data []byte) ([]byte, error) GetF(ctx context.Context, mh []byte, f func([]byte) error) error MaxBlobSize() int }
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
func (*Node) CreatePinSet ¶
func (*Node) MaxBlobSize ¶
Click to show internal directories.
Click to hide internal directories.