datasetmanager

package
v0.0.0-...-102eb4e Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatasetCheckoutServiceUnit

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

func NewDatasetCheckoutServiceUnit

func NewDatasetCheckoutServiceUnit(id string, config *DatasetCheckoutServiceUnitConfig) (*DatasetCheckoutServiceUnit, error)

We don't use in-memory maps because of the hassle of indexing it

func (*DatasetCheckoutServiceUnit) CheckoutDataset

func (d *DatasetCheckoutServiceUnit) CheckoutDataset(datasetId string, checkout *pb.DatasetCheckout) error

func (*DatasetCheckoutServiceUnit) DatasetCheckout

func (d *DatasetCheckoutServiceUnit) DatasetCheckout(datasetId string, client *pb.Client) *pb.DatasetCheckout

func (*DatasetCheckoutServiceUnit) DatasetCheckouts

func (d *DatasetCheckoutServiceUnit) DatasetCheckouts() ([]*pb.DatasetCheckout, error)

func (*DatasetCheckoutServiceUnit) DatasetIsCheckedOut

func (d *DatasetCheckoutServiceUnit) DatasetIsCheckedOut(datasetId string, client *pb.Client) (bool, error)

type DatasetCheckoutServiceUnitConfig

type DatasetCheckoutServiceUnitConfig struct {
	SQLConnectionString string
	RedisClientOptions  *redis.Options
}

type DatasetIndexerUnit

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

func NewDatasetIndexerUnit

func NewDatasetIndexerUnit(id string, config *DatasetIndexerUnitConfig) (*DatasetIndexerUnit, error)

func (*DatasetIndexerUnit) Dataset

func (d *DatasetIndexerUnit) Dataset(datasetId string) *pb.Dataset

func (*DatasetIndexerUnit) DatasetExists

func (d *DatasetIndexerUnit) DatasetExists(datasetId string) bool

func (*DatasetIndexerUnit) DatasetIdentifiers

func (d *DatasetIndexerUnit) DatasetIdentifiers() []string

func (*DatasetIndexerUnit) Datasets

func (d *DatasetIndexerUnit) Datasets() map[string]*pb.Dataset

func (*DatasetIndexerUnit) GetDatasetPolicy

func (d *DatasetIndexerUnit) GetDatasetPolicy(datasetId string) *pb.Policy

func (*DatasetIndexerUnit) InsertDataset

func (d *DatasetIndexerUnit) InsertDataset(datasetId string, dataset *pb.Dataset) error

func (*DatasetIndexerUnit) RemoveDataset

func (d *DatasetIndexerUnit) RemoveDataset(datasetId string) error

func (*DatasetIndexerUnit) SetDatasetPolicy

func (d *DatasetIndexerUnit) SetDatasetPolicy(datasetId string, policy *pb.Policy) error

type DatasetIndexerUnitConfig

type DatasetIndexerUnitConfig struct {
	SQLConnectionString string
	RedisClientOptions  *redis.Options
}

type DatasetLookupService

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

func NewDatasetLookupService

func NewDatasetLookupService(id string, config *DatasetLookupServiceConfig) (*DatasetLookupService, error)

Returns a new DatasetIndexerService, given the configuration

func (*DatasetLookupService) DatasetIdentifiers

func (d *DatasetLookupService) DatasetIdentifiers() []string

func (*DatasetLookupService) DatasetNode

func (d *DatasetLookupService) DatasetNode(datasetId string) *pb.Node

func (*DatasetLookupService) DatasetNodeExists

func (d *DatasetLookupService) DatasetNodeExists(datasetId string) bool

TODO: return errors from db interface as well

func (*DatasetLookupService) InsertDatasetNode

func (d *DatasetLookupService) InsertDatasetNode(datasetId string, node *pb.Node) error

func (*DatasetLookupService) RemoveDatasetNode

func (d *DatasetLookupService) RemoveDatasetNode(datasetId string) error

type DatasetLookupServiceConfig

type DatasetLookupServiceConfig struct {
	// The database connection string used to back the in-memory data structures.
	// If this is left empty, the in-memory data structures will not be backed by persistent storage.
	// TODO: use timeouts to flush the data structures to the db at regular intervals :))
	// TODO: configure SQL connection pools and timeouts. The timeout values must be sane
	SQLConnectionString string

	RedisClientOptions *redis.Options
}

Configuration struct for the dataset manager

Jump to

Keyboard shortcuts

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