aboutsummaryrefslogtreecommitdiffstats
path: root/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/RunDataStore.java
blob: 36f94dc80f1e3b62863e74a435df527c4e63f248 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.controller.api.integration;

import com.yahoo.config.provision.ApplicationId;
import com.yahoo.vespa.hosted.controller.api.integration.deployment.RunId;

import java.io.InputStream;
import java.util.Optional;

/**
 * @author jonmv
 */
public interface RunDataStore {

    /** Returns the run logs of the given deployment job, if existent. */
    Optional<byte[]> get(RunId id);

    /** Stores the given log for the given deployment job. */
    void put(RunId id, byte[] log);

    /** Returns the test report og the given deployment job, if present */
    Optional<byte[]> getTestReport(RunId id);

    /** Stores the test report for the given deployment job */
    void putTestReport(RunId id, byte[] report);

    /** Deletes the run logs and test report for the given deployment job. */
    void delete(RunId id);

    /** Deletes all data associated with the given application. */
    void delete(ApplicationId id);

    /** Stores Vespa logs for the run. */
    void putLogs(RunId id, boolean tester, InputStream logs);

    /** Fetches Vespa logs for the run. */
    InputStream getLogs(RunId id, boolean tester);

}