Search in sources :

Example 1 with GooglePubsub

use of com.netflix.spinnaker.halyard.config.model.v1.pubsub.google.GooglePubsub in project halyard by spinnaker.

the class PubsubService method setPubsub.

public void setPubsub(String deploymentName, Pubsub pubsub) {
    DeploymentConfiguration deploymentConfiguration = deploymentService.getDeploymentConfiguration(deploymentName);
    Pubsubs pubsubs = deploymentConfiguration.getPubsub();
    switch(pubsub.pubsubType()) {
        case GOOGLE:
            pubsubs.setGoogle((GooglePubsub) pubsub);
            break;
        default:
            throw new IllegalArgumentException("Unknown pubsub type " + pubsub.pubsubType());
    }
}
Also used : Pubsubs(com.netflix.spinnaker.halyard.config.model.v1.node.Pubsubs) DeploymentConfiguration(com.netflix.spinnaker.halyard.config.model.v1.node.DeploymentConfiguration)

Aggregations

DeploymentConfiguration (com.netflix.spinnaker.halyard.config.model.v1.node.DeploymentConfiguration)1 Pubsubs (com.netflix.spinnaker.halyard.config.model.v1.node.Pubsubs)1