Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultWebServiceURL = "http://localhost:8080" DefaultHTTPTimeOutDuration = 5 * time.Minute )
Variables ¶
View Source
var ReleaseVersion = "None"
Functions ¶
This section is empty.
Types ¶
type AutoRecovery ¶ added in v0.3.0
type AutoRecovery interface {
// RecoverBookie is used to recovering ledger data for a failed bookie
RecoverBookie([]string, bool) error
// ListUnderReplicatedLedger is used to listing all the underreplicated ledgers
// which have been marked for rereplication
ListUnderReplicatedLedger(string, string) ([]int64, error)
// PrintListUnderReplicatedLedger is used to printing the replicate list of the replicated ledgers
PrintListUnderReplicatedLedger(string, string) (map[int64][]string, error)
// WhoIsAuditor is used to getting which bookie is the auditor
WhoIsAuditor() (string, error)
// TriggerAudit is used to triggering audit by resetting the lostBookieRecoveryDelay
TriggerAudit() error
// GetLostBookieRecoveryDelay is used to getting the lostBookieRecoveryDelay of a bookie
GetLostBookieRecoveryDelay() (string, error)
// SetLostBookieRecoveryDelay is used to setting the lastBookieRecoverDelay of a bookie
SetLostBookieRecoveryDelay(int) error
// Decommission is used to decommissioning a bookie
Decommission(string) error
}
type Bookie ¶ added in v0.3.0
type Bookie interface {
// LastLogMark gets the last log marker of a bookie
LastLogMark() (map[string]string, error)
// ListDiskFile gets all the files on disk of a bookie
ListDiskFile(bkdata.FileType) (map[string]string, error)
// ExpandStorage expands storage for a bookie
ExpandStorage() error
// GC triggers garbage collection for a bookie
GC() error
// GCStatus gets the garbage collection status
GCStatus() (map[string]string, error)
// GCDetails gets the garbage collection details
GCDetails() ([]bkdata.GCStatus, error)
// State gets the state of a bookie
State() (*bkdata.State, error)
}
type Client ¶
type Client interface {
// Bookie related commands
Bookie() Bookie
// Bookies related commands
Bookies() Bookies
// Ledger related commands
Ledger() Ledger
// AutoRecovery related commands
AutoRecovery() AutoRecovery
}
type Config ¶
type Config struct {
WebServiceURL string
HTTPTimeout time.Duration
APIVersion bkdata.APIVersion
}
Config is used to configure the bookKeeper admin client
type Ledger ¶
type Ledger interface {
// Delete the specified ledger
Delete(int64) error
// List all the ledgers and get the metadata
List(bool) (map[int64]string, error)
// Get the metadata of a ledger
Get(int64) (map[int64]bkdata.LedgerMetadata, error)
// Read a range of entries from a ledger
Read(int64, int64, int64) (map[string]string, error)
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.