Class: Serverless::LookupPath

Inherits:
Object
  • Object
show all
Defined in:
app/models/serverless/lookup_path.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(serverless_domain) ⇒ LookupPath

Returns a new instance of LookupPath.


12
13
14
# File 'app/models/serverless/lookup_path.rb', line 12

def initialize(serverless_domain)
  @serverless_domain = serverless_domain
end

Instance Attribute Details

#serverless_domainObject (readonly)

Returns the value of attribute serverless_domain


5
6
7
# File 'app/models/serverless/lookup_path.rb', line 5

def serverless_domain
  @serverless_domain
end

Instance Method Details

#sourceObject


16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'app/models/serverless/lookup_path.rb', line 16

def source
  {
    type: 'serverless',
    service: serverless_domain.knative_uri.host,
    cluster: {
      hostname: knative.hostname,
      address: knative.external_ip,
      port: 443,
      cert: certificate,
      key: key
    }
  }
end