Module: ThreeScale::Backend

Includes:
Constants
Defined in:
app/api/internal/stats.rb,
app/api/internal/errors.rb,
app/api/internal/events.rb,
lib/3scale/backend/cors.rb,
lib/3scale/backend/rack.rb,
lib/3scale/backend/util.rb,
app/api/internal/metrics.rb,
lib/3scale/backend/usage.rb,
app/api/internal/internal.rb,
app/api/internal/services.rb,
lib/3scale/backend/alerts.rb,
lib/3scale/backend/errors.rb,
lib/3scale/backend/metric.rb,
lib/3scale/backend/server.rb,
lib/3scale/backend/statsd.rb,
lib/3scale/backend/worker.rb,
lib/3scale/backend/logging.rb,
lib/3scale/backend/service.rb,
lib/3scale/backend/storage.rb,
lib/3scale/backend/version.rb,
lib/3scale/backend/listener.rb,
lib/3scale/backend/manifest.rb,
lib/3scale/backend/memoizer.rb,
lib/3scale/backend/storable.rb,
app/api/internal/usagelimits.rb,
app/api/internal/utilization.rb,
lib/3scale/backend/constants.rb,
app/api/internal/alert_limits.rb,
app/api/internal/applications.rb,
lib/3scale/backend/experiment.rb,
lib/3scale/backend/stats/keys.rb,
lib/3scale/backend/transactor.rb,
lib/3scale/backend/validators.rb,
lib/3scale/backend/alert_limit.rb,
lib/3scale/backend/application.rb,
lib/3scale/backend/environment.rb,
lib/3scale/backend/job_fetcher.rb,
lib/3scale/backend/server/puma.rb,
lib/3scale/backend/transaction.rb,
lib/3scale/backend/usage_limit.rb,
lib/3scale/backend/utilization.rb,
lib/3scale/backend/worker_sync.rb,
app/api/internal/service_tokens.rb,
lib/3scale/backend/configurable.rb,
lib/3scale/backend/period/cache.rb,
lib/3scale/backend/storage_sync.rb,
lib/3scale/backend/worker_async.rb,
lib/3scale/backend/configuration.rb,
lib/3scale/backend/error_storage.rb,
lib/3scale/backend/event_storage.rb,
lib/3scale/backend/period/period.rb,
lib/3scale/backend/queue_storage.rb,
lib/3scale/backend/server/falcon.rb,
lib/3scale/backend/service_token.rb,
lib/3scale/backend/stats/cleaner.rb,
lib/3scale/backend/stats/storage.rb,
app/api/internal/application_keys.rb,
lib/3scale/backend/background_job.rb,
lib/3scale/backend/logging/logger.rb,
lib/3scale/backend/logging/worker.rb,
lib/3scale/backend/validators/key.rb,
lib/3scale/backend/worker_metrics.rb,
lib/3scale/backend/extensions/hash.rb,
lib/3scale/backend/extensions/time.rb,
lib/3scale/backend/period/boundary.rb,
lib/3scale/backend/rack/prometheus.rb,
lib/3scale/backend/storage_helpers.rb,
lib/3scale/backend/validators/base.rb,
lib/3scale/backend/distributed_lock.rb,
lib/3scale/backend/extensions/array.rb,
lib/3scale/backend/listener_metrics.rb,
lib/3scale/backend/logging/external.rb,
lib/3scale/backend/stats/aggregator.rb,
lib/3scale/backend/validators/state.rb,
lib/3scale/backend/extensions/string.rb,
lib/3scale/backend/metric/collection.rb,
lib/3scale/backend/transactor/status.rb,
lib/3scale/backend/validators/limits.rb,
lib/3scale/backend/application_events.rb,
lib/3scale/backend/logging/middleware.rb,
lib/3scale/backend/stats/stats_parser.rb,
lib/3scale/backend/stats/bucket_reader.rb,
lib/3scale/backend/stats/codes_commons.rb,
lib/3scale/backend/storage_key_helpers.rb,
lib/3scale/backend/validators/referrer.rb,
lib/3scale/backend/configuration/loader.rb,
lib/3scale/backend/extensions/nil_class.rb,
lib/3scale/backend/stats/bucket_storage.rb,
lib/3scale/backend/stats/period_commons.rb,
lib/3scale/backend/storage_async/client.rb,
lib/3scale/backend/validators/oauth_key.rb,
lib/3scale/backend/analytics/kinesis/job.rb,
lib/3scale/backend/failed_jobs_scheduler.rb,
lib/3scale/backend/logging/external/impl.rb,
lib/3scale/backend/transactor/notify_job.rb,
lib/3scale/backend/transactor/report_job.rb,
lib/3scale/backend/analytics/redshift/job.rb,
lib/3scale/backend/rack/exception_catcher.rb,
lib/3scale/backend/stats/aggregators/base.rb,
lib/3scale/backend/storage_async/pipeline.rb,
lib/3scale/backend/transactor/process_job.rb,
lib/3scale/backend/logging/external/resque.rb,
lib/3scale/backend/stats/aggregators/usage.rb,
lib/3scale/backend/transactor/usage_report.rb,
lib/3scale/backend/validators/redirect_uri.rb,
lib/3scale/backend/transactor/limit_headers.rb,
lib/3scale/backend/validators/oauth_setting.rb,
lib/3scale/backend/validators/service_state.rb,
lib/3scale/backend/analytics/kinesis/adapter.rb,
lib/3scale/backend/logging/middleware/writer.rb,
lib/3scale/backend/transactor/notify_batcher.rb,
app/api/internal/application_referrer_filters.rb,
lib/3scale/backend/analytics/kinesis/exporter.rb,
lib/3scale/backend/analytics/redshift/adapter.rb,
lib/3scale/backend/analytics/redshift/importer.rb,
lib/3scale/backend/rack/internal_error_catcher.rb,
lib/3scale/backend/logging/external/impl/bugsnag.rb,
lib/3scale/backend/logging/external/impl/default.rb,
lib/3scale/backend/logging/external/impl/airbrake.rb,
lib/3scale/backend/logging/middleware/json_writer.rb,
lib/3scale/backend/logging/middleware/text_writer.rb,
lib/3scale/backend/stats/aggregators/response_code.rb,
lib/3scale/backend/storage_async/resque_extensions.rb,
lib/3scale/backend/use_cases/provider_key_change_use_case.rb

Defined Under Namespace

Modules: API, Alerts, Analytics, CORS, Configurable, Configuration, Constants, ErrorStorage, Extensions, Logging, Manifest, Period, Rack, Server, Stats, Storable, StorageAsync, StorageHelpers, StorageKeyHelpers, TimeHacks, Transactor, Util, Validators, Worker Classes: AlertLimit, Application, ApplicationEvents, ApplicationHasInconsistentData, ApplicationHasNoState, ApplicationKeyInvalid, ApplicationNotActive, ApplicationNotFound, AuthenticationError, BackgroundJob, BadRequest, ContentTypeInvalid, DistributedLock, EndUsersNoLongerSupported, Error, EventStorage, Experiment, FailedJobsScheduler, Invalid, InvalidEventType, InvalidProviderKeys, JobFetcher, LimitsExceeded, Listener, ListenerMetrics, Memoizer, Metric, MetricInvalid, NotFound, NotValidData, OauthNotEnabled, ProviderKeyChangeUseCase, ProviderKeyExists, ProviderKeyInvalid, ProviderKeyInvalidOrServiceMissing, ProviderKeyNotFound, ProviderKeyOrServiceTokenRequired, QueueStorage, RedirectURIInvalid, RedirectURLInvalid, ReferrerFilterInvalid, ReferrerFiltersMissing, ReferrerNotAllowed, Service, ServiceIdInvalid, ServiceIdMissing, ServiceIsDefaultService, ServiceLoadInconsistency, ServiceNotActive, ServiceToken, ServiceTokenInvalid, Statsd, Storage, StorageSync, Transaction, TransactionTimestampNotWithinRange, TransactionTimestampTooNew, TransactionTimestampTooOld, TransactionsFormatInvalid, TransactionsHasNilTransaction, TransactionsIsBlank, UnsupportedApiVersion, Usage, UsageLimit, UsageValueInvalid, UserKeyInvalid, Utilization, WorkerAsync, WorkerMetrics, WorkerSync

Constant Summary collapse

VERSION =
'3.4.3'

Class Attribute Summary collapse

Class Method Summary collapse

Methods included from Constants

included

Class Attribute Details

.configurationObject

Returns the value of attribute configuration.



9
10
11
# File 'lib/3scale/backend/configuration.rb', line 9

def configuration
  @configuration
end

Class Method Details

.configure {|configuration| ... } ⇒ Object

Yields:



11
12
13
# File 'lib/3scale/backend/configuration.rb', line 11

def configure
  yield configuration
end

.development?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/3scale/backend/environment.rb', line 12

def development?
  environment == 'development'
end

.environmentObject



4
5
6
# File 'lib/3scale/backend/environment.rb', line 4

def environment
  @environment ||= ENV['RACK_ENV'] || 'development'
end

.Period(granularity, ts = nil) ⇒ Object



75
76
77
# File 'lib/3scale/backend/period/period.rb', line 75

def self.Period(granularity, ts = nil)
  Period[granularity, ts]
end

.production?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/3scale/backend/environment.rb', line 8

def production?
  environment == 'production'
end

.test?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/3scale/backend/environment.rb', line 16

def test?
  environment == 'test'
end