Class: Confluent::Kafka::CLISessionImpl

Inherits:
Object
  • Object
show all
Includes:
MintLogger, MintPress::Mixins::Properties
Defined in:
src/confluent-platform/lib/confluent-platform/cli.rb

Overview

Since:

  • 0.1.0

Properties (Read/Write)

  • #name ⇒ String (Default Value: self.class.to_s.gsub('::',''))
    Name of the Topic

    Property Attributes
    • defaultself.class.to_s.gsub('::','')
    
    
    40
    # File 'src/confluent-platform/lib/confluent-platform/cli.rb', line 40
    
    property :Name, type: String, default: self.class.to_s.gsub('::','')
  • #installation ⇒ Confluent::Kafka::Installation
    The Kafka installation associated with this object

    Property Attributes
    
    
    43
    # File 'src/confluent-platform/lib/confluent-platform/cli.rb', line 43
    
    property :installation, type: Confluent::Kafka::Installation
  • #host ⇒ MintPress::Infrastructure::Host (Default Value: Proc.new { r=nil if self.get_property(:installation) r = self.installation.host end r })
    If the user specifies transport, default to a new host with it, otherwise try java installation ... we'll raise exception if none of this stuff ends up resolving... why get_property? because parent may not be defined... getproperty wont exception, but self.xxx will!

    Property Attributes
    • requiredtrue
    • defaultProc.new { r=nil if self.get_property(:installation) r = self.installation.host end r }
    • no_backreftrue
    • paralleltrue
    • disposition:requires
    
    
    49
    50
    51
    52
    53
    54
    # File 'src/confluent-platform/lib/confluent-platform/cli.rb', line 49
    
    property :host, type: MintPress::Infrastructure::Host, required: true, default: Proc.new { r=nil
      if self.get_property(:installation)
        r = self.installation.host
      end
      r
    }, no_backref: true, parallel: true, disposition: :requires
  • #command_prefix ⇒ String (Default Value: "--")
    The prefix added to command e.g. topics.create will be translated to kafka-topics --create with command_prefix = '--'

    Property Attributes
    • default"--"
    
    
    77
    # File 'src/confluent-platform/lib/confluent-platform/cli.rb', line 77
    
    property :command_prefix, type: String, default: "--"
  • #arg_underscore_xform ⇒ String (Default Value: "_")
    Argument underscores transformed to character

    Property Attributes
    • default"_"
    
    
    80
    # File 'src/confluent-platform/lib/confluent-platform/cli.rb', line 80
    
    property :arg_underscore_xform, type: String, default: "_"
  • #command_underscore_xform ⇒ String (Default Value: "-")
    Command underscores transformed to character

    Property Attributes
    • default"-"
    
    
    83
    # File 'src/confluent-platform/lib/confluent-platform/cli.rb', line 83
    
    property :command_underscore_xform, type: String, default: "-"
  • #arg_prefix ⇒ String (Default Value: "--")
    The prefix added to any arguments e.g. topics.create(topic: "foo") will be translated to kafka-topics --create --topic foo with arg_prefix = '--'

    Property Attributes
    • default"--"
    
    
    87
    # File 'src/confluent-platform/lib/confluent-platform/cli.rb', line 87
    
    property :arg_prefix, type: String, default: "--"
  • #arg_separator ⇒ String (Default Value: " ")

    Property Attributes
    • default" "
    
    
    88
    # File 'src/confluent-platform/lib/confluent-platform/cli.rb', line 88
    
    property :arg_separator, type: String, default: " "
  • #env ⇒ Hash (Default Value: {})
    Added to environment variables on transport

    Property Attributes
    • default{}
    
    
    91
    # File 'src/confluent-platform/lib/confluent-platform/cli.rb', line 91
    
    property :env, type: Hash, default: {}
  • #cmdline_init ⇒ String (Default Value: "stty -echo ; ")
    Command line init command. Pre-prended to the start of any command

    Property Attributes
    • default"stty -echo ; "
    
    
    94
    # File 'src/confluent-platform/lib/confluent-platform/cli.rb', line 94
    
    property :cmdline_init, type: String, default: "stty -echo ; "
  • #cli ⇒ String

    Property Attributes
    • requiredtrue
    
    
    96
    # File 'src/confluent-platform/lib/confluent-platform/cli.rb', line 96
    
    property :cli, type: String, required: true

Properties (Read Only)

Constant Summary

Constants included from MintLogger

MintLogger::DEBUG, MintLogger::ERROR, MintLogger::FATAL, MintLogger::INFO, MintLogger::UNKNOWN, MintLogger::VERBOSE, MintLogger::WARN

Instance Attribute Summary

Attributes included from MintPress::Mixins::Properties

#autopush_set_cache, #dynamic_create, #harvest_on_access, #harvest_undefined_only, #harvested, #tree_root

Instance Method Summary collapse

Methods included from MintPress::Mixins::Properties

#[], #[]=, #add_validate_report_result, #armour_set_property, #array_contains?, #array_is_a?, #check_autopush, #check_stack_overflow, #clone_property_object, #cloner_handle_single_property, #coerce_single, #contains_as_string?, #display_validate_report_result, #double_initialize?, #dump_to_hash, #find_parent, #find_parent_by_identity, #generate_accessor_functions, #get_canonical_renamed, #get_from_opts, #get_my_name, #get_property, #get_property_item, #has?, included, #initialize_validate_report, #inspect, #is_cloned_object?, #is_mintpress_object?, #is_probably_canonical?, #is_set?, #local_debug, #local_info, #local_verbose, #mintpress_property_definitions, #place_object_by_identity, #process_properties, #prop_set?, #property, #property_definitions, #property_details, #property_is_simple_object?, #push_root!, #require_property, #require_update, #retrieve_docstring, #sanitize, #set_map_dirty, #set_property, #set_property_item, #show_short_array, #strip_defaults!, #synchronize, #uncloned_property_definitions, #update_map, #validate, #validate_generic, #validate_properties, #validate_property, #validate_required, #version_allowed?, #weakref

Methods included from MintLogger::Utils::Common

#boolean_val, #has_value?, #no_value?, #nvl, #path_as_symbol, #ruby_level_to_send

Constructor Details

#initialize(opts = {}) ⇒ CLISessionImpl

Returns a new instance of CLISessionImpl.

Since:

  • 0.1.0

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(sym, *args, &block) ⇒ Object

Since:

  • 0.1.0

Instance Method Details

#cli_runner(command:, args:, block: nil) ⇒ Object

Since:

  • 0.1.0

#find_binary(cli, kafka_home) ⇒ Object

Since:

  • 0.1.0