asinfo

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AerospikeVersionSupportsSIndexContext = AerospikeVersion{6, 1, 0}
	AerospikeVersionSupportsBatchWrites   = AerospikeVersion{6, 0, 0}
)
View Source
var (
	ErrReplicationFactorZero = errors.New("replication factor is zero")
)

Functions

This section is empty.

Types

type AerospikeVersion

type AerospikeVersion struct {
	Major int
	Minor int
	Patch int
}

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 InfoClient

type InfoClient struct {
	// contains filtered or unexported fields
}

func NewInfoClientFromAerospike

func NewInfoClientFromAerospike(aeroClient aerospikeClient, policy *a.InfoPolicy, retryPolicy *models.RetryPolicy,
) *InfoClient

func (*InfoClient) BlockMRTWrites

func (ic *InfoClient) BlockMRTWrites(nodeName, namespace string) error

BlockMRTWrites blocks MRT writes on cluster.

func (*InfoClient) GetInfo

func (ic *InfoClient) GetInfo(names ...string) (map[string]string, error)

func (*InfoClient) GetNodesNames

func (ic *InfoClient) GetNodesNames() []string

GetNodesNames return list of active nodes names.

func (*InfoClient) GetRackNodes

func (ic *InfoClient) GetRackNodes(rackID int) ([]string, error)

GetRackNodes returns list of nodes by rack id.

func (*InfoClient) GetRecordCount

func (ic *InfoClient) GetRecordCount(namespace string, sets []string) (uint64, error)

GetRecordCount counts number of records in given namespace and sets.

func (*InfoClient) GetSIndexes

func (ic *InfoClient) GetSIndexes(namespace string) ([]*models.SIndex, error)

func (*InfoClient) GetService

func (ic *InfoClient) GetService(node string) (string, error)

GetService returns service name by node name.

func (*InfoClient) GetSetsList

func (ic *InfoClient) GetSetsList(namespace string) ([]string, error)

func (*InfoClient) GetStats

func (ic *InfoClient) GetStats(nodeName, dc, namespace string) (Stats, error)

GetStats requests node statistics like recoveries, lag, etc. returns Stats struct.

func (*InfoClient) GetUDFs

func (ic *InfoClient) GetUDFs() ([]*models.UDF, error)

func (*InfoClient) GetVersion

func (ic *InfoClient) GetVersion() (AerospikeVersion, error)

func (*InfoClient) StartXDR

func (ic *InfoClient) StartXDR(nodeName, dc, hostPort, namespace, rewind string, throughput int, forward bool) error

StartXDR creates xdr config and starts replication.

func (*InfoClient) StopXDR

func (ic *InfoClient) StopXDR(nodeName, dc string) error

StopXDR disable replication and remove xdr config.

func (*InfoClient) SupportsBatchWrite

func (ic *InfoClient) SupportsBatchWrite() (bool, error)

func (*InfoClient) UnBlockMRTWrites

func (ic *InfoClient) UnBlockMRTWrites(nodeName, namespace string) error

UnBlockMRTWrites unblocks MRT writes on cluster.

type Stats

type Stats struct {
	Lag               int64
	Recoveries        int64
	RecoveriesPending int64
}

Stats represent a result of get stats command. In the future, other fields can be added.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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