-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: actors api #1228
Closed
MasterPtato
wants to merge
1
commit into
10-19-feat_implement_topology_for_all_pool_types
from
10-19-feat_actors_api
Closed
feat: actors api #1228
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json | ||
|
||
imports: | ||
commons: common.yml | ||
|
||
service: | ||
auth: true | ||
base-path: /games/{game_id}/environments/{environment_id}/actors | ||
path-parameters: | ||
game_id: uuid | ||
environment_id: uuid | ||
endpoints: | ||
get: | ||
path: /{actor_id} | ||
method: GET | ||
docs: Gets a dynamic actor. | ||
path-parameters: | ||
actor_id: | ||
docs: The id of the actor to destroy | ||
type: uuid | ||
response: GetActorResponse | ||
|
||
list: | ||
path: "" | ||
method: GET | ||
docs: >- | ||
Lists all actors associated with the token used. Can be filtered by | ||
tags in the query string. | ||
request: | ||
name: GetActorsRequest | ||
query-parameters: | ||
tags_json: optional<string> | ||
include_destroyed: optional<boolean> | ||
cursor: optional<uuid> | ||
response: ListActorsResponse | ||
|
||
create: | ||
path: "" | ||
method: POST | ||
docs: Create a new dynamic actor. | ||
request: | ||
body: CreateActorRequest | ||
response: CreateActorResponse | ||
|
||
destroy: | ||
path: /{actor_id} | ||
method: DELETE | ||
docs: Destroy a dynamic actor. | ||
path-parameters: | ||
actor_id: | ||
docs: The id of the actor to destroy | ||
type: uuid | ||
request: | ||
name: DestroyActorRequest | ||
query-parameters: | ||
override_kill_timeout: | ||
docs: >- | ||
The duration to wait for in milliseconds before killing the actor. | ||
This should be used to override the default kill timeout if a faster | ||
time is needed, say for ignoring a graceful shutdown. | ||
type: optional<long> | ||
response: DestroyActorResponse | ||
|
||
types: | ||
GetActorResponse: | ||
properties: | ||
actor: commons.Actor | ||
|
||
CreateActorRequest: | ||
properties: | ||
datacenter: uuid | ||
tags: unknown | ||
runtime: CreateActorRuntimeRequest | ||
network: CreateActorNetworkRequest | ||
resources: commons.Resources | ||
lifecycle: optional<commons.Lifecycle> | ||
|
||
CreateActorRuntimeRequest: | ||
properties: | ||
build: uuid | ||
arguments: optional<list<string>> | ||
environment: optional<map<string, string>> | ||
|
||
CreateActorNetworkRequest: | ||
properties: | ||
mode: optional<commons.NetworkMode> | ||
ports: map<string, CreateActorPortRequest> | ||
|
||
CreateActorPortRequest: | ||
properties: | ||
protocol: commons.PortProtocol | ||
internal_port: optional<integer> | ||
routing: optional<commons.PortRouting> | ||
|
||
CreateActorResponse: | ||
properties: | ||
actor: | ||
docs: The actor that was created | ||
type: commons.Actor | ||
|
||
DestroyActorResponse: | ||
properties: {} | ||
|
||
ListActorsResponse: | ||
properties: | ||
actors: | ||
docs: A list of actors for the game associated with the token. | ||
type: list<commons.Actor> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json | ||
|
||
imports: | ||
commons: ../common.yml | ||
localCommons: common.yml | ||
uploadCommons: ../upload/common.yml | ||
|
||
service: | ||
auth: true | ||
base-path: /games/{game_id}/environments/{environment_id}/builds | ||
path-parameters: | ||
game_id: uuid | ||
environment_id: uuid | ||
endpoints: | ||
get: | ||
path: /{build_id} | ||
method: GET | ||
docs: >- | ||
Lists all builds of the game associated with the token used. Can be | ||
filtered by tags in the query string. | ||
path-parameters: | ||
build_id: uuid | ||
request: | ||
name: GetBuildRequest | ||
query-parameters: | ||
tags_json: optional<string> | ||
response: GetBuildResponse | ||
|
||
list: | ||
path: "" | ||
method: GET | ||
docs: >- | ||
Lists all builds of the game associated with the token used. Can be | ||
filtered by tags in the query string. | ||
request: | ||
name: ListBuildsRequest | ||
query-parameters: | ||
tags_json: optional<string> | ||
response: ListBuildsResponse | ||
|
||
patchTags: | ||
path: /{build_id}/tags | ||
method: PATCH | ||
path-parameters: | ||
build_id: uuid | ||
request: | ||
body: PatchBuildTagsRequest | ||
response: PatchBuildTagsResponse | ||
|
||
prepare: | ||
path: /prepare | ||
method: POST | ||
docs: Creates a new game build for the given game. | ||
request: | ||
body: CreateBuildRequest | ||
response: CreateBuildResponse | ||
|
||
complete: | ||
path: /{build_id}/complete | ||
method: POST | ||
docs: Marks an upload as complete. | ||
path-parameters: | ||
build_id: uuid | ||
|
||
types: | ||
GetBuildResponse: | ||
properties: | ||
build: localCommons.Build | ||
|
||
ListBuildsResponse: | ||
properties: | ||
builds: | ||
docs: A list of builds for the game associated with the token. | ||
type: list<localCommons.Build> | ||
|
||
PatchBuildTagsRequest: | ||
properties: | ||
tags: unknown | ||
exclusive_tags: | ||
docs: Removes the given tag keys from all other builds. | ||
type: optional<list<string>> | ||
|
||
PatchBuildTagsResponse: | ||
properties: {} | ||
|
||
CreateBuildRequest: | ||
properties: | ||
name: string | ||
image_tag: | ||
docs: A tag given to the game build. | ||
type: string | ||
image_file: uploadCommons.PrepareFile | ||
multipart_upload: | ||
type: optional<boolean> | ||
kind: optional<BuildKind> | ||
compression: optional<BuildCompression> | ||
prewarm_datacenters: optional<list<uuid>> | ||
|
||
CreateBuildResponse: | ||
properties: | ||
build: uuid | ||
image_presigned_request: optional<uploadCommons.PresignedRequest> | ||
image_presigned_requests: optional<list<uploadCommons.PresignedRequest>> | ||
|
||
BuildKind: | ||
enum: | ||
- value: docker_image | ||
docs: Docker image archive generated by `docker save`. | ||
- value: oci_bundle | ||
docs: OCI-compliant bundle. | ||
- value: javascript | ||
docs: A JavaScript file. | ||
|
||
BuildCompression: | ||
enum: | ||
- value: none | ||
docs: None compression. | ||
- value: lz4 | ||
docs: LZ4 compression. Use the minimum compression level. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json | ||
|
||
imports: | ||
commons: ../common.yml | ||
|
||
types: | ||
Actor: | ||
properties: | ||
id: uuid | ||
environment: uuid | ||
datacenter: uuid | ||
tags: unknown | ||
runtime: Runtime | ||
network: Network | ||
resources: Resources | ||
lifecycle: Lifecycle | ||
created_at: long | ||
started_at: optional<long> | ||
destroyed_at: optional<long> | ||
|
||
Runtime: | ||
properties: | ||
build: uuid | ||
arguments: optional<list<string>> | ||
environment: optional<map<string, string>> | ||
|
||
Lifecycle: | ||
properties: | ||
kill_timeout: | ||
docs: >- | ||
The duration to wait for in milliseconds before killing the actor. | ||
This should be set to a safe default, and can be overridden during a | ||
DELETE request if needed. | ||
type: optional<long> | ||
|
||
Resources: | ||
properties: | ||
cpu: | ||
docs: | | ||
The number of CPU cores in millicores, or 1/1000 of a core. For example, | ||
1/8 of a core would be 125 millicores, and 1 core would be 1000 | ||
millicores. | ||
type: integer | ||
memory: | ||
docs: The amount of memory in megabytes | ||
type: integer | ||
|
||
Network: | ||
properties: | ||
mode: optional<NetworkMode> | ||
ports: map<string, Port> | ||
|
||
NetworkMode: | ||
enum: | ||
- bridge | ||
- host | ||
|
||
Port: | ||
properties: | ||
protocol: PortProtocol | ||
internal_port: optional<integer> | ||
public_hostname: optional<string> | ||
public_port: optional<integer> | ||
routing: PortRouting | ||
|
||
PortProtocol: | ||
enum: | ||
- http | ||
- https | ||
- tcp | ||
- tcp_tls | ||
- udp | ||
|
||
PortRouting: | ||
properties: | ||
game_guard: optional<GameGuardRouting> | ||
host: optional<HostRouting> | ||
|
||
GameGuardRouting: | ||
properties: {} | ||
|
||
HostRouting: | ||
properties: {} | ||
|
||
Build: | ||
properties: | ||
id: uuid | ||
name: string | ||
created_at: commons.Timestamp | ||
content_length: | ||
docs: Unsigned 64 bit integer. | ||
type: long | ||
tags: | ||
docs: Tags of this build | ||
type: map<string, string> | ||
|
||
Datacenter: | ||
properties: | ||
id: uuid | ||
slug: string | ||
name: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json | ||
|
||
imports: | ||
commons: ../common.yml | ||
localCommons: common.yml | ||
uploadCommons: ../upload/common.yml | ||
|
||
service: | ||
auth: true | ||
base-path: /games/{game_id}/environments/{environment_id}/datacenters | ||
path-parameters: | ||
game_id: uuid | ||
environment_id: uuid | ||
endpoints: | ||
list: | ||
path: "" | ||
method: GET | ||
request: | ||
name: ListDatacentersRequest | ||
response: ListDatacentersResponse | ||
|
||
types: | ||
ListDatacentersResponse: | ||
properties: | ||
datacenters: | ||
type: list<localCommons.Datacenter> | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.