calculator

package
v0.0.0-...-2d1a9ea Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationConfig

type ApplicationConfig struct {
	Database config.DatabaseInfo   `json:"database,omitempty"`
	Stream   config.PubSubInfo     `json:"stream,omitempty"`
	Logging  sdkConfig.LoggingInfo `json:"logging,omitempty"`
	Policy   config.PolicyInfo     `json:"policy,omitempty"`
}

func (ApplicationConfig) AsString

func (a ApplicationConfig) AsString() string

type ArangoClient

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

func NewArangoClient

func NewArangoClient(dbConfig config.DatabaseInfo, logger interfaces.Logger) (*ArangoClient, error)

func (*ArangoClient) CreateDocument

func (c *ArangoClient) CreateDocument(ctx context.Context, documentKey string, document interface{}, collectionName string) error

func (*ArangoClient) CreateEdge

func (c *ArangoClient) CreateEdge(ctx context.Context, src string, target string, collectionName string) error

func (*ArangoClient) QueryAnnotations

func (c *ArangoClient) QueryAnnotations(ctx context.Context, key string) ([]documents.Annotation, error)

func (*ArangoClient) ValidateGraph

func (c *ArangoClient) ValidateGraph(ctx context.Context) error

type Calculator

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

func NewCalculator

func NewCalculator(chKeys chan string, dbConfig config.DatabaseInfo, logger interfaces.Logger, policy policies.DcfPolicy) Calculator

func (*Calculator) BootstrapHandler

func (c *Calculator) BootstrapHandler(ctx context.Context, wg *sync.WaitGroup) bool

type Collector

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

Collector is responsible for maintaining a map of all of the dequeued keys. It collects these keys in order to de-duplicate them so we don't calculate the score for the same key more than once (hopefully) or otherwise when the annotations are incomplete.

func NewCollector

func NewCollector(chKeys chan string, chPub chan string, logger interfaces.Logger) Collector

func (*Collector) BootstrapHandler

func (c *Collector) BootstrapHandler(ctx context.Context, wg *sync.WaitGroup) bool

type Subscriber

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

func NewSubscriber

func NewSubscriber(endpoint SdkConfig.StreamInfo, chKeys chan string, logger SdkInterfaces.Logger) (Subscriber, error)

func (*Subscriber) BootstrapHandler

func (s *Subscriber) BootstrapHandler(ctx context.Context, wg *sync.WaitGroup) bool

type Writer

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

Writer can be used as an assistant for debugging so I'm going to leave it for now. If you're unsure whether a message is being delivered at some point of the internal handoff, plug in the Writer to have it log the relevant keys.

func NewWriter

func NewWriter(chKeys chan string, logger interfaces.Logger) Writer

func (*Writer) BootstrapHandler

func (w *Writer) BootstrapHandler(ctx context.Context, wg *sync.WaitGroup) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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