Documentation ¶
Index ¶
- Constants
- type APIEntry
- type BatchResult
- type ClusterEndpoint
- type ClusterFacade
- type ClusterOverview
- type InternalEntry
- type KubernetesEndpoint
- type LogDump
- type LogDumpEndpoint
- type LogEntry
- type LogSnapshot
- type PartitionsEndpoint
- type ProfilerEndpoint
- type PrometheusEndpoint
- type RelaySettingsPatch
- type RelayStatus
- type RelaysEndpoint
- type SitesEndpoint
- type Snapshot
- type SnapshotEndpoint
- type SyncEndpoint
Constants ¶
View Source
const ( SnapshotProcessing string = "processing" SnapshotFailed string = "failed" SnapshotComplete string = "completed" SnapshotMissing string = "missing" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchResult ¶
type BatchResult struct { // Number of replicas that the batch was successfully applied to NApplied uint64 `json:"nApplied"` // Number of replicas in the replica set for this site Replicas uint64 `json:"replicas"` // Was write quorum achieved Quorum bool Patch map[string]*SiblingSet `json:"patch"` }
type ClusterEndpoint ¶
type ClusterEndpoint struct {
ClusterFacade ClusterFacade
}
func (*ClusterEndpoint) Attach ¶
func (clusterEndpoint *ClusterEndpoint) Attach(router *mux.Router)
type ClusterFacade ¶
type ClusterFacade interface { AddNode(ctx context.Context, nodeConfig NodeConfig) error RemoveNode(ctx context.Context, nodeID uint64) error ReplaceNode(ctx context.Context, nodeID uint64, replacementNodeID uint64) error DecommissionPeer(nodeID uint64) error Decommission() error LocalNodeID() uint64 PeerAddress(nodeID uint64) PeerAddress AddRelay(ctx context.Context, relayID string) error RemoveRelay(ctx context.Context, relayID string) error MoveRelay(ctx context.Context, relayID string, siteID string) error AddSite(ctx context.Context, siteID string) error RemoveSite(ctx context.Context, siteID string) error Batch(siteID string, bucket string, updateBatch *UpdateBatch) (BatchResult, error) LocalBatch(partition uint64, siteID string, bucket string, updateBatch *UpdateBatch) (map[string]*SiblingSet, error) LocalMerge(partition uint64, siteID string, bucket string, patch map[string]*SiblingSet, broadcastToRelays bool) error Get(siteID string, bucket string, keys [][]byte) ([]*SiblingSet, error) LocalGet(partition uint64, siteID string, bucket string, keys [][]byte) ([]*SiblingSet, error) GetMatches(siteID string, bucket string, keys [][]byte) (SiblingSetIterator, error) LocalGetMatches(partition uint64, siteID string, bucket string, keys [][]byte) (SiblingSetIterator, error) AcceptRelayConnection(conn *websocket.Conn, header http.Header) ClusterNodes() []NodeConfig ClusterSettings() ClusterSettings PartitionDistribution() [][]uint64 TokenAssignments() []uint64 GetRelayStatus(ctx context.Context, relayID string) (RelayStatus, error) LocalGetRelayStatus(relayID string) (RelayStatus, error) LocalLogDump() (LogDump, error) ClusterSnapshot(ctx context.Context) (Snapshot, error) CheckLocalSnapshotStatus(snapshotId string) error WriteLocalSnapshot(snapshotId string, w io.Writer) error }
type ClusterOverview ¶
type InternalEntry ¶
func (*InternalEntry) ToAPIEntry ¶
func (entry *InternalEntry) ToAPIEntry() *APIEntry
type KubernetesEndpoint ¶
type KubernetesEndpoint struct { }
func (*KubernetesEndpoint) Attach ¶
func (kubernetesEndpoint *KubernetesEndpoint) Attach(router *mux.Router)
type LogDump ¶
type LogDump struct { BaseSnapshot LogSnapshot Entries []LogEntry CurrentSnapshot LogSnapshot }
type LogDumpEndpoint ¶
type LogDumpEndpoint struct {
ClusterFacade ClusterFacade
}
func (*LogDumpEndpoint) Attach ¶
func (logDumpEndpoint *LogDumpEndpoint) Attach(router *mux.Router)
type LogSnapshot ¶
type LogSnapshot struct { Index uint64 State ClusterState }
type PartitionsEndpoint ¶
type PartitionsEndpoint struct {
ClusterFacade ClusterFacade
}
func (*PartitionsEndpoint) Attach ¶
func (partitionsEndpoint *PartitionsEndpoint) Attach(router *mux.Router)
type ProfilerEndpoint ¶
type ProfilerEndpoint struct { }
func (*ProfilerEndpoint) Attach ¶
func (profiler *ProfilerEndpoint) Attach(router *mux.Router)
type PrometheusEndpoint ¶
type PrometheusEndpoint struct { }
func (*PrometheusEndpoint) Attach ¶
func (prometheusEndpoint *PrometheusEndpoint) Attach(router *mux.Router)
type RelaySettingsPatch ¶
type RelaySettingsPatch struct {
Site string `json:"site"`
}
type RelayStatus ¶
type RelaysEndpoint ¶
type RelaysEndpoint struct {
ClusterFacade ClusterFacade
}
func (*RelaysEndpoint) Attach ¶
func (relaysEndpoint *RelaysEndpoint) Attach(router *mux.Router)
type SitesEndpoint ¶
type SitesEndpoint struct {
ClusterFacade ClusterFacade
}
func (*SitesEndpoint) Attach ¶
func (sitesEndpoint *SitesEndpoint) Attach(outerRouter *mux.Router)
type SnapshotEndpoint ¶
type SnapshotEndpoint struct {
ClusterFacade ClusterFacade
}
func (*SnapshotEndpoint) Attach ¶
func (snapshotEndpoint *SnapshotEndpoint) Attach(router *mux.Router)
type SyncEndpoint ¶
type SyncEndpoint struct { ClusterFacade ClusterFacade Upgrader websocket.Upgrader }
func (*SyncEndpoint) Attach ¶
func (syncEndpoint *SyncEndpoint) Attach(router *mux.Router)
Click to show internal directories.
Click to hide internal directories.