diff options
author | Valerij Fredriksen <valerijf@verizonmedia.com> | 2021-06-14 14:03:07 +0200 |
---|---|---|
committer | Valerij Fredriksen <valerijf@verizonmedia.com> | 2021-06-14 14:03:07 +0200 |
commit | 33e23de1c0df684628aeeb4a18971325713dbe57 (patch) | |
tree | 74191279e00b29a548a06c089fea7c8b884dca6b /controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/horizon/HorizonResponse.java | |
parent | 291e527fb70897742f16caa4b3c7062cc6e47708 (diff) |
Proxy Horzion HTTP response code
Diffstat (limited to 'controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/horizon/HorizonResponse.java')
-rw-r--r-- | controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/horizon/HorizonResponse.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/horizon/HorizonResponse.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/horizon/HorizonResponse.java new file mode 100644 index 00000000000..ba7540b2708 --- /dev/null +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/horizon/HorizonResponse.java @@ -0,0 +1,30 @@ +// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.vespa.hosted.controller.api.integration.horizon; + +import java.io.InputStream; + +/** + * @author valerijf + */ +public class HorizonResponse { + + private final int code; + private final InputStream inputStream; + + public HorizonResponse(int code, InputStream inputStream) { + this.code = code; + this.inputStream = inputStream; + } + + public int code() { + return code; + } + + public InputStream inputStream() { + return inputStream; + } + + public static HorizonResponse empty() { + return new HorizonResponse(200, InputStream.nullInputStream()); + } +} |