dependencystore

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2019 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dependency

type Dependency struct {
	Parent    string `cql:"parent"`
	Child     string `cql:"child"`
	CallCount int64  `cql:"call_count"` // always unsigned, but we cannot explicitly read uint64 from Cassandra
	Source    string `cql:"source"`
}

Dependency is the UDT representation of a Jaeger Dependency.

func (*Dependency) MarshalUDT

func (d *Dependency) MarshalUDT(name string, info gocql.TypeInfo) ([]byte, error)

MarshalUDT handles marshalling a Dependency.

func (*Dependency) UnmarshalUDT

func (d *Dependency) UnmarshalUDT(name string, info gocql.TypeInfo, data []byte) error

UnmarshalUDT handles unmarshalling a Dependency.

type DependencyStore

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

DependencyStore handles all queries and insertions to Cassandra dependencies

func NewDependencyStore

func NewDependencyStore(
	session cassandra.Session,
	metricsFactory metrics.Factory,
	logger *zap.Logger,
	version Version,
) (*DependencyStore, error)

NewDependencyStore returns a DependencyStore

func (*DependencyStore) GetDependencies

func (s *DependencyStore) GetDependencies(endTs time.Time, lookback time.Duration) ([]model.DependencyLink, error)

GetDependencies returns all interservice dependencies

func (*DependencyStore) WriteDependencies

func (s *DependencyStore) WriteDependencies(ts time.Time, dependencies []model.DependencyLink) error

WriteDependencies implements dependencystore.Writer#WriteDependencies.

type Version

type Version int

Version determines which version of the dependencies table to use.

const (
	// V1 is used when the dependency table is SASI indexed.
	V1 Version = iota

	// V2 is used when the dependency table is NOT SASI indexed.
	V2
)

func GetDependencyVersion

func GetDependencyVersion(s cassandra.Session) Version

GetDependencyVersion attempts to determine the version of the dependencies table. TODO: Remove this once we've migrated to V2 permanently. https://github.com/jaegertracing/jaeger/issues/1344

func (Version) IsValid

func (i Version) IsValid() bool

IsValid returns true if the Version is a valid one.

Jump to

Keyboard shortcuts

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