Class: Couchbase::Management::CouchbaseRemoteAnalyticsLink

Inherits:
Object
  • Object
show all
Defined in:
lib/couchbase/management/analytics_index_manager.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, dataverse, hostname, username: nil, password: nil, encryption: EncryptionSettings.new) {|self| ... } ⇒ CouchbaseRemoteAnalyticsLink

Returns a new instance of CouchbaseRemoteAnalyticsLink.

Parameters:

  • name (String)

    the name of this link

  • dataverse (String)

    the dataverse this link belongs to

  • hostname (String)

    the hostname of the target Couchbase cluster

  • username (String, nil) (defaults to: nil)

    the username to use for authentication with the remote cluster. Optional if client-certificate authentication is being used.

  • password (String, nil) (defaults to: nil)

    the password to use for authentication with the remote cluster. Optional if client-certificate authentication is being used.

  • encryption (EncryptionSettings) (defaults to: EncryptionSettings.new)

    settings for connection encryption

Yield Parameters:

  • self (CouchbaseRemoteLink)


1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
# File 'lib/couchbase/management/analytics_index_manager.rb', line 1028

def initialize(name, dataverse, hostname,
               username: nil,
               password: nil,
               encryption: EncryptionSettings.new)
  @name = name
  @dataverse = dataverse
  @hostname = hostname
  @username = username
  @password = password
  @encryption = encryption
  yield self if block_given?
end

Instance Attribute Details

#dataverseString

Returns:

  • (String)


1012
1013
1014
# File 'lib/couchbase/management/analytics_index_manager.rb', line 1012

def dataverse
  @dataverse
end

#encryptionEncryptionSettings

Returns:



1016
1017
1018
# File 'lib/couchbase/management/analytics_index_manager.rb', line 1016

def encryption
  @encryption
end

#hostnameString

Returns:

  • (String)


1013
1014
1015
# File 'lib/couchbase/management/analytics_index_manager.rb', line 1013

def hostname
  @hostname
end

#nameString

Returns:

  • (String)


1011
1012
1013
# File 'lib/couchbase/management/analytics_index_manager.rb', line 1011

def name
  @name
end

#passwordString?

Returns:

  • (String, nil)


1015
1016
1017
# File 'lib/couchbase/management/analytics_index_manager.rb', line 1015

def password
  @password
end

#usernameString?

Returns:

  • (String, nil)


1014
1015
1016
# File 'lib/couchbase/management/analytics_index_manager.rb', line 1014

def username
  @username
end

Instance Method Details

#to_backendObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
# File 'lib/couchbase/management/analytics_index_manager.rb', line 1042

def to_backend
  {
    type: :couchbase,
    link_name: @name,
    dataverse: @dataverse,
    hostname: @hostname,
    username: @username,
    password: @password,
    encryption_level: @encryption.level,
    certificate: @encryption.certificate,
    client_certificate: @encryption.client_certificate,
    client_key: @encryption.client_key,
  }
end