v1

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClusterAddHandler

func ClusterAddHandler(log *nlog.Log, neoha *server.Server) rest.HandlerFunc

func ClusterConfigGetHandler added in v0.3.0

func ClusterConfigGetHandler(log *nlog.Log, neoha *server.Server) rest.HandlerFunc

ClusterConfigGetHandler returns the DCS cluster config document.

func ClusterConfigPutHandler added in v0.3.0

func ClusterConfigPutHandler(log *nlog.Log, neoha *server.Server) rest.HandlerFunc

ClusterConfigPutHandler updates the DCS cluster config document.

func ClusterGetHandler added in v0.3.0

func ClusterGetHandler(log *nlog.Log, neoha *server.Server) rest.HandlerFunc

ClusterGetHandler returns local cluster identity (read-only).

func ClusterLeaderGetHandler added in v0.3.0

func ClusterLeaderGetHandler(log *nlog.Log, neoha *server.Server) rest.HandlerFunc

ClusterLeaderGetHandler returns the coordination leader snapshot.

func ClusterMembersGetHandler added in v0.3.0

func ClusterMembersGetHandler(log *nlog.Log, neoha *server.Server) rest.HandlerFunc

ClusterMembersGetHandler returns members from Coordinator.ClusterView.

func ClusterRemoveHandler

func ClusterRemoveHandler(log *nlog.Log, neoha *server.Server) rest.HandlerFunc

func DatabaseStatusGetHandler added in v0.3.0

func DatabaseStatusGetHandler(log *nlog.Log, neoha *server.Server) rest.HandlerFunc

DatabaseStatusGetHandler returns Driver.Status() for the local database.

func NeoHAPingHandler

func NeoHAPingHandler(log *nlog.Log, neoha *server.Server) rest.HandlerFunc

NeoHAPingHandler confirms the local agent is alive.

func RaftDisableCheckSemiSyncHandler

func RaftDisableCheckSemiSyncHandler(log *nlog.Log, neoha *server.Server) rest.HandlerFunc

RaftDisableCheckSemiSyncHandler disables semi-sync checks on the local Raft loop.

func RaftDisableHandler

func RaftDisableHandler(log *nlog.Log, neoha *server.Server) rest.HandlerFunc

RaftDisableHandler transitions local Raft to IDLE.

func RaftStatusHandler

func RaftStatusHandler(log *nlog.Log, neoha *server.Server) rest.HandlerFunc

RaftStatusHandler returns local Raft membership state.

func RaftTryToLeaderHandler

func RaftTryToLeaderHandler(log *nlog.Log, neoha *server.Server) rest.HandlerFunc

RaftTryToLeaderHandler proposes this node as Raft leader.

Types

type ClusterLeaderResponse added in v0.3.0

type ClusterLeaderResponse struct {
	LeaderID       string                 `json:"leader_id"`
	LeaderDatabase coordinationDBEndpoint `json:"leader_database"`
	IsSelfLeader   bool                   `json:"is_self_leader"`
	Epoch          uint64                 `json:"epoch,omitempty"`
	ViewID         uint64                 `json:"view_id,omitempty"`
}

ClusterLeaderResponse describes the current coordination leader.

type ClusterMemberJSON added in v0.3.0

type ClusterMemberJSON struct {
	ID       string            `json:"id"`
	Name     string            `json:"name,omitempty"`
	Database string            `json:"database_type,omitempty"`
	Meta     map[string]string `json:"meta,omitempty"`
	Tags     map[string]bool   `json:"tags,omitempty"`
}

ClusterMemberJSON is a coordination member in REST responses.

type ClusterMembersResponse added in v0.3.0

type ClusterMembersResponse struct {
	Members []ClusterMemberJSON `json:"members"`
	Epoch   uint64              `json:"epoch,omitempty"`
	ViewID  uint64              `json:"view_id,omitempty"`
}

ClusterMembersResponse lists registered NeoHA members.

type ClusterSummary added in v0.3.0

type ClusterSummary struct {
	Scope                string          `json:"scope"`
	Name                 string          `json:"name"`
	Namespace            string          `json:"namespace"`
	Endpoint             string          `json:"endpoint"`
	DatabaseType         string          `json:"database_type"`
	CoordinationProvider string          `json:"coordination_provider"`
	RestConnectAddress   string          `json:"rest_connect_address"`
	Tags                 map[string]bool `json:"tags"`
}

ClusterSummary is the NeoHA-native read-only cluster identity (v0.3.0).

type DatabaseStatusResponse added in v0.3.0

type DatabaseStatusResponse struct {
	Engine    string `json:"engine"`
	Alive     bool   `json:"alive"`
	Writable  bool   `json:"writable"`
	Role      string `json:"role"`
	LastError string `json:"last_error,omitempty"`
}

DatabaseStatusResponse is the unified L4 health view for REST clients.

Jump to

Keyboard shortcuts

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