package ru.zetit.bridgeandjoins.crypto;

import ru.zetit.bridgeandjoins.crypto.v1.HealthRequest;
import ru.zetit.bridgeandjoins.crypto.v1.HealthResponse;

/** Хендлер Health: всегда ok=true с указанием активного провайдера. */
public final class HealthHandler {

    private static final String VERSION = "0.1.0";

    private final String provider;

    public HealthHandler(String provider) {
        this.provider = provider;
    }

    public HealthResponse handle(HealthRequest request) {
        return HealthResponse.newBuilder()
                .setOk(true)
                .setVersion(VERSION)
                .setProvider(provider)
                .build();
    }
}
