Class: Restate::Config
- Inherits:
-
Object
- Object
- Restate::Config
- Defined in:
- lib/restate/config.rb,
sig/restate.rbs
Overview
Global SDK configuration. Set via Restate.configure.
Instance Attribute Summary collapse
-
#admin_headers ⇒ Hash[String, String]
Default headers sent with every admin request.
-
#admin_url ⇒ String
Restate admin URL (for deployments, invocation management).
-
#ingress_headers ⇒ Hash[String, String]
Default headers sent with every ingress request.
-
#ingress_url ⇒ String
Restate ingress URL (for invoking services).
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
39 40 41 42 43 44 |
# File 'lib/restate/config.rb', line 39 def initialize @ingress_url = 'http://localhost:8080' @admin_url = 'http://localhost:9070' @ingress_headers = {} @admin_headers = {} end |
Instance Attribute Details
#admin_headers ⇒ Hash[String, String]
Default headers sent with every admin request.
Accepts the same static Hash or callable forms as ingress_headers.
37 38 39 |
# File 'lib/restate/config.rb', line 37 def admin_headers @admin_headers end |
#admin_url ⇒ String
Restate admin URL (for deployments, invocation management).
20 21 22 |
# File 'lib/restate/config.rb', line 20 def admin_url @admin_url end |
#ingress_headers ⇒ Hash[String, String]
Default headers sent with every ingress request.
Can be a Hash or a callable (Proc/Lambda) returning a Hash.
A callable is evaluated each time Restate.client is called,
which lets frameworks like Rails inject per-request context
(e.g., team ID, shard routing, auth tokens).
33 34 35 |
# File 'lib/restate/config.rb', line 33 def ingress_headers @ingress_headers end |
#ingress_url ⇒ String
Restate ingress URL (for invoking services).
17 18 19 |
# File 'lib/restate/config.rb', line 17 def ingress_url @ingress_url end |