Documentation ¶
Index ¶
- Constants
- func BackupTimeStat(d time.Duration, err error)
- type DBV2
- func (db *DBV2) Close() error
- func (db *DBV2) GetBootstrap() (tlstatshouse.GetTagMappingBootstrapResult, error)
- func (db *DBV2) GetMappingByID(id int32) (string, bool, error)
- func (db *DBV2) GetMappingByValue(key string) (int32, bool, error)
- func (db *DBV2) GetOrCreateMapping(metricName, key string) (tlmetadata.GetMappingResponseUnion, error)
- func (db *DBV2) JournalEvents(sinceVersion int64, page int64) ([]tlmetadata.Event, error)
- func (db *DBV2) PrintAllMappings() error
- func (db *DBV2) PutBootstrap(mappings []tlstatshouse.Mapping) (int32, error)
- func (db *DBV2) PutMapping(ks []string, vs []int32) error
- func (db *DBV2) PutOldMetric(name string, id int64, versionToInsert int64, newJson string, ...) (tlmetadata.Event, error)
- func (db *DBV2) ResetFlood(metric string) error
- func (db *DBV2) SaveEntity(name string, id int64, oldVersion int64, newJson string, ...) (tlmetadata.Event, error)
- type EngineRpcHandler
- func (h *EngineRpcHandler) Backup(prefix string) error
- func (h *EngineRpcHandler) GetBinlogPrefixes(ctx context.Context, args tlengine.GetBinlogPrefixes) ([]tlengine.BinlogPrefix, error)
- func (h *EngineRpcHandler) GetReindexStatus(ctx context.Context, args tlengine.GetReindexStatus) (tlengine.ReindexStatusUnion, error)
- func (h *EngineRpcHandler) SendSignal(ctx context.Context, args tlengine.SendSignal) (tl.True, error)
- type Handler
- func (h *Handler) GetTagMappingBootstrap(ctx context.Context, args tlmetadata.GetTagMappingBootstrap) (tlstatshouse.GetTagMappingBootstrapResult, error)
- func (h *Handler) PutTagMappingBootstrap(ctx context.Context, args tlmetadata.PutTagMappingBootstrap) (tlstatshouse.PutTagMappingBootstrapResult, error)
- func (h *Handler) RawEditEntity(ctx context.Context, hctx *rpc.HandlerContext) (string, error)
- func (h *Handler) RawGetJournal(ctx context.Context, hctx *rpc.HandlerContext) (string, error)
- func (h *Handler) RawGetMappingByID(ctx context.Context, hctx *rpc.HandlerContext) (string, error)
- func (h *Handler) RawGetMappingByValue(ctx context.Context, hctx *rpc.HandlerContext) (string, error)
- func (h *Handler) RawPutMapping(ctx context.Context, hctx *rpc.HandlerContext) (string, error)
- func (h *Handler) RawResetFlood(ctx context.Context, hctx *rpc.HandlerContext) (string, error)
- func (h *Handler) ResetFlood2(ctx context.Context, args tlmetadata.ResetFlood2) (tlmetadata.ResetFloodResponse2, error)
- type Options
- type ProxyHandler
- type RpcMethod
Constants ¶
View Source
const BudgetBonus = 10
View Source
const GlobalBudget = 1000000
View Source
const MaxBoostrapResponseSize = 1024 * 1024 // TODO move somewhere
View Source
const MaxBudget = 1000
View Source
const StepSec = 3600
Variables ¶
This section is empty.
Functions ¶
func BackupTimeStat ¶
Types ¶
type DBV2 ¶
type DBV2 struct { MustCommitEveryReq bool // contains filtered or unexported fields }
func (*DBV2) GetBootstrap ¶
func (db *DBV2) GetBootstrap() (tlstatshouse.GetTagMappingBootstrapResult, error)
func (*DBV2) GetOrCreateMapping ¶
func (db *DBV2) GetOrCreateMapping(metricName, key string) (tlmetadata.GetMappingResponseUnion, error)
func (*DBV2) JournalEvents ¶
func (*DBV2) PrintAllMappings ¶
TODO - remove after debug or leave for the future
func (*DBV2) PutBootstrap ¶
func (db *DBV2) PutBootstrap(mappings []tlstatshouse.Mapping) (int32, error)
func (*DBV2) PutOldMetric ¶
func (*DBV2) ResetFlood ¶
type EngineRpcHandler ¶
func NewEngineRpcHandler ¶
func NewEngineRpcHandler(binlogPrefix string, db *DBV2) *EngineRpcHandler
func (*EngineRpcHandler) Backup ¶
func (h *EngineRpcHandler) Backup(prefix string) error
func (*EngineRpcHandler) GetBinlogPrefixes ¶
func (h *EngineRpcHandler) GetBinlogPrefixes(ctx context.Context, args tlengine.GetBinlogPrefixes) ([]tlengine.BinlogPrefix, error)
func (*EngineRpcHandler) GetReindexStatus ¶
func (h *EngineRpcHandler) GetReindexStatus(ctx context.Context, args tlengine.GetReindexStatus) (tlengine.ReindexStatusUnion, error)
func (*EngineRpcHandler) SendSignal ¶
func (h *EngineRpcHandler) SendSignal(ctx context.Context, args tlengine.SendSignal) (tl.True, error)
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) GetTagMappingBootstrap ¶
func (h *Handler) GetTagMappingBootstrap(ctx context.Context, args tlmetadata.GetTagMappingBootstrap) (tlstatshouse.GetTagMappingBootstrapResult, error)
func (*Handler) PutTagMappingBootstrap ¶
func (h *Handler) PutTagMappingBootstrap(ctx context.Context, args tlmetadata.PutTagMappingBootstrap) (tlstatshouse.PutTagMappingBootstrapResult, error)
func (*Handler) RawEditEntity ¶
func (*Handler) RawGetJournal ¶
func (*Handler) RawGetMappingByID ¶
func (*Handler) RawGetMappingByValue ¶
func (*Handler) RawPutMapping ¶
func (*Handler) RawResetFlood ¶
resetFlood
func (*Handler) ResetFlood2 ¶
func (h *Handler) ResetFlood2(ctx context.Context, args tlmetadata.ResetFlood2) (tlmetadata.ResetFloodResponse2, error)
type ProxyHandler ¶
type ProxyHandler struct {
Host string
}
func (*ProxyHandler) HandleProxy ¶
func (h *ProxyHandler) HandleProxy(name string, f RpcMethod) func(ctx context.Context, hctx *rpc.HandlerContext) error
Click to show internal directories.
Click to hide internal directories.