aerofactory

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Factory package. Aerospike DB hostname, port & client policy are assembled into DB client factory here.

Index

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL