Search in sources :

Example 1 with StackGresDistributedLogsCondition

use of io.stackgres.common.crd.sgdistributedlogs.StackGresDistributedLogsCondition in project stackgres by ongres.

the class DistributedLogsTransformer method getResourceStatus.

private DistributedLogsStatus getResourceStatus(StackGresDistributedLogsStatus source, List<String> clusters) {
    DistributedLogsStatus transformation = new DistributedLogsStatus();
    transformation.setClusters(clusters);
    if (source == null) {
        return transformation;
    }
    final List<StackGresDistributedLogsCondition> sourceConditions = source.getConditions();
    if (sourceConditions != null) {
        transformation.setConditions(sourceConditions.stream().map(this::getResourceCondition).collect(ImmutableList.toImmutableList()));
    }
    return transformation;
}
Also used : StackGresDistributedLogsCondition(io.stackgres.common.crd.sgdistributedlogs.StackGresDistributedLogsCondition) DistributedLogsStatus(io.stackgres.apiweb.dto.distributedlogs.DistributedLogsStatus) StackGresDistributedLogsStatus(io.stackgres.common.crd.sgdistributedlogs.StackGresDistributedLogsStatus)

Example 2 with StackGresDistributedLogsCondition

use of io.stackgres.common.crd.sgdistributedlogs.StackGresDistributedLogsCondition in project stackgres by ongres.

the class DistributedLogsTransformer method getResourceCondition.

private DistributedLogsCondition getResourceCondition(StackGresDistributedLogsCondition source) {
    DistributedLogsCondition transformation = new DistributedLogsCondition();
    transformation.setType(source.getType());
    transformation.setStatus(source.getStatus());
    transformation.setReason(source.getReason());
    transformation.setLastTransitionTime(source.getLastTransitionTime());
    transformation.setMessage(source.getMessage());
    return transformation;
}
Also used : DistributedLogsCondition(io.stackgres.apiweb.dto.distributedlogs.DistributedLogsCondition) StackGresDistributedLogsCondition(io.stackgres.common.crd.sgdistributedlogs.StackGresDistributedLogsCondition)

Aggregations

StackGresDistributedLogsCondition (io.stackgres.common.crd.sgdistributedlogs.StackGresDistributedLogsCondition)2 DistributedLogsCondition (io.stackgres.apiweb.dto.distributedlogs.DistributedLogsCondition)1 DistributedLogsStatus (io.stackgres.apiweb.dto.distributedlogs.DistributedLogsStatus)1 StackGresDistributedLogsStatus (io.stackgres.common.crd.sgdistributedlogs.StackGresDistributedLogsStatus)1