api

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterAPI

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

ClusterAPI provides cluster management endpoints

func NewClusterAPI

func NewClusterAPI(
	manager *cluster.Manager,
	membership *cluster.MembershipManager,
	topology *cluster.TopologyManager,
	quorum *cluster.QuorumManager,
	rebalance *cluster.RebalanceManager,
	logger forge.Logger,
) *ClusterAPI

NewClusterAPI creates a new cluster API

func (*ClusterAPI) AddNode

func (ca *ClusterAPI) AddNode(ctx forge.Context) error

AddNode adds a node to the cluster

func (*ClusterAPI) AnalyzeBalance

func (ca *ClusterAPI) AnalyzeBalance(ctx forge.Context) error

AnalyzeBalance analyzes cluster balance

func (*ClusterAPI) GetClusterHealth

func (ca *ClusterAPI) GetClusterHealth(ctx forge.Context) error

GetClusterHealth returns overall cluster health

func (*ClusterAPI) GetClusterSizeRecommendations

func (ca *ClusterAPI) GetClusterSizeRecommendations(ctx forge.Context) error

GetClusterSize recommendations

func (*ClusterAPI) GetClusterStatus

func (ca *ClusterAPI) GetClusterStatus(ctx forge.Context) error

GetClusterStatus returns cluster status

func (*ClusterAPI) GetMembershipChanges

func (ca *ClusterAPI) GetMembershipChanges(ctx forge.Context) error

GetMembershipChanges returns pending membership changes

func (*ClusterAPI) GetNode

func (ca *ClusterAPI) GetNode(ctx forge.Context) error

GetNode returns information about a specific node

func (*ClusterAPI) GetQuorumStatus

func (ca *ClusterAPI) GetQuorumStatus(ctx forge.Context) error

GetQuorumStatus returns quorum information

func (*ClusterAPI) GetTopology

func (ca *ClusterAPI) GetTopology(ctx forge.Context) error

GetTopology returns cluster topology

func (*ClusterAPI) ListNodes

func (ca *ClusterAPI) ListNodes(ctx forge.Context) error

ListNodes returns all cluster nodes

func (*ClusterAPI) Rebalance

func (ca *ClusterAPI) Rebalance(ctx forge.Context) error

Rebalance triggers cluster rebalancing

func (*ClusterAPI) RemoveNode

func (ca *ClusterAPI) RemoveNode(ctx forge.Context) error

RemoveNode removes a node from the cluster

func (*ClusterAPI) TransferLeadership

func (ca *ClusterAPI) TransferLeadership(ctx forge.Context) error

TransferLeadership initiates leadership transfer

func (*ClusterAPI) ValidateResilience

func (ca *ClusterAPI) ValidateResilience(ctx forge.Context) error

ValidateResilience validates cluster resilience

func (*ClusterAPI) ValidateTopology

func (ca *ClusterAPI) ValidateTopology(ctx forge.Context) error

ValidateTopology validates cluster topology

type ConfigAPI

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

ConfigAPI provides configuration management endpoints

func NewConfigAPI

func NewConfigAPI(config *internal.Config, logger forge.Logger) *ConfigAPI

NewConfigAPI creates a new config API

func (*ConfigAPI) GetConfig

func (ca *ConfigAPI) GetConfig(ctx forge.Context) error

GetConfig returns current configuration

func (*ConfigAPI) GetDiscoveryConfig

func (ca *ConfigAPI) GetDiscoveryConfig(ctx forge.Context) error

GetDiscoveryConfig returns discovery configuration

func (*ConfigAPI) GetObservabilityConfig

func (ca *ConfigAPI) GetObservabilityConfig(ctx forge.Context) error

GetObservabilityConfig returns observability configuration

func (*ConfigAPI) GetRaftConfig

func (ca *ConfigAPI) GetRaftConfig(ctx forge.Context) error

GetRaftConfig returns Raft-specific configuration

func (*ConfigAPI) GetStorageConfig

func (ca *ConfigAPI) GetStorageConfig(ctx forge.Context) error

GetStorageConfig returns storage configuration

func (*ConfigAPI) GetTransportConfig

func (ca *ConfigAPI) GetTransportConfig(ctx forge.Context) error

GetTransportConfig returns transport configuration

func (*ConfigAPI) UpdateConfig

func (ca *ConfigAPI) UpdateConfig(ctx forge.Context) error

UpdateConfig updates configuration (limited set of fields)

func (*ConfigAPI) ValidateConfig

func (ca *ConfigAPI) ValidateConfig(ctx forge.Context) error

ValidateConfig validates current configuration

type NodeAPI

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

NodeAPI provides node-specific endpoints

func NewNodeAPI

func NewNodeAPI(raftNode internal.RaftNode, manager *cluster.Manager, logger forge.Logger) *NodeAPI

NewNodeAPI creates a new node API

func (*NodeAPI) GetNodeInfo

func (na *NodeAPI) GetNodeInfo(ctx forge.Context) error

GetNodeInfo returns information about the local node

func (*NodeAPI) GetNodeMetrics

func (na *NodeAPI) GetNodeMetrics(ctx forge.Context) error

GetNodeMetrics returns node-specific metrics

func (*NodeAPI) GetNodePeers

func (na *NodeAPI) GetNodePeers(ctx forge.Context) error

GetNodePeers returns the node's view of peers

func (*NodeAPI) GetNodeStatus

func (na *NodeAPI) GetNodeStatus(ctx forge.Context) error

GetNodeStatus returns detailed node status

func (*NodeAPI) ProposeCommand

func (na *NodeAPI) ProposeCommand(ctx forge.Context) error

ProposeCommand proposes a command to the cluster

func (*NodeAPI) StepDown

func (na *NodeAPI) StepDown(ctx forge.Context) error

StepDown forces the leader to step down

type StatsAPI

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

StatsAPI provides statistics endpoints

func NewStatsAPI

func NewStatsAPI(
	raftNode internal.RaftNode,
	manager *cluster.Manager,
	metrics *observability.MetricsCollector,
	logger forge.Logger,
) *StatsAPI

NewStatsAPI creates a new stats API

func (*StatsAPI) GetClusterStats

func (sa *StatsAPI) GetClusterStats(ctx forge.Context) error

GetClusterStats returns cluster statistics

func (*StatsAPI) GetMetrics

func (sa *StatsAPI) GetMetrics(ctx forge.Context) error

GetMetrics returns metrics in Prometheus format

func (*StatsAPI) GetPerformanceStats

func (sa *StatsAPI) GetPerformanceStats(ctx forge.Context) error

GetPerformanceStats returns performance statistics

func (*StatsAPI) GetRaftStats

func (sa *StatsAPI) GetRaftStats(ctx forge.Context) error

GetRaftStats returns Raft-specific statistics

func (*StatsAPI) GetReplicationStats

func (sa *StatsAPI) GetReplicationStats(ctx forge.Context) error

GetReplicationStats returns replication statistics

func (*StatsAPI) GetStats

func (sa *StatsAPI) GetStats(ctx forge.Context) error

GetStats returns overall statistics

func (*StatsAPI) ResetMetrics

func (sa *StatsAPI) ResetMetrics(ctx forge.Context) error

ResetMetrics resets metrics counters

Jump to

Keyboard shortcuts

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