Documentation
¶
Overview ¶
* Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. *
Index ¶
- Constants
- type ClusterHandler
- func (handler *ClusterHandler) Create(c *gin.Context)
- func (handler *ClusterHandler) Get(c *gin.Context)
- func (handler *ClusterHandler) Import(c *gin.Context)
- func (handler *ClusterHandler) List(c *gin.Context)
- func (handler *ClusterHandler) MigrateSlot(c *gin.Context)
- func (handler *ClusterHandler) Remove(c *gin.Context)
- type CreateClusterRequest
- type CreateShardRequest
- type Handler
- type MemberRequest
- type MigrateSlotRequest
- type NamespaceHandler
- type NodeHandler
- type RaftHandler
- type ShardHandler
- type SlotsRequest
Constants ¶
const ( OperationAdd = "add" OperationRemove = "remove" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterHandler ¶
type ClusterHandler struct {
// contains filtered or unexported fields
}
func (*ClusterHandler) Create ¶
func (handler *ClusterHandler) Create(c *gin.Context)
func (*ClusterHandler) Get ¶
func (handler *ClusterHandler) Get(c *gin.Context)
func (*ClusterHandler) Import ¶
func (handler *ClusterHandler) Import(c *gin.Context)
func (*ClusterHandler) List ¶
func (handler *ClusterHandler) List(c *gin.Context)
func (*ClusterHandler) MigrateSlot ¶
func (handler *ClusterHandler) MigrateSlot(c *gin.Context)
func (*ClusterHandler) Remove ¶
func (handler *ClusterHandler) Remove(c *gin.Context)
type CreateClusterRequest ¶
type CreateShardRequest ¶
type CreateShardRequest struct { Master *store.ClusterNode `json:"master"` Slaves []store.ClusterNode `json:"slaves"` }
type Handler ¶
type Handler struct { Namespace *NamespaceHandler Cluster *ClusterHandler Shard *ShardHandler Node *NodeHandler Raft *RaftHandler }
func NewHandler ¶
func NewHandler(s *store.ClusterStore) *Handler
type MemberRequest ¶ added in v1.1.0
type MigrateSlotRequest ¶
type NamespaceHandler ¶
type NamespaceHandler struct {
// contains filtered or unexported fields
}
func (*NamespaceHandler) Create ¶
func (handler *NamespaceHandler) Create(c *gin.Context)
func (*NamespaceHandler) Exists ¶
func (handler *NamespaceHandler) Exists(c *gin.Context)
func (*NamespaceHandler) List ¶
func (handler *NamespaceHandler) List(c *gin.Context)
func (*NamespaceHandler) Remove ¶
func (handler *NamespaceHandler) Remove(c *gin.Context)
type NodeHandler ¶
type NodeHandler struct {
// contains filtered or unexported fields
}
func (*NodeHandler) Create ¶
func (handler *NodeHandler) Create(c *gin.Context)
func (*NodeHandler) List ¶
func (handler *NodeHandler) List(c *gin.Context)
func (*NodeHandler) Remove ¶
func (handler *NodeHandler) Remove(c *gin.Context)
type RaftHandler ¶ added in v1.1.0
type RaftHandler struct{}
func (*RaftHandler) ListPeers ¶ added in v1.1.0
func (handler *RaftHandler) ListPeers(c *gin.Context)
func (*RaftHandler) UpdatePeer ¶ added in v1.1.0
func (handler *RaftHandler) UpdatePeer(c *gin.Context)
type ShardHandler ¶
type ShardHandler struct {
// contains filtered or unexported fields
}
func (*ShardHandler) Create ¶
func (handler *ShardHandler) Create(c *gin.Context)
func (*ShardHandler) Failover ¶
func (handler *ShardHandler) Failover(c *gin.Context)
func (*ShardHandler) Get ¶
func (handler *ShardHandler) Get(c *gin.Context)
func (*ShardHandler) List ¶
func (handler *ShardHandler) List(c *gin.Context)
func (*ShardHandler) Remove ¶
func (handler *ShardHandler) Remove(c *gin.Context)
type SlotsRequest ¶
type SlotsRequest struct {
Slots []string `json:"slots" validate:"required"`
}