package
0.4.0
Repository: https://github.com/kramvan1/go-etcd-rules.git
Documentation: pkg.go.dev

# Functions

EngineConcurrency controls the number of concurrent workers processing rule tasks.
EngineContextProvider sets a custom provider for generating context instances for use by callbacks.
EngineCrawlMutex sets an application identifier mutex and a TTL value for the mutex to limit the number of instances of an application performing a crawl at any given time to one.
EngineEnhancedRuleFilter uses a rule filtering mechanism that more accurately selects rules to be evaluated based on given key/value pair.
EngineLockTimeout controls the TTL of a lock in seconds.
EngineRuleWorkBuffer sets the limit on the number of ruleWork in the channel without a receiving worker.
EngineSyncDelay enables the throttling of the crawlers by introducing a delay (in ms) between queries to keep the crawlers from overwhelming etcd.
EngineSyncInterval enables the interval between sync or crawler runs to be configured.
EngineWatchTimeout controls the timeout of a watch operation in seconds.
FormatRuleString creates an indented, more readable version of a rule string.
FormatWithAttributes applied the specified attributes to the provided path.
GetEngineOptions is used to convert an EngineOptions instance into an array of EngineOption instances which can then be used when initializing an Engine instance.
GetMetricsMetadata gets metadata about an etcd call from the context.
KeyConstraint enables multiple query prefixes to be generated for a specific attribute as a way to limit the scope of a query for a prefix query.
KeyExpansion enables attributes in rules to be fixed at run time while allowing the rule declarations to continue to use the attribute placeholders.
NewAndRule allows two or more dynamic rules to be combined into a single rule such that every nested rule must be satisfied in order for the overall rule to be satisfied.
NewAttributes provides a map-based Attributes instance, for instance for testing callbacks.
NewEqualsLiteralRule creates a rule that compares the provided string value with the value of a node whose key matches the provided key pattern.
NewEqualsRule enables the comparison of two or more node values with the specified key patterns.
NewNotRule allows a rule to be negated such that if the nested rule's key matches but the rule is otherwise not satisfied, the not rule is satisfied.
NewOrRule allows two or more dynamic rules to be combined into a single rule such that at least one nested rule must be satisfied in order for the overall rule to be satisfied.
NewV3Engine creates a new V3Engine instance.
NewV3EngineWithClient creates a new V3Engine instance with the provided etcd v3 client instance.
RuleContextProvider sets a custom provider for generating context instances for use by a specific callback.
RuleLockTimeout controls the TTL of the locks associated with the rule, in seconds.
RuleSatisfied returns true if the rule was satisfied and false if it was not.
SetMethod sets the method in the context of which an etcd call is being made, allowing metrics to differentiate between different types of calls to etcd.

# Structs

EngineOptions is used to configure the engine from configuration files.
EtcdMetricsMetadata provides information about calls to etcd.
V3RuleTask instances contain contextual object instances and metadata for use by rule callbacks.

# Interfaces

Attributes provide access to the key/value pairs associated with dynamic keys.
BaseEngine provides common method for etcd v2 and v3 rules engine instances.
DynamicRule defines rules that have dynamic key paths so that classes of keys can be referenced in rules.
EngineOption instances control the overall behavior of an Engine instance.
RuleOption instances control the behavior of individual rules.
V3Engine defines the interactions with a rule engine instance communicating with etcd v3.

# Type aliases

ContextProvider is used to specify a custom provider of a context for a given rule.
V3RuleTaskCallback is the function type for functions that are called as a reulst of a specified rule being satisfied using the etcd v3 API.
WrapKV is used to provide a wrapper for the default etcd v3 KV implementation used by the rules engine.