dynamodependencystore

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2021 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TimeToBucket added in v0.0.7

func TimeToBucket(t time.Time) int64

func WriteDependencyItem added in v0.0.7

func WriteDependencyItem(ctx context.Context, svc DynamoDBAPI, dependenciesTable string, item *DependencyItem) error

Types

type DependencyCallCounts added in v0.0.7

type DependencyCallCounts struct {
	CallCounts map[string]map[string]uint64
}

func NewDependencyCallCounts added in v0.0.7

func NewDependencyCallCounts() *DependencyCallCounts

func (*DependencyCallCounts) CountRequest added in v0.0.7

func (d *DependencyCallCounts) CountRequest(parent, child string, count uint64)

type DependencyItem added in v0.0.7

type DependencyItem struct {
	Key            string
	Parent         string
	Child          string
	CallCount      uint64
	Source         string
	CallTimeBucket int64
}

type DynamoDBAPI added in v0.0.7

type DynamoDBAPI interface {
	UpdateItem(ctx context.Context, params *dynamodb.UpdateItemInput, optFns ...func(*dynamodb.Options)) (*dynamodb.UpdateItemOutput, error)
}

type Reader

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

func NewReader

func NewReader(logger hclog.Logger, svc *dynamodb.Client, dependenciesTable string) *Reader

func (*Reader) GetDependencies

func (r *Reader) GetDependencies(ctx context.Context, endTs time.Time, lookback time.Duration) ([]model.DependencyLink, error)

Jump to

Keyboard shortcuts

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