Documentation
¶
Index ¶
- Variables
- type AerospikeVersion
- type Client
- func (ic *Client) BlockMRTWrites(nodeName, namespace string) error
- func (ic *Client) GetDCsList() ([]string, error)
- func (ic *Client) GetInfo(names ...string) (map[string]string, error)
- func (ic *Client) GetNamespacesList() ([]string, error)
- func (ic *Client) GetNodesNames() []string
- func (ic *Client) GetRackNodes(rackID int) ([]string, error)
- func (ic *Client) GetRecordCount(namespace string, sets []string) (uint64, error)
- func (ic *Client) GetSIndexes(namespace string) ([]*models.SIndex, error)
- func (ic *Client) GetService(node string) (string, error)
- func (ic *Client) GetSetsList(namespace string) ([]string, error)
- func (ic *Client) GetStats(nodeName, dc, namespace string) (Stats, error)
- func (ic *Client) GetStatus() (string, error)
- func (ic *Client) GetUDFs() ([]*models.UDF, error)
- func (ic *Client) GetVersion() (AerospikeVersion, error)
- func (ic *Client) StartXDR(nodeName, dc, hostPort, namespace, rewind string, throughput int, forward bool) error
- func (ic *Client) StopXDR(nodeName, dc string) error
- func (ic *Client) SupportsBatchWrite() (bool, error)
- func (ic *Client) UnBlockMRTWrites(nodeName, namespace string) error
- type NodeGetter
- type Stats
Constants ¶
This section is empty.
Variables ¶
var ( AerospikeVersionSupportsSIndexContext = AerospikeVersion{6, 1, 0} AerospikeVersionSupportsBatchWrites = AerospikeVersion{6, 0, 0} // AerospikeVersionRecentInfoCommands after this version, all commands should use // `namespace` parameter instead of `ns` or `id`. AerospikeVersionRecentInfoCommands = AerospikeVersion{8, 1, 0} )
var (
ErrReplicationFactorZero = errors.New("replication factor is zero")
)
Functions ¶
This section is empty.
Types ¶
type AerospikeVersion ¶
func (AerospikeVersion) IsGreater ¶
func (av AerospikeVersion) IsGreater(other AerospikeVersion) bool
func (AerospikeVersion) IsGreaterOrEqual ¶
func (av AerospikeVersion) IsGreaterOrEqual(other AerospikeVersion) bool
func (AerospikeVersion) String ¶
func (av AerospikeVersion) String() string
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client manages asinfo interactions with an Aerospike cluster, handling policies, retry logic, and command operations.
func NewClient ¶
func NewClient( cluster NodeGetter, policy *a.InfoPolicy, retryPolicy *models.RetryPolicy, ) (*Client, error)
NewClient initializes and returns a new asinfo Client instance with the provided Aerospike client, policy, and retry policy.
func (*Client) BlockMRTWrites ¶
BlockMRTWrites blocks MRT writes on cluster.
func (*Client) GetDCsList ¶
GetDCsList returns list of XDR DCs.
func (*Client) GetNamespacesList ¶
GetNamespacesList returns list of namespaces.
func (*Client) GetNodesNames ¶
GetNodesNames return list of active nodes names.
func (*Client) GetRackNodes ¶
GetRackNodes returns list of nodes by rack id.
func (*Client) GetRecordCount ¶
GetRecordCount counts number of records in given namespace and sets.
func (*Client) GetSIndexes ¶
func (*Client) GetService ¶
GetService returns service name by node name.
func (*Client) GetStats ¶
GetStats requests node statistics like recoveries, lag, etc. returns Stats struct.
func (*Client) GetVersion ¶
func (ic *Client) GetVersion() (AerospikeVersion, error)
GetVersion returns lowest node version from cluster.
func (*Client) StartXDR ¶
func (ic *Client) StartXDR(nodeName, dc, hostPort, namespace, rewind string, throughput int, forward bool) error
StartXDR creates xdr config and starts replication.
func (*Client) SupportsBatchWrite ¶
func (*Client) UnBlockMRTWrites ¶
UnBlockMRTWrites unblocks MRT writes on cluster.