You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: context/getting-started.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,13 +14,13 @@ $ bundle add async-service
14
14
15
15
`async-service` has several core concepts:
16
16
17
-
- A {ruby Async::Service::Generic} which represents the base class for implementing services.
17
+
- A {ruby Async::Service::GenericService} which represents the base class for implementing services.
18
18
- A {ruby Async::Service::Configuration} which manages service configurations and environments.
19
19
- A {ruby Async::Service::Controller} which handles starting, stopping, and managing services.
20
20
21
21
## Usage
22
22
23
-
Services are long-running processes that can be managed as a group. Each service extends `Async::Service::Generic` and implements a `setup` method that defines how the service runs.
23
+
Services are long-running processes that can be managed as a group. Each service extends `Async::Service::GenericService` and implements a `setup` method that defines how the service runs.
24
24
25
25
### Basic Service
26
26
@@ -31,7 +31,7 @@ Create a simple service that runs continuously:
Copy file name to clipboardExpand all lines: context/service-architecture.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,14 +82,14 @@ end
82
82
83
83
## Service
84
84
85
-
The {ruby Async::Service::Generic} represents the service implementation layer. It handles the actual business logic of your services, provides access to configuration through environment evaluators, and manages the service lifecycle including startup, execution, and shutdown phases.
85
+
The {ruby Async::Service::GenericService} represents the service implementation layer. It handles the actual business logic of your services, provides access to configuration through environment evaluators, and manages the service lifecycle including startup, execution, and shutdown phases.
86
86
87
87
### Business Logic
88
88
89
89
Services contain the actual implementation of what your service does:
90
90
91
91
```ruby
92
-
classWebService < Async::Service::Generic
92
+
classWebService < Async::Service::GenericService
93
93
defsetup(container)
94
94
super
95
95
@@ -148,7 +148,7 @@ By evaluating the log_path in the child process, you ensure that each instance h
148
148
Services define their startup, running, and shutdown behavior:
149
149
150
150
```ruby
151
-
classMyService < Async::Service::Generic
151
+
classMyService < Async::Service::GenericService
152
152
defstart
153
153
super
154
154
# Service-specific startup logic including pre-loading libraries and binding to network interfaces before forking.
@@ -262,7 +262,7 @@ end
262
262
263
263
### Health Checking
264
264
265
-
For services using `Async::Service::Managed::Service`, health checking is handled automatically. For services extending `Generic`, you can set up health checking manually:
265
+
For services using `Async::Service::ManagedService`, health checking is handled automatically. For services extending `GenericService`, you can set up health checking manually:
266
266
267
267
```ruby
268
268
defsetup(container)
@@ -284,7 +284,7 @@ def setup(container)
284
284
end
285
285
```
286
286
287
-
Note: `Async::Service::Managed::Service` automatically handles health checking, container options, and process title formatting, so you typically don't need to set this up manually.
287
+
Note: `Async::Service::ManagedService` automatically handles health checking, container options, and process title formatting, so you typically don't need to set this up manually.
0 commit comments