Documentation
¶
Index ¶
- func ClusterAddHandler(log *nlog.Log, neoha *server.Server) rest.HandlerFunc
- func ClusterConfigGetHandler(log *nlog.Log, neoha *server.Server) rest.HandlerFunc
- func ClusterConfigPutHandler(log *nlog.Log, neoha *server.Server) rest.HandlerFunc
- func ClusterGetHandler(log *nlog.Log, neoha *server.Server) rest.HandlerFunc
- func ClusterLeaderGetHandler(log *nlog.Log, neoha *server.Server) rest.HandlerFunc
- func ClusterMembersGetHandler(log *nlog.Log, neoha *server.Server) rest.HandlerFunc
- func ClusterRemoveHandler(log *nlog.Log, neoha *server.Server) rest.HandlerFunc
- func DatabaseStatusGetHandler(log *nlog.Log, neoha *server.Server) rest.HandlerFunc
- func NeoHAPingHandler(log *nlog.Log, neoha *server.Server) rest.HandlerFunc
- func RaftDisableCheckSemiSyncHandler(log *nlog.Log, neoha *server.Server) rest.HandlerFunc
- func RaftDisableHandler(log *nlog.Log, neoha *server.Server) rest.HandlerFunc
- func RaftStatusHandler(log *nlog.Log, neoha *server.Server) rest.HandlerFunc
- func RaftTryToLeaderHandler(log *nlog.Log, neoha *server.Server) rest.HandlerFunc
- type ClusterLeaderResponse
- type ClusterMemberJSON
- type ClusterMembersResponse
- type ClusterSummary
- type DatabaseStatusResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClusterAddHandler ¶
func ClusterConfigGetHandler ¶ added in v0.3.0
ClusterConfigGetHandler returns the DCS cluster config document.
func ClusterConfigPutHandler ¶ added in v0.3.0
ClusterConfigPutHandler updates the DCS cluster config document.
func ClusterGetHandler ¶ added in v0.3.0
ClusterGetHandler returns local cluster identity (read-only).
func ClusterLeaderGetHandler ¶ added in v0.3.0
ClusterLeaderGetHandler returns the coordination leader snapshot.
func ClusterMembersGetHandler ¶ added in v0.3.0
ClusterMembersGetHandler returns members from Coordinator.ClusterView.
func ClusterRemoveHandler ¶
func DatabaseStatusGetHandler ¶ added in v0.3.0
DatabaseStatusGetHandler returns Driver.Status() for the local database.
func NeoHAPingHandler ¶
NeoHAPingHandler confirms the local agent is alive.
func RaftDisableCheckSemiSyncHandler ¶
RaftDisableCheckSemiSyncHandler disables semi-sync checks on the local Raft loop.
func RaftDisableHandler ¶
RaftDisableHandler transitions local Raft to IDLE.
func RaftStatusHandler ¶
RaftStatusHandler returns local Raft membership state.
func RaftTryToLeaderHandler ¶
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.