das

package
v0.0.0-...-fd40de8 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Aggregate

func Aggregate(data []mongo.DASRecord, agg, key string) mongo.DASRecord

Aggregate function aggregates results for given function and key

func Bytes

func Bytes(pid string) int

Bytes gets size of records for given DAS query

func CheckData

func CheckData(pid string) bool

CheckData checks if data exists in DAS cache for given query/pid

func CheckDataReadiness

func CheckDataReadiness(pid string) bool

CheckDataReadiness checks if data exists in DAS cache for given query/pid we look-up DAS record (record=0) with status ok (merging step is done)

func Count

func Count(pid string) int

Count gets number of records for given DAS query qhash

func FormRESTUrl

func FormRESTUrl(dasquery dasql.DASQuery, dasmap mongo.DASRecord) string

FormRESTUrl forms appropriate URL from given dasquery and dasmap, the final URL contains all parameters

func FormUrlCall

func FormUrlCall(dasquery dasql.DASQuery, dasmap mongo.DASRecord) string

FormUrlCall forms appropriate URL from given dasquery and dasmap, the final URL contains all parameters

func GetData

func GetData(dasquery dasql.DASQuery, coll string, idx, limit int) (string, []mongo.DASRecord)

GetData for given pid (DAS Query qhash)

func GetTimestamp

func GetTimestamp(pid string) int64

GetTimestamp gets initial timestamp of DAS query request

func PostProcessing

func PostProcessing(dasquery dasql.DASQuery, data []mongo.DASRecord) []mongo.DASRecord

helper function to perform post-processing of DAS data, e.g. when we call site query we need to distinguish the case when to show original site

func Process

func Process(dasquery dasql.DASQuery, dmaps dasmaps.DASMaps)

Process takes care of processing given DAS query

func ProcessLogic

func ProcessLogic(dasquery dasql.DASQuery, maps []mongo.DASRecord, selectedServices []string) ([]string, []string, map[string]string, []mongo.DASRecord)

ProcessLogic represents common logic for Process API shared both in das2go and dasgoclient codebase. It figures out which services pkeys, urls and localApis to use for given dasquery, das maps and selected Services The selectedServices is only used in dasgoclient to speed up the process.

func ProcessingQueries

func ProcessingQueries() []string

ProcessingQueries returns list of DAS queries which are currently processing by the server

func RemoveExpired

func RemoveExpired(pid string)

RemoveExpired remove expired records

func TimeStamp

func TimeStamp(dasquery dasql.DASQuery) int64

TimeStamp returns list of DAS queries which are currently processing by the server

Types

type DASRecord

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

DASRecord represent basic DAS record structure

func (*DASRecord) Qhash

func (r *DASRecord) Qhash() string

Qhash returns hash of DAS record

func (*DASRecord) Services

func (r *DASRecord) Services() []string

Services returns list of services for DAS record

type DASRecords

type DASRecords []mongo.DASRecord

DASRecords holds list of DAS records

type Record

type Record map[string]interface{}

Record is a main entity DAS server operates

Jump to

Keyboard shortcuts

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