Class: Barruun::Managers::Logging::Sink

Inherits:
Object
  • Object
show all
Includes:
Utils
Defined in:
lib/barruun/managers/logging/sink.rb

Instance Method Summary collapse

Methods included from Utils

#call, included, #initialize, #options_string

Instance Method Details

#createObject



10
11
12
# File 'lib/barruun/managers/logging/sink.rb', line 10

def create
  `gcloud logging sinks create #{@config.name} #{@config.destination} #{options_string(@config.options)}`
end

#exist?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/barruun/managers/logging/sink.rb', line 14

def exist?
  `gcloud logging sinks list --filter='name: #{@config.name}'`.include?(@config.name)
end