package com.microservices.mon.k8s.domain;

import lombok.Getter;

@Getter
public enum SkywalkingMetricType {
    SERVICE_CPM("cpmFunction", "cpmVariable", "service_cpm"),
    SERVICE_SLA("slaFunction", "slaVariable", "service_sla"),
    SERVICE_RESP_TIME("respTimeFunction", "respTimeVariable", "service_resp_time");
    private final String functionName;
    private final String functionVariable;
    private final String metricKey;

    SkywalkingMetricType(String functionName, String functionVariable, String metricKey) {
        this.functionName = functionName;
        this.functionVariable = functionVariable;
        this.metricKey = metricKey;
    }
    public String getFunctionVariable(Integer index) {
        return this.functionVariable+index;
    }
    public String getFunctionName(Integer index) {
        return this.functionName+index;
    }
}
