Help us shape the future of Go! Take the 2026 Go Developer Survey

dependencystore

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

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 added in v1.10.0

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 added in v1.10.1

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 added in v1.10.0

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