ecsclient

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2019 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EcsClient

type EcsClient struct {
	UserName       string
	Password       string
	AuthToken      string
	ClusterAddress string

	EcsVersion string
	ErrorCount float64
	// contains filtered or unexported fields
}

EcsClient is used to persist connection to an ECS Cluster

func (*EcsClient) CallECSAPI

func (c *EcsClient) CallECSAPI(request string) (response string, err error)

func (*EcsClient) Logout

func (c *EcsClient) Logout() error

Logout closes out the connection to ECS when we are done. if we dont log out we use up all of the available login tokens

func (*EcsClient) RetrieveAuthToken

func (c *EcsClient) RetrieveAuthToken() (authToken string, err error)

RetrieveAuthToken and store as part of the client struct for future use

func (*EcsClient) RetrieveClusterState

func (c *EcsClient) RetrieveClusterState() (EcsClusterState, error)

RetrieveClusterState will return a struct containing the state of the ECS cluster on query

func (*EcsClient) RetrieveNodeCount

func (c *EcsClient) RetrieveNodeCount() int

RetrieveNodeCount returns number of nodes found in the cluster since the "nodeList" is private

func (*EcsClient) RetrieveNodeInfo

func (c *EcsClient) RetrieveNodeInfo()

RetrieveNodeInfo will retrieve a list of individual nodes in the cluster this is used to pull DTstats later on

func (*EcsClient) RetrieveNodeStateParallel

func (c *EcsClient) RetrieveNodeStateParallel() []NodeState

RetrieveNodeStateParallel pulls all the dtstate from nodes in the cluster all at once

func (*EcsClient) RetrieveReplState

func (c *EcsClient) RetrieveReplState() (EcsReplState, error)

RetrieveReplState will return a struct containing the state of the ECS cluster on query

type EcsClusterState

type EcsClusterState struct {
	NumBadDisks                           float64
	NumNodes                              float64
	NumBadNodes                           float64
	NumGoodDisks                          float64
	NumGoodNodes                          float64
	VdcName                               string
	AlertsNumUnackCritical                float64
	AlertsNumUnackError                   float64
	AlertsNumUnackInfo                    float64
	AlertsNumUnackWarning                 float64
	DiskSpaceFree                         float64
	DiskSpaceTotal                        float64
	DiskSpaceAllocated                    float64
	TransactionErrorsTotal                float64
	TransactionSuccessTotal               float64
	TransactionReadLatency                float64
	TransactionWriteLatency               float64
	TransactionReadTransactionsPerSecond  float64
	TransactionWriteTransactionsPerSecond float64
	TransactionWriteBandwidthCurrent      float64
	TransactionReadBandwidthCurrent       float64
}

type EcsReplState

type EcsReplState struct {
	RgName                                   string
	ReplicationIngressTraffic                float64
	ReplicationEgressTraffic                 float64
	ChunksRepoPendingReplicationTotalSize    float64
	ChunksJournalPendingReplicationTotalSize float64
	ChunksPendingXorTotalSize                float64
	ReplicationRpoTimestamp                  float64
}

type NodeState

type NodeState struct {
	TotalDTnum        float64 `xml:"entry>total_dt_num"`
	UnreadyDTnum      float64 `xml:"entry>unready_dt_num"`
	UnknownDTnum      float64 `xml:"entry>unknown_dt_num"`
	NodeIP            string
	ActiveConnections float64 `xml:"entry>load_factor"`
}

Jump to

Keyboard shortcuts

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