services

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

View Source
var FrontendURL string

FrontendURL represents DAS frontend URL

View Source
var RucioURL string

RucioURL represents Rucio URL

View Source
var UrlMap map[string]string

Functions

func AdjustRecords

func AdjustRecords(dasquery dasql.DASQuery, system, api string, records []mongo.DASRecord, expire int, pkeys []string) []mongo.DASRecord

AdjustRecords adjusts DAS record and add (if necessary) leading key from DAS query

func CRICUnmarshal

func CRICUnmarshal(api string, data []byte) []mongo.DASRecord

CRICUnmarshal unmarshals CRIC data stream and return DAS records based on api

func CondDBUnmarshal

func CondDBUnmarshal(api string, data []byte) []mongo.DASRecord

CondDBUnmarshal unmarshals CondDB data stream and return DAS records based on api

func CreateDASErrorRecord

func CreateDASErrorRecord(dasquery dasql.DASQuery, pkeys []string) mongo.DASRecord

CreateDASErrorRecord creates DAS record for DAS cache

func CreateDASRecord

func CreateDASRecord(dasquery dasql.DASQuery, srvs, pkeys []string) mongo.DASRecord

CreateDASRecord creates DAS record for DAS cache

func CricUrl

func CricUrl(api string) string

CricUrl returns Cric URL

func DASHeader

func DASHeader() mongo.DASRecord

DASHeader represents DAS Header

func DASLocalAPIs

func DASLocalAPIs() []string

DASLocalAPIs contains list of __ONLY__ exceptional apis due to mistake in DAS maps

func DBSUnmarshal

func DBSUnmarshal(api string, data []byte) []mongo.DASRecord

DBSUnmarshal unmarshals DBS data stream and return DAS records based on api

func DBSUrl

func DBSUrl(inst string) string

DBSUrl returns DBS URL

func DashboardUnmarshal

func DashboardUnmarshal(api string, data []byte) []mongo.DASRecord

DashboardUnmarshal unmarshals Dashboard data stream and return DAS records based on api

func GetDASRecord

func GetDASRecord(dasquery dasql.DASQuery) mongo.DASRecord

GetDASRecord gets DAS record from das cache

func GetExpire

func GetExpire(rec mongo.DASRecord) int64

GetExpire helper function to get expire value from DAS/data record

func GetMinExpire

func GetMinExpire(dasquery dasql.DASQuery) int64

GetMinExpire gets DAS min expire timestamp out of DAS record

func LocalAPIMap

func LocalAPIMap() map[string]string

LocalAPIMap contains a map of local APIs and their associative functions

func McMUnmarshal

func McMUnmarshal(api string, data []byte) []mongo.DASRecord

McMUnmarshal unmarshals McM data stream and return DAS records based on api

func MergeDASRecords

func MergeDASRecords(dasquery dasql.DASQuery) ([]mongo.DASRecord, int64)

MergeDASRecords merges DAS data records

func OrderByRunLumis

func OrderByRunLumis(records []mongo.DASRecord) []mongo.DASRecord

OrderByRunLumis helper function to sort records by run and then merge lumis within a run

func PhedexUnmarshal

func PhedexUnmarshal(api string, data []byte) []mongo.DASRecord

PhedexUnmarshal unmarshals Phedex data stream and return DAS records based on api

func PhedexUrl

func PhedexUrl() string

PhedexUrl returns Phedex URL

func ReqMgrUnmarshal

func ReqMgrUnmarshal(api string, data []byte) []mongo.DASRecord

ReqMgrUnmarshal unmarshals ReqMgr data stream and return DAS records based on api

func RucioUnmarshal

func RucioUnmarshal(dasquery dasql.DASQuery, api string, data []byte) []mongo.DASRecord

RucioUnmarshal unmarshals Rucio data stream and return DAS records based on api

func RucioUrl

func RucioUrl() string

RucioUrl returns Rucio url

func RunRegistryUnmarshal

func RunRegistryUnmarshal(api string, data []byte) []mongo.DASRecord

RunRegistryUnmarshal unmarshals RunRegistry data stream and return DAS records based on api

func SiteDBUnmarshal

func SiteDBUnmarshal(api string, data []byte) []mongo.DASRecord

SiteDBUnmarshal unmarshals SiteDB data stream and return DAS records based on api

func SitedbUrl

func SitedbUrl() string

SitedbUrl returns Sitedb URL

func Unmarshal

func Unmarshal(dasquery dasql.DASQuery, system, api string, r utils.ResponseType, notations []mongo.DASRecord, pkeys []string) []mongo.DASRecord

Unmarshal generic function to unmarshal DAS record for given system/api/data/notations

func UpdateDASRecord

func UpdateDASRecord(qhash string, dasrecord mongo.DASRecord)

UpdateDASRecord updates DAS record in das cache

func UpdateExpire

func UpdateExpire(qhash string, records []mongo.DASRecord, dasexpire int64) []mongo.DASRecord

UpdateExpire helper function to fix all DAS cache record expire timestamps

Types

type Block

type Block struct {
	Name     string
	Replicas []Replica
	Files    []string
}

Block Rucio data structure

type LocalAPIs

type LocalAPIs struct{}

LocalAPIs structure to hold information about local APIs

func (LocalAPIs) BlockRunLumi4Dataset

func (LocalAPIs) BlockRunLumi4Dataset(dasquery dasql.DASQuery) []mongo.DASRecord

BlockRunLumi4Dataset finds run,lumi for given dataset

func (LocalAPIs) Blocks4TierDates

func (LocalAPIs) Blocks4TierDates(dasquery dasql.DASQuery) []mongo.DASRecord

Blocks4TierDates finds blocks for given tier and dates

func (LocalAPIs) Child4SiteReleaseDataset

func (LocalAPIs) Child4SiteReleaseDataset(dasquery dasql.DASQuery) []mongo.DASRecord

Child4SiteReleaseDataset returns child dataset for site, release and dataset

func (LocalAPIs) Configs

func (LocalAPIs) Configs(dasquery dasql.DASQuery) []mongo.DASRecord

Configs reqmgr APIs to lookup configs for given dataset The logic: we look-up ReqMgr ids for given dataset and scan them if id has length 32 we use configFile URL, otherwise we look-up record in couchdb and fetch ConfigIDs to construct configFile URL

func (LocalAPIs) CricGroupResponsibilities

func (LocalAPIs) CricGroupResponsibilities(dasquery dasql.DASQuery) []mongo.DASRecord

CricGroupResponsibilities return group responsibilities

func (LocalAPIs) CricGroups

func (LocalAPIs) CricGroups(dasquery dasql.DASQuery) []mongo.DASRecord

CricGroups local API returns group names

func (LocalAPIs) CricPeopleEmail

func (LocalAPIs) CricPeopleEmail(dasquery dasql.DASQuery) []mongo.DASRecord

CricPeopleEmail returns CRIC people via email

func (LocalAPIs) CricPeopleName

func (LocalAPIs) CricPeopleName(dasquery dasql.DASQuery) []mongo.DASRecord

CricPeopleName returns CRIC people via names

func (LocalAPIs) CricRoles

func (LocalAPIs) CricRoles(dasquery dasql.DASQuery) []mongo.DASRecord

CricRoles returns CRIC roles

func (LocalAPIs) CricSiteNames

func (LocalAPIs) CricSiteNames(dasquery dasql.DASQuery) []mongo.DASRecord

CricSiteNames local API returns site-names

func (LocalAPIs) Dataset4Block

func (LocalAPIs) Dataset4Block(dasquery dasql.DASQuery) []mongo.DASRecord

Dataset4Block find dataset for given block

func (LocalAPIs) Dataset4SiteRelease

func (LocalAPIs) Dataset4SiteRelease(dasquery dasql.DASQuery) []mongo.DASRecord

Dataset4SiteRelease returns dataset for given site and release

func (LocalAPIs) Dataset4SiteReleaseParent

func (LocalAPIs) Dataset4SiteReleaseParent(dasquery dasql.DASQuery) []mongo.DASRecord

Dataset4SiteReleaseParent returns dataset for given site release parent

func (LocalAPIs) DatasetList

func (LocalAPIs) DatasetList(dasquery dasql.DASQuery) []mongo.DASRecord

DatasetList finds dataset list

func (LocalAPIs) File4DatasetRunLumi

func (LocalAPIs) File4DatasetRunLumi(dasquery dasql.DASQuery) []mongo.DASRecord

File4DatasetRunLumi finds file for given dataset, run, lumi

func (LocalAPIs) FileLumi4Block

func (LocalAPIs) FileLumi4Block(dasquery dasql.DASQuery) []mongo.DASRecord

FileLumi4Block finds file,lumi for given block

func (LocalAPIs) FileLumi4Dataset

func (LocalAPIs) FileLumi4Dataset(dasquery dasql.DASQuery) []mongo.DASRecord

FileLumi4Dataset finds file,lumi for given dataset

func (LocalAPIs) FileLumiEvents4Block

func (LocalAPIs) FileLumiEvents4Block(dasquery dasql.DASQuery) []mongo.DASRecord

FileLumiEvents4Block finds file,lumi for given block

func (LocalAPIs) FileLumiEvents4Dataset

func (LocalAPIs) FileLumiEvents4Dataset(dasquery dasql.DASQuery) []mongo.DASRecord

FileLumiEvents4Dataset finds file,lumi for given dataset

func (LocalAPIs) FileRunLumi4Block

func (LocalAPIs) FileRunLumi4Block(dasquery dasql.DASQuery) []mongo.DASRecord

FileRunLumi4Block finds file,run,lumi for given block

func (LocalAPIs) FileRunLumi4Dataset

func (LocalAPIs) FileRunLumi4Dataset(dasquery dasql.DASQuery) []mongo.DASRecord

FileRunLumi4Dataset finds file,run,lumi for given dataset

func (LocalAPIs) FileRunLumiEvents4Block

func (LocalAPIs) FileRunLumiEvents4Block(dasquery dasql.DASQuery) []mongo.DASRecord

FileRunLumiEvents4Block finds file,run,lumi for given block

func (LocalAPIs) FileRunLumiEvents4Dataset

func (LocalAPIs) FileRunLumiEvents4Dataset(dasquery dasql.DASQuery) []mongo.DASRecord

FileRunLumiEvents4Dataset finds file,run,lumi for given dataset

func (LocalAPIs) Files4BlockRunsSite

func (LocalAPIs) Files4BlockRunsSite(dasquery dasql.DASQuery) []mongo.DASRecord

Files4BlockRunsSite combined APIs to lookup file list for give block/run/site

func (LocalAPIs) Files4DatasetRunsSite

func (LocalAPIs) Files4DatasetRunsSite(dasquery dasql.DASQuery) []mongo.DASRecord

Files4DatasetRunsSite combined APIs to lookup file list for give dataset/run/site

func (LocalAPIs) GroupResponsibilities

func (LocalAPIs) GroupResponsibilities(dasquery dasql.DASQuery) []mongo.DASRecord

GroupResponsibilities return group responsibilities

func (LocalAPIs) Groups

func (LocalAPIs) Groups(dasquery dasql.DASQuery) []mongo.DASRecord

Groups local API returns group names

func (LocalAPIs) Lumi4Block

func (LocalAPIs) Lumi4Block(dasquery dasql.DASQuery) []mongo.DASRecord

Lumi4Block finds lumi for given block

func (LocalAPIs) Lumi4BlockRun

func (LocalAPIs) Lumi4BlockRun(dasquery dasql.DASQuery) []mongo.DASRecord

Lumi4BlockRun finds lumi for given block and run

func (LocalAPIs) Lumi4Dataset

func (LocalAPIs) Lumi4Dataset(dasquery dasql.DASQuery) []mongo.DASRecord

Lumi4Dataset finds lumi for given dataset

func (LocalAPIs) PeopleEmail

func (LocalAPIs) PeopleEmail(dasquery dasql.DASQuery) []mongo.DASRecord

PeopleEmail returns SiteDB people via email

func (LocalAPIs) PeopleName

func (LocalAPIs) PeopleName(dasquery dasql.DASQuery) []mongo.DASRecord

PeopleName returns SiteDB people via names

func (LocalAPIs) Roles

func (LocalAPIs) Roles(dasquery dasql.DASQuery) []mongo.DASRecord

Roles returns SiteDB roles

func (LocalAPIs) RunLumi4Block

func (LocalAPIs) RunLumi4Block(dasquery dasql.DASQuery) []mongo.DASRecord

RunLumi4Block finds run,lumi for given block

func (LocalAPIs) RunLumi4Dataset

func (LocalAPIs) RunLumi4Dataset(dasquery dasql.DASQuery) []mongo.DASRecord

RunLumi4Dataset finds run, lumi for given dataset

func (LocalAPIs) RunLumiEvents4Block

func (LocalAPIs) RunLumiEvents4Block(dasquery dasql.DASQuery) []mongo.DASRecord

RunLumiEvents4Block finds run,lumi for given block

func (LocalAPIs) RunLumiEvents4Dataset

func (LocalAPIs) RunLumiEvents4Dataset(dasquery dasql.DASQuery) []mongo.DASRecord

RunLumiEvents4Dataset finds run, lumi for given dataset

func (LocalAPIs) Site4Block

func (LocalAPIs) Site4Block(dasquery dasql.DASQuery) []mongo.DASRecord

Site4Block returns site info for given block we keep it for backward compatibility

func (LocalAPIs) Site4BlockPhedex

func (LocalAPIs) Site4BlockPhedex(dasquery dasql.DASQuery) []mongo.DASRecord

Site4Block returns site info for given block based on Phedex blockReplicas

func (LocalAPIs) Site4Dataset

func (LocalAPIs) Site4Dataset(dasquery dasql.DASQuery) []mongo.DASRecord

Site4Dataset returns site info for given dataset

func (LocalAPIs) Site4DatasetPct

func (LocalAPIs) Site4DatasetPct(dasquery dasql.DASQuery) []mongo.DASRecord

Site4DatasetPct returns site info for given dataset

func (LocalAPIs) Site4Dataset_phedex

func (LocalAPIs) Site4Dataset_phedex(dasquery dasql.DASQuery) []mongo.DASRecord

Site4Dataset_phedex returns site info for given dataset

func (LocalAPIs) SiteNames

func (LocalAPIs) SiteNames(dasquery dasql.DASQuery) []mongo.DASRecord

SiteNames local API returns site-names

type PhedexNodes

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

PhedexNodes struct caches PhEDEX nodes and periodically update them

func (*PhedexNodes) NodeType

func (p *PhedexNodes) NodeType(site string) string

NodeType API returns type of given node

func (*PhedexNodes) Nodes

func (p *PhedexNodes) Nodes() []mongo.DASRecord

Nodes API periodically fetches PhEDEx nodes info if records still alive (fetched less than a day ago) we use the cache

type Replica

type Replica struct {
	Site    string
	Kind    string
	ALength float64
	Length  float64
}

Replica Rucio data structure

type ReqMgrInfo

type ReqMgrInfo struct {
	RequestName string
	ConfigIDs   []string
	ConfigIDMap map[string]string
	Tasks       []string
}

ReqMgrInfo represents information aobut request mananger service

type RucioRecordRSE

type RucioRecordRSE struct {
	DIDs           []map[string]string `json:"dids"`
	Domain         interface{}         `json:"domain"`
	AllStates      bool                `json:"all_states"`
	ResolveArchive bool                `json:"resolve_archive"`
	ResolveParents bool                `json:"resolve_parents"`
	RSE            string              `json:"rse_expression"`
}

Jump to

Keyboard shortcuts

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