Sha256: e337012951b3ce4b09660137b8f4865d9342c68fc72cd9070517aee07f35005e

Contents?: true

Size: 1.11 KB

Versions: 36

Compression:

Stored size: 1.11 KB

Contents

# frozen_string_literal: true

module Hako
  class Scheduler
    class ValidationError < Error
    end

    # @param [String] app_id
    # @param [Hash] options
    # @param [Hash] volumes
    # @param [Array<Script>] scripts
    # @param [Boolean] dry_run
    # @param [Boolean] force
    # @param [Integer] timeout in seconds
    def initialize(app_id, options, volumes:, scripts:, dry_run:, force:, timeout:)
      @app_id = app_id
      @volumes = volumes
      @scripts = scripts
      @dry_run = dry_run
      @force = force
      @timeout = timeout
      configure(options)
    end

    # @param [Hash] _options
    def configure(_options); end

    # @param [Hash<String, Container>] _containers
    def deploy(_containers)
      raise NotImplementedError
    end

    def rollback
      raise NotImplementedError
    end

    def status
      raise NotImplementedError
    end

    def remove
      raise NotImplementedError
    end

    def stop
      raise NotImplementedError
    end

    private

    # @param [String] message
    def validation_error!(message)
      raise ValidationError.new(message)
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
hako-2.17.0 lib/hako/scheduler.rb
hako-2.16.0 lib/hako/scheduler.rb
hako-2.15.1 lib/hako/scheduler.rb
hako-2.15.0 lib/hako/scheduler.rb
hako-2.14.0 lib/hako/scheduler.rb
hako-2.13.0 lib/hako/scheduler.rb
hako-2.12.0 lib/hako/scheduler.rb
hako-2.11.1 lib/hako/scheduler.rb
hako-2.11.0 lib/hako/scheduler.rb
hako-2.10.0 lib/hako/scheduler.rb
hako-2.9.2 lib/hako/scheduler.rb
hako-2.9.1 lib/hako/scheduler.rb
hako-2.9.0 lib/hako/scheduler.rb
hako-2.8.0 lib/hako/scheduler.rb
hako-2.7.0 lib/hako/scheduler.rb
hako-2.6.2 lib/hako/scheduler.rb
hako-2.6.1 lib/hako/scheduler.rb
hako-2.6.0 lib/hako/scheduler.rb
hako-2.5.1 lib/hako/scheduler.rb
hako-2.5.0 lib/hako/scheduler.rb