Documentation ¶
Index ¶
- Constants
- Variables
- func NewHandler(service *Service) *rpc.Router
- type Config
- type RaftConfig
- type Service
- func (s *Service) AdminDiskUpdate(c *rpc.Context)
- func (s *Service) AdminUpdateVolume(c *rpc.Context)
- func (s *Service) AdminUpdateVolumeUnit(c *rpc.Context)
- func (s *Service) Apply(data [][]byte, index uint64) error
- func (s *Service) ApplyMemberChange(cc raftserver.ConfChange, index uint64) error
- func (s *Service) ApplySnapshot(meta raftserver.SnapshotMeta, st raftserver.Snapshot) error
- func (s *Service) BidAlloc(c *rpc.Context)
- func (s *Service) ChunkReport(c *rpc.Context)
- func (s *Service) ChunkSetCompact(c *rpc.Context)
- func (s *Service) Close()
- func (s *Service) ConfigDelete(c *rpc.Context)
- func (s *Service) ConfigGet(c *rpc.Context)
- func (s *Service) ConfigSet(c *rpc.Context)
- func (s *Service) DiskAccess(c *rpc.Context)
- func (s *Service) DiskAdd(c *rpc.Context)
- func (s *Service) DiskDrop(c *rpc.Context)
- func (s *Service) DiskDropped(c *rpc.Context)
- func (s *Service) DiskDroppingList(c *rpc.Context)
- func (s *Service) DiskHeartbeat(c *rpc.Context)
- func (s *Service) DiskIdAlloc(c *rpc.Context)
- func (s *Service) DiskInfo(c *rpc.Context)
- func (s *Service) DiskList(c *rpc.Context)
- func (s *Service) DiskSet(c *rpc.Context)
- func (s *Service) Handler(w http.ResponseWriter, req *http.Request, ...)
- func (s *Service) KvDelete(c *rpc.Context)
- func (s *Service) KvGet(c *rpc.Context)
- func (s *Service) KvList(c *rpc.Context)
- func (s *Service) KvSet(c *rpc.Context)
- func (s *Service) LeaderChange(leader uint64, host string)
- func (s *Service) LeadershipTransfer(c *rpc.Context)
- func (s *Service) MemberAdd(c *rpc.Context)
- func (s *Service) MemberRemove(c *rpc.Context)
- func (s *Service) ServiceGet(c *rpc.Context)
- func (s *Service) ServiceHeartbeat(c *rpc.Context)
- func (s *Service) ServiceList(c *rpc.Context)
- func (s *Service) ServiceRegister(c *rpc.Context)
- func (s *Service) ServiceUnregister(c *rpc.Context)
- func (s *Service) Snapshot() (raftserver.Snapshot, error)
- func (s *Service) SnapshotDump(c *rpc.Context)
- func (s *Service) Stat(c *rpc.Context)
- func (s *Service) V2VolumeList(c *rpc.Context)
- func (s *Service) VolumeAlloc(c *rpc.Context)
- func (s *Service) VolumeAllocatedList(c *rpc.Context)
- func (s *Service) VolumeGet(c *rpc.Context)
- func (s *Service) VolumeList(c *rpc.Context)
- func (s *Service) VolumeLock(c *rpc.Context)
- func (s *Service) VolumeRetain(c *rpc.Context)
- func (s *Service) VolumeUnitAlloc(c *rpc.Context)
- func (s *Service) VolumeUnitList(c *rpc.Context)
- func (s *Service) VolumeUnitRelease(c *rpc.Context)
- func (s *Service) VolumeUnlock(c *rpc.Context)
- func (s *Service) VolumeUpdate(c *rpc.Context)
Constants ¶
View Source
const ( ServiceStatusNormal = 1 ServiceStatusSnapshot = 2 )
View Source
const ( NeedReadIndex = 1 NoNeedReadIndex = 2 )
View Source
const ( BidScopeName = "bid" MaxBidCount = 100000 DefaultChunkSize = 17179869184 DefaultVolumeReserveSize = 10485760 )
Variables ¶
View Source
var ( VolInconsistencyMetric = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Namespace: "blobstore", Subsystem: "clusterMgr", Name: "vol_inconsistent", Help: "volume status or vuid inconsistent", }, []string{"region", "cluster", "is_leader", "item"}, ) )
Functions ¶
func NewHandler ¶
Types ¶
type Config ¶
type Config struct { Region string `json:"region"` IDC []string `json:"idc"` ClusterID proto.ClusterID `json:"cluster_id"` Readonly bool `json:"readonly"` VolumeMgrConfig volumemgr.VolumeMgrConfig `json:"volume_mgr_config"` DBPath string `json:"db_path"` NormalDBPath string `json:"normal_db_path"` NormalDBOption kvstore.RocksDBOption `json:"normal_db_option"` KvDBPath string `json:"kv_db_path"` KvDBOption kvstore.RocksDBOption `json:"kv_db_option"` CodeModePolicies []codemode.Policy `json:"code_mode_policies"` ClusterCfg map[string]interface{} `json:"cluster_config"` RaftConfig RaftConfig `json:"raft_config"` DiskMgrConfig diskmgr.DiskMgrConfig `json:"disk_mgr_config"` ClusterReportIntervalS int `json:"cluster_report_interval_s"` ConsulAgentAddr string `json:"consul_agent_addr"` HeartbeatNotifyIntervalS int `json:"heartbeat_notify_interval_s"` MaxHeartbeatNotifyNum int `json:"max_heartbeat_notify_num"` ChunkSize uint64 `json:"chunk_size"` MetricReportIntervalM int `json:"metric_report_interval_m"` ConsistentCheckIntervalM int `json:"consistent_check_interval_m"` cmd.Config }
type RaftConfig ¶
type RaftConfig struct { RaftDBPath string `json:"raft_db_path"` RaftDBOption kvstore.RocksDBOption `json:"raft_db_option"` SnapshotPatchNum int `json:"snapshot_patch_num"` ServerConfig raftserver.Config `json:"server_config"` RaftNodeConfig base.RaftNodeConfig `json:"raft_node_config"` }
type Service ¶
type Service struct { ConfigMgr *configmgr.ConfigMgr ScopeMgr *scopemgr.ScopeMgr ServiceMgr *servicemgr.ServiceMgr // Note: DiskMgr should always list before volumeMgr // cause DiskMgr applier LoadData should be call first, or VolumeMgr LoadData may return error with disk not found DiskMgr *diskmgr.DiskMgr VolumeMgr *volumemgr.VolumeMgr KvMgr *kvmgr.KvMgr *Config // contains filtered or unexported fields }
func (*Service) AdminDiskUpdate ¶
func (*Service) AdminUpdateVolume ¶
func (*Service) AdminUpdateVolumeUnit ¶
func (*Service) ApplyMemberChange ¶
func (s *Service) ApplyMemberChange(cc raftserver.ConfChange, index uint64) error
func (*Service) ApplySnapshot ¶
func (s *Service) ApplySnapshot(meta raftserver.SnapshotMeta, st raftserver.Snapshot) error
func (*Service) ChunkReport ¶
func (*Service) ChunkSetCompact ¶
func (*Service) ConfigDelete ¶
func (*Service) DiskAccess ¶
func (*Service) DiskDropped ¶
func (*Service) DiskDroppingList ¶
func (*Service) DiskHeartbeat ¶
func (*Service) DiskIdAlloc ¶
func (*Service) Handler ¶
func (s *Service) Handler(w http.ResponseWriter, req *http.Request, f func(http.ResponseWriter, *http.Request))
func (*Service) LeaderChange ¶
func (*Service) LeadershipTransfer ¶
func (*Service) MemberRemove ¶
func (*Service) ServiceGet ¶
func (*Service) ServiceHeartbeat ¶
func (*Service) ServiceList ¶
func (*Service) ServiceRegister ¶
func (*Service) ServiceUnregister ¶
func (*Service) SnapshotDump ¶
SnapshotDump will dump all data using snapshot
func (*Service) V2VolumeList ¶
func (*Service) VolumeAlloc ¶
transport to primary and params check
func (*Service) VolumeAllocatedList ¶
func (*Service) VolumeList ¶
func (*Service) VolumeLock ¶
func (*Service) VolumeRetain ¶
func (*Service) VolumeUnitAlloc ¶
func (*Service) VolumeUnitList ¶
func (*Service) VolumeUnitRelease ¶
direct use blobnode client release chunk
func (*Service) VolumeUnlock ¶
func (*Service) VolumeUpdate ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.