All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.netflix.spinnaker.orca.gremlin.GremlinService.kt Maven / Gradle / Ivy

The newest version!
package com.netflix.spinnaker.orca.gremlin

import retrofit.http.Body
import retrofit.http.DELETE
import retrofit.http.GET
import retrofit.http.Header
import retrofit.http.Headers
import retrofit.http.POST
import retrofit.http.Path
import retrofit.http.Query

interface GremlinService {
  @POST("/attacks/new")
  @Headers(
    "Content-Type: application/json",
    "X-Gremlin-Agent: spinnaker/0.1.0"
  )
  fun create(
    @Header("Authorization") authHeader: String,
    @Body attackParameters: AttackParameters
  ): String

  @GET("/executions")
  @Headers(
    "X-Gremlin-Agent: spinnaker/0.1.0"
  )
  fun getStatus(
    @Header("Authorization") authHeader: String,
    @Query("taskId") attackGuid: String
  ): List

  @DELETE("/attacks/{attackGuid}")
  @Headers(
    "X-Gremlin-Agent: spinnaker/0.1.0"
  )
  fun haltAttack(
    @Header("Authorization") authHeader: String,
    @Path("attackGuid") attackGuid: String
  ): Void
}

data class AttackParameters(
  val command: Map,
  val target: Map
)

data class AttackStatus(
  val guid: String,
  val stage: String,
  val stageLifecycle: String,
  val endTime: String?,
  val output: String?
)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy