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;
}
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;
}
Aggregations