Documentation ¶
Overview ¶
Factory package. Aerospike DB hostname, port & client policy are assembled into DB client factory here.
Index ¶
- type AerospikeClientFactory
- func (cf *AerospikeClientFactory) BuildClient() (*aerospike.Client, aerospike.Error)
- func (cf *AerospikeClientFactory) GetClientPolicy() *aerospike.ClientPolicy
- func (cf *AerospikeClientFactory) GetHostname() string
- func (cf *AerospikeClientFactory) GetNamespace() string
- func (cf *AerospikeClientFactory) GetPort() int
- func (cf *AerospikeClientFactory) SetAddress(hostname string, port int, namespace string)
- func (cf *AerospikeClientFactory) SetClientPolicy(policy *aerospike.ClientPolicy)
- func (cf *AerospikeClientFactory) SetHostname(hostname string)
- func (cf *AerospikeClientFactory) SetNamespace(namespace string)
- func (cf *AerospikeClientFactory) SetPort(port int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AerospikeClientFactory ¶
type AerospikeClientFactory struct {
// contains filtered or unexported fields
}
Serves for assembling hostname, port & aerospike.ClientPolicy for building aerospike.Client.
func (*AerospikeClientFactory) BuildClient ¶
func (cf *AerospikeClientFactory) BuildClient() (*aerospike.Client, aerospike.Error)
Builds Aerospike DB client aerospike.Client. If aerospike.ClientPolicy was parsed from [aerourl.AerospikeURL], client is created using aerospike.NewClientWithPolicy, otherwise it is created using aerospike.NewClient.
func (*AerospikeClientFactory) GetClientPolicy ¶
func (cf *AerospikeClientFactory) GetClientPolicy() *aerospike.ClientPolicy
Returns Aerospike DB client policy aerospike.ClientPolicy.
func (*AerospikeClientFactory) GetHostname ¶
func (cf *AerospikeClientFactory) GetHostname() string
Returns Aerospike DB hostname.
func (*AerospikeClientFactory) GetNamespace ¶
func (cf *AerospikeClientFactory) GetNamespace() string
Returns Aerospike DB namespace.
func (*AerospikeClientFactory) GetPort ¶
func (cf *AerospikeClientFactory) GetPort() int
Returns Aerospike DB port.
func (*AerospikeClientFactory) SetAddress ¶
func (cf *AerospikeClientFactory) SetAddress(hostname string, port int, namespace string)
func (*AerospikeClientFactory) SetClientPolicy ¶
func (cf *AerospikeClientFactory) SetClientPolicy(policy *aerospike.ClientPolicy)
Sets Aerospike DB client policy aerospike.ClientPolicy.
func (*AerospikeClientFactory) SetHostname ¶
func (cf *AerospikeClientFactory) SetHostname(hostname string)
Sets Aerospike DB hostname.
func (*AerospikeClientFactory) SetNamespace ¶
func (cf *AerospikeClientFactory) SetNamespace(namespace string)
Sets Aerospike DB namespace.
func (*AerospikeClientFactory) SetPort ¶
func (cf *AerospikeClientFactory) SetPort(port int)
Sets Aerospike DB port.