resource

package
v1.38.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	// ParentSvg is a map of sv/svg id to a list of its parent svgs sorted alphabetically.
	ParentSvg map[string][]string
	// SvgInfo is a map of svg id to its information.
	RawSvg         map[string]*pb.StatVarGroupNode
	SvgSearchIndex *SearchIndex
	SQLiteDb       *sql.DB
}

Cache holds cached data for the mixer server.

type Metadata

type Metadata struct {
	Mappings         []*types.Mapping
	OutArcInfo       map[string]map[string][]types.OutArcInfo
	InArcInfo        map[string][]types.InArcInfo
	SubTypeMap       map[string]string
	Bq               string
	BtProject        string
	BranchBtInstance string
}

Metadata represents the metadata used by the server.

type RankingInfo

type RankingInfo struct {
	// ApproxNumPv is an estimate of the number of PVs in the sv/svg.
	ApproxNumPv int
	// Number of PVs for known properties
	NumKnownPv int
	// RankingName is the name we will be using to rank this sv/svg against other
	// sv/svg.
	RankingName string
}

RankingInfo holds the ranking information for each stat var hierarchy search result.

type SearchIndex

type SearchIndex struct {
	RootTrieNode *TrieNode
	Ranking      map[string]*RankingInfo
}

SearchIndex holds the index for searching stat var (group).

func (*SearchIndex) Update

func (index *SearchIndex) Update(
	nodeID string, nodeString string, displayName string, isSvg bool, synonymMap map[string][]string, svDefinition string)

Update search index, given a stat var (group) node ID and string.

type TrieNode added in v1.32.0

type TrieNode struct {
	ChildrenNodes map[rune]*TrieNode
	// SvgIds and SvIds are sets where Ids are keys and each key is mapped to an
	// empty struct
	SvgIds map[string]struct{}
	SvIds  map[string]struct{}
	// Matches is a set of strings that match the token ending at the current
	// trienode
	Matches map[string]struct{}
}

TrieNode represents a node in the sv hierarchy search Trie.

Jump to

Keyboard shortcuts

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