Documentation ¶
Overview ¶
Package memory provides an in-memory basic implementation of an Endpoint, with nodes stored in a map.
Index ¶
- type DBEvent
- type MemDB
- func (db *MemDB) AddIgnore(s string)
- func (db *MemDB) CreateNode(ctx context.Context, node tree.N, updateIfExists bool) (err error)
- func (db *MemDB) DeleteNode(ctx context.Context, path string) (err error)
- func (db *MemDB) FromJSON(name string) error
- func (db *MemDB) GetEndpointInfo() model.EndpointInfo
- func (db *MemDB) LoadNode(ctx context.Context, path string, extendedStats ...bool) (node tree.N, err error)
- func (db *MemDB) MoveNode(ctx context.Context, oldPath string, newPath string) (err error)
- func (db *MemDB) RegisterEventChannel(out chan DBEvent)
- func (db *MemDB) SetTestPathURI(s string)
- func (db *MemDB) Stats() string
- func (db *MemDB) String() string
- func (db *MemDB) ToJSON(name string) error
- func (db *MemDB) ToJSONBytes() ([]byte, error)
- func (db *MemDB) Walk(ctx context.Context, walknFc model.WalkNodesFunc, root string, recursive bool) (err error)
- func (db *MemDB) Watch(recursivePath string) (*model.WatchObject, error)
- type MemDBWithCacheTest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemDB ¶
type MemDB struct {
// contains filtered or unexported fields
}
func (*MemDB) CreateNode ¶
func (*MemDB) DeleteNode ¶
func (*MemDB) GetEndpointInfo ¶
func (db *MemDB) GetEndpointInfo() model.EndpointInfo
func (*MemDB) RegisterEventChannel ¶
func (*MemDB) SetTestPathURI ¶
func (*MemDB) ToJSONBytes ¶
ToJSONBytes marshal contents to JSON
type MemDBWithCacheTest ¶
type MemDBWithCacheTest struct {
MemDB
}
MemDBWithCacheTest provides a structure for testing CachedBranchProvider related functions
func NewMemDBWithCacheTest ¶
func NewMemDBWithCacheTest() *MemDBWithCacheTest
NewMemDBWithCacheTest creates a new MemDB implementing CachedBranchProvider interface
func (*MemDBWithCacheTest) GetCachedBranches ¶
func (m *MemDBWithCacheTest) GetCachedBranches(ctx context.Context, roots ...string) (model.PathSyncSource, error)
GetCachedBranches loads branch in memory
Click to show internal directories.
Click to hide internal directories.