info

package
v0.0.0-...-028a866 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConstStat      = "statistics" // stat
	ConstConfigs   = "configs"    // configs
	ConstLatencies = "latencies"  // latencies
	ConstMetadata  = "metadata"   // metadata
)

ASInfo top level map keys

View Source
const (
	ConfigServiceContext   = "service"
	ConfigNetworkContext   = "network"
	ConfigNamespaceContext = "namespaces"
	ConfigSetContext       = "sets"
	ConfigXDRContext       = "xdr"
	ConfigDCContext        = "dcs"
	ConfigSecurityContext  = "security"
	ConfigLoggingContext   = "logging"
	ConfigRacksContext     = "racks"
)

Aerospike Config Context

View Source
const (
	MetaBuild             = "asd_build"
	MetaVersion           = cmdMetaVersion
	MetaBuildOS           = cmdMetaBuildOS
	MetaNodeID            = cmdMetaNodeID
	MetaClusterName       = cmdMetaClusterName
	MetaService           = cmdMetaService
	MetaServices          = cmdMetaServices
	MetaServicesAlumni    = cmdMetaServicesAlumni
	MetaServicesAlternate = cmdMetaServicesAlternate
	MetaFeatures          = cmdMetaFeatures
	MetaEdition           = cmdMetaEdition
)

Aerospike Metadata Context

View Source
const (
	ConfigDCNames        = "dc_names"
	ConfigNamespaceNames = "namespace_names"
	ConfigLogIDs         = "log_ids"
)

Variables

View Source
var ErrConnNotAuthenticated = fmt.Errorf("connection not authenticated")

ErrConnNotAuthenticated specifies that the connection is not authenticated.

View Source
var ErrInvalidDC = fmt.Errorf("invalid dc")

ErrInvalidDC specifies that the dc is invalid on the cluster.

View Source
var ErrInvalidNamespace = fmt.Errorf("invalid namespace")

ErrInvalidNamespace specifies that the namespace is invalid on the cluster.

Functions

func GetDCNamesCmd

func GetDCNamesCmd() string

GetDCNamesCmd returns the command to get DC namespace

func GetLogNamesCmd

func GetLogNamesCmd() string

GetLogNamesCmd returns the command to get log names

func GetNamespaceNamesCmd

func GetNamespaceNamesCmd() string

GetNamespaceNamesCmd returns the command to get namespace names

func GetSetNamesCmd

func GetSetNamesCmd() string

GetSetNamesCmd returns the command to get set names

func GetSindexNamesCmd

func GetSindexNamesCmd() string

GetSindexNamesCmd returns the command to get sindex names

func GetTLSNamesCmd

func GetTLSNamesCmd() string

GetTLSNamesCmd returns the command to get TLS names

func ParseDCNames

func ParseDCNames(m map[string]string) []string

ParseDCNames parses all DC names

func ParseIntoMap

func ParseIntoMap(str, del, sep string) lib.Stats

func ParseLogNames

func ParseLogNames(m map[string]string) []string

ParseLogNames parses all log names

func ParseNamespaceNames

func ParseNamespaceNames(m map[string]string) []string

ParseNamespaceNames parses all namespace names

func ParseSetNames

func ParseSetNames(m map[string]string, ns string) []string

ParseSetNames parses all set names for namespace

func ParseSindexNames

func ParseSindexNames(m map[string]string, ns string) []string

ParseSindexNames parses all sindex names for namespace

func ParseTLSNames

func ParseTLSNames(m map[string]string) []string

ParseTLSNames parses all TLS names

Types

type AsInfo

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

AsInfo provides info calls on an aerospike cluster.

func NewAsInfo

func NewAsInfo(log logr.Logger, h *aero.Host, cp *aero.ClientPolicy) *AsInfo

func NewAsInfoWithConnFactory

func NewAsInfoWithConnFactory(
	log logr.Logger, h *aero.Host, cp *aero.ClientPolicy, connFact ConnectionFactory,
) *AsInfo

func (*AsInfo) AllConfigs

func (info *AsInfo) AllConfigs() (lib.Stats, error)

AllConfigs returns all the dynamic configurations of the node.

The returned map can be converted to asconfig.Conf.

func (*AsInfo) Close

func (info *AsInfo) Close() error

Close closes all the connections to the system.

func (*AsInfo) GetAsConfig

func (info *AsInfo) GetAsConfig(contextList ...string) (lib.Stats, error)

GetAsConfig function fetch and parse config data for given context from given host Input: cmdList - Options [service, network, namespace, xdr, dc, security, logging]

func (*AsInfo) GetAsInfo

func (info *AsInfo) GetAsInfo(cmdList ...string) (NodeAsStats, error)

GetAsInfo function fetch and parse data for given commands from given host Input: cmdList - Options [statistics, configs, metadata, latencies]

func (*AsInfo) RequestInfo

func (info *AsInfo) RequestInfo(cmd ...string) (
	result map[string]string, err error,
)

RequestInfo get aerospike info

type ClusterAsStat

type ClusterAsStat = lib.Stats

type Connection

type Connection interface {
	IsConnected() bool
	Login(*aero.ClientPolicy) aero.Error
	SetTimeout(time.Time, time.Duration) aero.Error
	RequestInfo(...string) (map[string]string, aero.Error)
	Close()
}

type ConnectionFactory

type ConnectionFactory interface {
	NewConnection(*aero.ClientPolicy, *aero.Host) (Connection, aero.Error)
}

type NodeAsStats

type NodeAsStats = lib.Stats

Jump to

Keyboard shortcuts

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