Skip to content

Commit

Permalink
devex: add some utlity types + add target to deployment object
Browse files Browse the repository at this point in the history
  • Loading branch information
Looskie committed Nov 16, 2023
1 parent be21a64 commit 57bd465
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/rest/types/fleet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,5 @@ export interface NodeIP {
*/
type: 'ipv4' | 'ipv6';
}

export type TargetID = Id<'fleet_node'> | Id<'fleet_group'> | null;
17 changes: 17 additions & 0 deletions src/rest/types/ignite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import type {
Timestamp,
} from '../../util/types.ts';
import type {Endpoint} from '../endpoints.ts';
import type {TargetID} from './fleet.ts';

/**
* All regions that Hop operates in
Expand Down Expand Up @@ -673,6 +674,11 @@ export interface DeploymentConfig {
*/
type: RuntimeType;

/**
* Target node for deployment, if its undefined its inferred as Hop
*/
target: DeploymentTarget | undefined;

/**
* The version of this config
*/
Expand Down Expand Up @@ -738,6 +744,17 @@ export interface Image {
gh_repo: ImageGHRepo | null;
}

export interface DeploymentTarget {
/**
* The type of target (Hop, Fleet Node or Fleet Group)
*/
type: 'hop' | 'fleet_node' | 'fleet_group';
/**
* The ID of the target that the deployment will be deployed to
*/
target_id: TargetID;
}

/**
* Docker image registry authorization
* @public
Expand Down

0 comments on commit 57bd465

Please sign in to comment.