Skip to content

Commit afc89a9

Browse files
NathanFlurryMasterPtato
authored andcommitted
chore: flatten actor api spec
1 parent cf71201 commit afc89a9

File tree

2 files changed

+32
-34
lines changed

2 files changed

+32
-34
lines changed

sdks/api/fern/definition/actors/__package__.yml

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -116,26 +116,24 @@ types:
116116
tags: unknown
117117
build: optional<uuid>
118118
build_tags: optional<unknown>
119-
runtime: optional<CreateActorRuntimeRequest>
120-
network: optional<CreateActorNetworkRequest>
121-
resources: optional<localCommons.Resources>
122-
lifecycle: optional<localCommons.Lifecycle>
123-
124-
CreateActorRuntimeRequest:
125-
properties:
126119
# arguments: optional<list<string>>
127120
environment: optional<map<string, string>>
128-
network: optional<CreateActorRuntimeNetworkRequest>
129-
130-
CreateActorRuntimeNetworkRequest:
131-
properties:
132-
endpoint_type: localCommons.EndpointType
133-
134-
CreateActorNetworkRequest:
135-
properties:
136-
mode: optional<localCommons.NetworkMode>
121+
network_mode: optional<localCommons.NetworkMode>
122+
network_endpoint_type: localCommons.EndpointType
137123
ports: optional<map<string, CreateActorPortRequest>>
138-
wait_ready: optional<boolean>
124+
wait_for_network_ready: optional<boolean>
125+
resources: optional<localCommons.Resources>
126+
kill_timeout:
127+
docs: >-
128+
The duration to wait for in milliseconds before killing the actor.
129+
This should be set to a safe default, and can be overridden during a
130+
DELETE request if needed.
131+
type: optional<long>
132+
durable:
133+
docs: >-
134+
If true, the actor will try to reschedule itself automatically in the event of a crash or a
135+
datacenter failover. The actor will not reschedule if it exits successfully.
136+
type: optional<boolean>
139137

140138
CreateActorPortRequest:
141139
properties:

sdks/api/fern/definition/actors/common.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,11 @@ types:
99
id: commons.Id
1010
region: string
1111
tags: unknown
12-
runtime: Runtime
13-
network: Network
14-
lifecycle: Lifecycle
15-
created_at: commons.Timestamp
16-
started_at: optional<commons.Timestamp>
17-
destroyed_at: optional<commons.Timestamp>
18-
19-
Runtime:
20-
properties:
2112
build: uuid
2213
arguments: optional<list<string>>
2314
environment: optional<map<string, string>>
24-
25-
Lifecycle:
26-
properties:
15+
network_mode: NetworkMode
16+
ports: map<string, Port>
2717
kill_timeout:
2818
docs: >-
2919
The duration to wait for in milliseconds before killing the actor.
@@ -35,11 +25,9 @@ types:
3525
If true, the actor will try to reschedule itself automatically in the event of a crash or a
3626
datacenter failover. The actor will not reschedule if it exits successfully.
3727
type: optional<boolean>
38-
39-
Network:
40-
properties:
41-
mode: NetworkMode
42-
ports: map<string, Port>
28+
created_at: commons.Timestamp
29+
started_at: optional<commons.Timestamp>
30+
destroyed_at: optional<commons.Timestamp>
4331

4432
NetworkMode:
4533
enum:
@@ -83,3 +71,15 @@ types:
8371
- hostname
8472
- path
8573

74+
Resources:
75+
properties:
76+
cpu:
77+
docs: |
78+
The number of CPU cores in millicores, or 1/1000 of a core. For example,
79+
1/8 of a core would be 125 millicores, and 1 core would be 1000
80+
millicores.
81+
type: integer
82+
memory:
83+
docs: The amount of memory in megabytes
84+
type: integer
85+

0 commit comments

Comments
 (0)