client

package
v0.15.2 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MemberStateLeader          string = "leader"
	MemberStateFollower        string = "follower"
	MemberStateReadOnlyReplica string = "readonlyreplica"
	MemberStateClone           string = "clone"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DiskIoStats added in v0.11.0

type DiskIoStats struct {
	ReadBytes    int64 `json:"readBytes"`
	WrittenBytes int64 `json:"writtenBytes"`
	ReadOps      int64 `json:"readOps"`
	WriteOps     int64 `json:"writeOps"`
}

type DriveStats added in v0.11.0

type DriveStats struct {
	TotalBytes     int64 `json:"totalBytes"`
	AvailableBytes int64 `json:"availableBytes"`
}

type EsInfo added in v0.15.1

type EsInfo struct {
	EsVersion   EventStoreVersion `json:"esVersion"`
	MemberState string            `json:"state"`
	Features    Features          `json:"features"`
}

type EsStats added in v0.15.1

type EsStats struct {
	Queues map[string]QueueStats `json:"queue"`
}

type EventPosition added in v0.15.1

type EventPosition string

func (EventPosition) ParseCommitPreparePosition added in v0.15.1

func (position EventPosition) ParseCommitPreparePosition() (commit int64, prepare int64, err error)

parseEventPosition extracts commit and prepare position from strings like "C:1234/P:5678"

type EventStoreStatsClient

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

func New

func New(config *config.Config) *EventStoreStatsClient

func (*EventStoreStatsClient) GetEsInfo added in v0.15.1

func (client *EventStoreStatsClient) GetEsInfo(ctx context.Context) (*EsInfo, error)

func (*EventStoreStatsClient) GetStats

func (client *EventStoreStatsClient) GetStats(ctx context.Context) (*Stats, error)

type EventStoreVersion

type EventStoreVersion string

func (EventStoreVersion) IsAtLeastVersion

func (esVersion EventStoreVersion) IsAtLeastVersion(minVersion string) bool

func (EventStoreVersion) IsVersionLowerThan

func (esVersion EventStoreVersion) IsVersionLowerThan(maxVersion string) bool

type Features added in v0.15.1

type Features struct {
	Projections    bool `json:"projections"`
	UserManagement bool `json:"userManagement"`
	AtomPub        bool `json:"atomPub"`
}

type MemberStats added in v0.11.0

type MemberStats struct {
	HTTPEndpointIP   string `json:"httpEndPointIp"`
	HTTPEndpointPort int    `json:"httpEndPointPort"`
	IsAlive          bool
}

type ProcessStats added in v0.11.0

type ProcessStats struct {
	CPU         float64     `json:"cpu"`
	MemoryBytes int64       `json:"mem"`
	DiskIo      DiskIoStats `json:"diskIo"`
	TCP         TCPStats    `json:"tcp"`
}

type ProjectionStats added in v0.11.0

type ProjectionStats struct {
	EffectiveName               string  `json:"effectiveName"`
	Status                      string  `json:"status"`
	Progress                    float64 `json:"progress"`
	EventsProcessedAfterRestart int64   `json:"eventsProcessedAfterRestart"`
}

type QueueStats added in v0.11.0

type QueueStats struct {
	QueueName      string `json:"queueName"`
	Length         int64  `json:"length"`
	ItemsProcessed int64  `json:"totalItemsProcessed"`
}

type ServerStats added in v0.15.1

type ServerStats struct {
	Process ProcessStats `json:"proc"`
	System  SystemStats  `json:"sys"`
	Es      EsStats      `json:"es"`
}

type Stats

type Stats struct {
	Info           *EsInfo
	Server         *ServerStats
	ClusterMembers []MemberStats
	Projections    []ProjectionStats
	Subscriptions  []SubscriptionStats
	Streams        []StreamStats
	TCPConnections []TCPConnectionStats
}

type StreamStats added in v0.11.0

type StreamStats struct {
	EventStreamID      string
	LastCommitPosition int64
	LastEventNumber    int64
}

type SubscriptionStats added in v0.11.0

type SubscriptionStats struct {
	EventStreamID                   string `json:"eventStreamId"`
	GroupName                       string `json:"groupName"`
	TotalItemsProcessed             int64  `json:"totalItemsProcessed"`
	ConnectionCount                 int64  `json:"connectionCount"`
	LastKnownEventNumber            int64  `json:"lastKnownEventNumber"`
	LastProcessedEventNumber        int64  `json:"lastProcessedEventNumber"`
	LastCheckpointedEventPosition   string `json:"lastCheckpointedEventPosition"`
	LastKnownEventPosition          string `json:"lastKnownEventPosition"`
	TotalInFlightMessages           int64  `json:"totalInFlightMessages"`
	TotalNumberOfParkedMessages     int64
	OldestParkedMessageAgeInSeconds float64
}

type SystemStats added in v0.15.1

type SystemStats struct {
	Drives map[string]DriveStats `json:"drive"`
}

type TCPConnectionStats added in v0.15.2

type TCPConnectionStats struct {
	RemoteEndPoint       string `json:"remoteEndPoint"`
	LocalEndPoint        string `json:"localEndPoint"`
	ConnectionID         string `json:"connectionId"`
	ClientConnectionName string `json:"clientConnectionName"`
	TotalBytesSent       int64  `json:"totalBytesSent"`
	TotalBytesReceived   int64  `json:"totalBytesReceived"`
	PendingSendBytes     int64  `json:"pendingSendBytes"`
	PendingReceivedBytes int64  `json:"pendingReceivedBytes"`
	IsExternalConnection bool   `json:"isExternalConnection"`
	IsSslConnection      bool   `json:"isSslConnection"`
}

type TCPStats added in v0.15.2

type TCPStats struct {
	SentBytes     int64 `json:"sentBytesTotal"`
	ReceivedBytes int64 `json:"receivedBytesTotal"`
	Connections   int64 `json:"connections"`
}

Jump to

Keyboard shortcuts

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