Documentation ¶
Index ¶
- Constants
- func HttpCheck(response *http.Response) error
- func HttpCheckReadBytes(response *http.Response) ([]byte, error)
- func RandBytes(n int64) []byte
- func RandStr(n int64) string
- func ReadAll(r io.Reader) (string, error)
- func StatusNok(code int) bool
- func StatusOk(code int) bool
- type Auditor
- type AutoRecovery
- func (b *AutoRecovery) AutoRecoveryStatus() (*AutoRecoveryStatus, error)
- func (b *AutoRecovery) Decommission(bookieId string) error
- func (b *AutoRecovery) ListUnderReplicatedLedger(reqData ListUnderReplicatedLedgerReqData) (*UnderReplicatedLedger, error)
- func (b *AutoRecovery) LostBookieRecoveryDelay(delaySeconds int64) error
- func (b *AutoRecovery) LostBookieRecoveryDelayByDefault() error
- func (b *AutoRecovery) RecoveryBookie(reqData RecoveryBookieReqData) error
- func (b *AutoRecovery) TriggerAudit() error
- func (b *AutoRecovery) WhoIsAuditor() (*Auditor, error)
- type AutoRecoveryStatus
- type BookieInfo
- type BookieStatus
- type Bookies
- func (b *Bookies) BookieInfo() (*BookieInfo, error)
- func (b *Bookies) ExpandStorage() error
- func (b *Bookies) ForceGc(forceMajor, forceMinor bool) error
- func (b *Bookies) GcStatusList() ([]*GarbageCollectionStatus, error)
- func (b *Bookies) GcSuspendStatus() (bool, bool, error)
- func (b *Bookies) IsInForceGc() (bool, error)
- func (b *Bookies) IsReadOnly() (bool, error)
- func (b *Bookies) IsReady() (bool, error)
- func (b *Bookies) LastLogMark() (*LastLogMark, error)
- func (b *Bookies) List() (map[string]*string, error)
- func (b *Bookies) ListBookieInfo() (map[string]string, error)
- func (b *Bookies) ListDiskFile() (*DiskFile, error)
- func (b *Bookies) ResumeGc(major, minor bool) error
- func (b *Bookies) SetReadOnly(readOnly bool) error
- func (b *Bookies) Status() (*BookieStatus, error)
- func (b *Bookies) SuspendGc(major, minor bool) error
- type BookkeeperAdmin
- type Config
- type Configs
- type DiskFile
- type GarbageCollectionStatus
- type Heartbeat
- type HeartbeatImpl
- type HttpClient
- type HttpClientImpl
- type LastLogMark
- type Ledgers
- type ListUnderReplicatedLedgerReqData
- type RecoveryBookieReqData
- type TestBookkeeper
- type UnderReplicatedLedger
Constants ¶
View Source
const ( // UrlPath for the Admin API UrlPath = "/api/v1" UrlConfig = UrlPath + "/config" UrlLedger = UrlPath + "/ledger" UrlBookie = UrlPath + "/bookie" UrlAutoRecovery = UrlPath + "/autorecovery" )
View Source
const ( UrlLedgerDelete = UrlLedger + "/delete" UrlLedgerList = UrlLedger + "/list" UrlLedgerMetadata = UrlLedger + "/metadata" UrlLedgerRead = UrlLedger + "/read" )
View Source
const ( UrlBookieList = UrlBookie + "/list_bookies" UrlBookieListInfo = UrlBookie + "/list_bookie_info" UrlBookieLastLogMark = UrlBookie + "/last_log_mark" UrlBookieListDiskFile = UrlBookie + "/list_disk_file" UrlBookieExpandStorage = UrlBookie + "/expand_storage" UrlBookieGc = UrlBookie + "/gc" UrlBookieGcSuspendCompaction = UrlBookie + "/gc/gc_suspend_compaction" UrlBookieGcResumeCompaction = UrlBookie + "/gc/gc_resume_compaction" UrlBookieGcDetails = UrlBookie + "/gc_details" UrlBookieState = UrlBookie + "/state" UrlBookieSanity = UrlBookie + "/sanity" UrlBookieStateReadOnly = UrlBookie + "/state/readonly" UrlBookieReady = UrlBookie + "/is_ready" UrlBookieInfo = UrlBookie + "/info" UrlBookieClusterInfo = UrlBookie + "/cluster_info" )
View Source
const ( UrlAutoRecoveryStatus = UrlAutoRecovery + "/status" UrlAutoRecoveryBookie = UrlAutoRecovery + "/bookie" UrlAutoRecoveryListUnderReplicatedLedger = UrlAutoRecovery + "/list_under_replicated_ledger" UrlAutoRecoveryWhoIsAuditor = UrlAutoRecovery + "/who_is_auditor" UrlAutoRecoveryTriggerAudit = UrlAutoRecovery + "/trigger_audit" UrlAutoRecoveryLostBookieRecoveryDelay = UrlAutoRecovery + "/lost_bookie_recovery_delay" UrlAutoRecoveryDecommission = UrlAutoRecovery + "/decommission" )
View Source
const UrlConfigServerConfig = UrlConfig + "/server_config"
View Source
const UrlHeartbeat = "/heartbeat"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AutoRecovery ¶
type AutoRecovery struct {
// contains filtered or unexported fields
}
func (*AutoRecovery) AutoRecoveryStatus ¶
func (b *AutoRecovery) AutoRecoveryStatus() (*AutoRecoveryStatus, error)
func (*AutoRecovery) Decommission ¶
func (b *AutoRecovery) Decommission(bookieId string) error
func (*AutoRecovery) ListUnderReplicatedLedger ¶
func (b *AutoRecovery) ListUnderReplicatedLedger(reqData ListUnderReplicatedLedgerReqData) ( *UnderReplicatedLedger, error)
func (*AutoRecovery) LostBookieRecoveryDelay ¶
func (b *AutoRecovery) LostBookieRecoveryDelay(delaySeconds int64) error
func (*AutoRecovery) LostBookieRecoveryDelayByDefault ¶
func (b *AutoRecovery) LostBookieRecoveryDelayByDefault() error
func (*AutoRecovery) RecoveryBookie ¶
func (b *AutoRecovery) RecoveryBookie(reqData RecoveryBookieReqData) error
func (*AutoRecovery) TriggerAudit ¶
func (b *AutoRecovery) TriggerAudit() error
func (*AutoRecovery) WhoIsAuditor ¶
func (b *AutoRecovery) WhoIsAuditor() (*Auditor, error)
type AutoRecoveryStatus ¶
type AutoRecoveryStatus struct {
Enabled bool `json:"enabled"`
}
type BookieInfo ¶
type BookieStatus ¶
type Bookies ¶
type Bookies struct {
// contains filtered or unexported fields
}
func (*Bookies) BookieInfo ¶
func (b *Bookies) BookieInfo() (*BookieInfo, error)
func (*Bookies) ExpandStorage ¶
func (*Bookies) GcStatusList ¶
func (b *Bookies) GcStatusList() ([]*GarbageCollectionStatus, error)
func (*Bookies) IsInForceGc ¶
func (*Bookies) IsReadOnly ¶
func (*Bookies) LastLogMark ¶
func (b *Bookies) LastLogMark() (*LastLogMark, error)
func (*Bookies) ListDiskFile ¶
func (*Bookies) SetReadOnly ¶
func (*Bookies) Status ¶
func (b *Bookies) Status() (*BookieStatus, error)
type BookkeeperAdmin ¶
type BookkeeperAdmin struct { Heartbeat Heartbeat AutoRecovery *AutoRecovery Bookies *Bookies Configs *Configs Ledgers *Ledgers // contains filtered or unexported fields }
func NewBookkeeperAdmin ¶
func NewBookkeeperAdmin(config Config) (*BookkeeperAdmin, error)
func NewDefaultBookkeeperAdmin ¶
func NewDefaultBookkeeperAdmin() (*BookkeeperAdmin, error)
func NewTestBookkeeperAdmin ¶
func NewTestBookkeeperAdmin(t *testing.T, port int) *BookkeeperAdmin
type Config ¶
type Config struct { // Host pulsar service address, default localhost Host string // Port pulsar service port, default 8080 Port int // TlsEnable enable tls, default false TlsEnable bool // TlsConfig tls config TlsConfig *tls.Config // ConnectionTimeout connect timeout, default 0, zero means no timeout ConnectionTimeout int64 // contains filtered or unexported fields }
type GarbageCollectionStatus ¶
type Heartbeat ¶
type Heartbeat interface { // Heartbeat Get heartbeat status for a specific bookie Heartbeat() (bool, error) }
Heartbeat bookie heartbeat api
func NewHeartbeat ¶
func NewHeartbeat(cli HttpClient) Heartbeat
type HeartbeatImpl ¶
type HeartbeatImpl struct {
// contains filtered or unexported fields
}
func (*HeartbeatImpl) Heartbeat ¶
func (h *HeartbeatImpl) Heartbeat() (bool, error)
Heartbeat Get heartbeat status for a specific bookie
type HttpClient ¶
type HttpClientImpl ¶
type HttpClientImpl struct {
// contains filtered or unexported fields
}
type LastLogMark ¶
type LastLogMark struct {
// contains filtered or unexported fields
}
type RecoveryBookieReqData ¶
type TestBookkeeper ¶
type TestBookkeeper struct {
// contains filtered or unexported fields
}
func (*TestBookkeeper) Close ¶
func (tb *TestBookkeeper) Close() error
type UnderReplicatedLedger ¶
type UnderReplicatedLedger struct {
Ledgers []int64 `json:"missingreplica,omitempty"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.