Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Provide ¶
Provide bundles everything needed for setting up all of the event objects for easier wiring into an uber fx application.
func ProvideMetrics ¶
ProvideMetrics builds the queue-related metrics and makes them available to the container.
Types ¶
type AuthAcquirerConfig ¶
type AuthAcquirerConfig struct { JWT acquire.RemoteBearerTokenAcquirerOptions Basic string }
AuthAcquirerConfig is the auth config for the client making requests to get a device's history of events.
type CircuitBreakerConfig ¶
type CircuitBreakerConfig struct { MaxRequests uint32 Interval time.Duration Timeout time.Duration ConsecutiveFailuresAllowed uint32 }
CircuitBreakerConfig deals with configuration for the circuit breaker.
type CodexClient ¶
type CodexClient struct { Address string Auth acquire.Acquirer Client httpaux.Client CircuitBreaker *gobreaker.CircuitBreaker RateLimiter ratelimit.Limiter Logger *zap.Logger Metrics Measures }
CodexClient is the client used to get events from codex.
func (*CodexClient) GetEvents ¶
func (c *CodexClient) GetEvents(device string) []interpreter.Event
GetEvents queries codex for events related to a device.
type CodexConfig ¶
type CodexConfig struct { Address string Auth AuthAcquirerConfig MaxRetryCount int RateLimit RateLimitConfig CircuitBreaker CircuitBreakerConfig }
CodexConfig determines the auth and address for connecting to the codex cluster.
type Measures ¶
type Measures struct { fx.In ResponseDuration prometheus.ObserverVec `name:"client_response_duration"` CircuitBreakerStatus *prometheus.GaugeVec `name:"circuit_breaker_status"` CircuitBreakerRejectedCount *prometheus.CounterVec `name:"circuit_breaker_rejected_count"` CircuitBreakerOpenDuration prometheus.ObserverVec `name:"circuit_breaker_open_duration"` }
Measures contains the various codex client related metrics.
type RateLimitConfig ¶
RateLimitConfig is the configuration for the rate limiter.