data

package
v0.0.0-...-3d8c618 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2020 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	// contains filtered or unexported fields
}

func NewConnection

func NewConnection(connectionString string) (*Connection, error)

type Metadata

type Metadata interface {
	Lock(folderPaths []string, folderHandler func(folders []*common.Folder) error) error
	LockTree(folderPath string, includeItself bool, reverseSort bool, folderHandler func(folders []*common.Folder) error) error
	Save(folderPaths []string, saveHandler func(folders map[string]*common.Folder) error) error
}

func NewMetadata

func NewMetadata(mutex Mutex, conn *Connection, database string) (Metadata, error)

type Mutex

type Mutex interface {
	Lock(string)
	UnLock(string)
	Wait(string)
}

func NewMutex

func NewMutex(client MutexClient) Mutex

type MutexClient

type MutexClient interface {
	Get(key string) *redis.StringCmd
	Set(key string, value interface{}, expiration time.Duration) *redis.StatusCmd
	Del(keys ...string) *redis.IntCmd
}

func NewMutexClusterClient

func NewMutexClusterClient(addresses []string, password string) (MutexClient, error)

func NewMutexStandaloneClient

func NewMutexStandaloneClient(address string, password string) (MutexClient, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL