servicestore

package
v0.2.0-beta Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2020 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadCustomEngine

func LoadCustomEngine(store *MainManagedStorage) gval.Language

LoadCustomEngine loads a custom gval.Language to extend the capabilities of the Filters.

func LoadLocationMap

func LoadLocationMap() map[string]map[string][]float64

Types

type MainManagedStorage

type MainManagedStorage struct {
	PMap      map[string]string
	PMapLock  *sync.RWMutex
	PeerData  *gomenasai.Gomenasai
	Listings  *gomenasai.Gomenasai
	StorePath string
}

MainManagedStorage holds the storage stuff

PMap is the peer mapping of the peerID to the chunk peerDocumentID

func InitializeManagedStorage

func InitializeManagedStorage(rootPath string) *MainManagedStorage

InitializeManagedStorage - Initializes and returns a MainStorage instance,

pass this around the various services, acts as like the centraliezd
storage for the listings and Peer Data

func (*MainManagedStorage) PMapSet

func (m *MainManagedStorage) PMapSet(id, val string)

func (*MainManagedStorage) SafePMapModify

func (m *MainManagedStorage) SafePMapModify(function func())

type MainStorage

type MainStorage struct {
	PeerData map[string]*models.Peer
	Listings []*models.Listing
}

MainStorage is defunct, user MainManagedStorage

func InitializeStore

func InitializeStore() *MainStorage

InitializeStore - is defunct, use InitializeManagedStorage InitializeStore - Initializes and returns a MainStorage instance,

pass this around the various services, acts as like the centraliezd
storage for the listings and Peer Data

Jump to

Keyboard shortcuts

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