Sha256: d6230b7271cccca805eb2a9c3e52e83b59aa797bc99e069adac1e29d10b0f829
Contents?: true
Size: 1.55 KB
Versions: 1
Compression:
Stored size: 1.55 KB
Contents
# frozen_string_literal: true require "securerandom" require "json" require "async" require "async/pool" require "async/pool/resource" require "async/pool/controller" require "async/queue" require "async/barrier" require "async/http/endpoint" require "async/websocket/client" require_relative "async/channel" require_relative "grumlin/version" require_relative "grumlin/exceptions" require_relative "grumlin/transport" require_relative "grumlin/client" require_relative "grumlin/typed_value" require_relative "grumlin/vertex" require_relative "grumlin/edge" require_relative "grumlin/path" require_relative "grumlin/typing" require_relative "grumlin/traversal" require_relative "grumlin/request_dispatcher" require_relative "grumlin/translator" require_relative "grumlin/anonymous_step" require_relative "grumlin/step" require_relative "grumlin/t" require_relative "grumlin/order" require_relative "grumlin/u" require_relative "grumlin/p" require_relative "grumlin/pop" require_relative "grumlin/sugar" module Grumlin class Config attr_accessor :url, :pool_size, :client_concurrency, :client_factory def initialize @pool_size = 10 @client_concurrency = 5 @client_factory = ->(url, parent) { Grumlin::Client.new(url, parent: parent) } end def default_pool @default_pool ||= Async::Pool::Controller.new(Grumlin::Client::PoolResource, limit: pool_size) end def reset! @default_pool = nil end end class << self def configure yield config end def config @config ||= Config.new end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
grumlin-0.7.0 | lib/grumlin.rb |