Documentation ¶
Overview ¶
Package tabletservermock provides mock interfaces for tabletserver.
Index ¶
- type Controller
- func (tqsc *Controller) AddStatusPart()
- func (tqsc *Controller) BroadcastHealth(terTimestamp int64, stats *pb.RealtimeStats)
- func (tqsc *Controller) InitDBConfig(*pb.Target, *dbconfigs.DBConfigs, []tabletserver.SchemaOverride, ...) error
- func (tqsc *Controller) IsHealthy() error
- func (tqsc *Controller) IsServing() bool
- func (tqsc *Controller) QueryService() queryservice.QueryService
- func (tqsc *Controller) Register()
- func (tqsc *Controller) RegisterQueryRuleSource(ruleSource string)
- func (tqsc *Controller) ReloadSchema()
- func (tqsc *Controller) SetQueryRules(ruleSource string, qrs *tabletserver.QueryRules) error
- func (tqsc *Controller) SetServingType(topodata.TabletType, bool) error
- func (tqsc *Controller) StartService(*pb.Target, *dbconfigs.DBConfigs, []tabletserver.SchemaOverride, ...) error
- func (tqsc *Controller) StopService()
- func (tqsc *Controller) UnRegisterQueryRuleSource(ruleSource string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct { // QueryServiceEnabled is a state variable QueryServiceEnabled bool // InitDBConfigError is the return value for InitDBConfig InitDBConfigError error // SetServingTypeError is the return value for SetServingType SetServingTypeError error // StartServiceError is the return value for StartService StartServiceError error // IsHealthy is the return value for IsHealthy IsHealthyError error // ReloadSchemaCount counts how many times ReloadSchema was called ReloadSchemaCount int }
Controller is a mock tabletserver.Controller
func NewController ¶
func NewController() *Controller
NewController returns a mock of tabletserver.Controller
func (*Controller) AddStatusPart ¶
func (tqsc *Controller) AddStatusPart()
AddStatusPart is part of the tabletserver.Controller interface
func (*Controller) BroadcastHealth ¶
func (tqsc *Controller) BroadcastHealth(terTimestamp int64, stats *pb.RealtimeStats)
BroadcastHealth is part of the tabletserver.Controller interface
func (*Controller) InitDBConfig ¶
func (tqsc *Controller) InitDBConfig(*pb.Target, *dbconfigs.DBConfigs, []tabletserver.SchemaOverride, mysqlctl.MysqlDaemon) error
InitDBConfig is part of the tabletserver.Controller interface
func (*Controller) IsHealthy ¶
func (tqsc *Controller) IsHealthy() error
IsHealthy is part of the tabletserver.Controller interface
func (*Controller) IsServing ¶
func (tqsc *Controller) IsServing() bool
IsServing is part of the tabletserver.Controller interface
func (*Controller) QueryService ¶
func (tqsc *Controller) QueryService() queryservice.QueryService
QueryService is part of the tabletserver.Controller interface
func (*Controller) Register ¶
func (tqsc *Controller) Register()
Register is part of the tabletserver.Controller interface
func (*Controller) RegisterQueryRuleSource ¶
func (tqsc *Controller) RegisterQueryRuleSource(ruleSource string)
RegisterQueryRuleSource is part of the tabletserver.Controller interface
func (*Controller) ReloadSchema ¶
func (tqsc *Controller) ReloadSchema()
ReloadSchema is part of the tabletserver.Controller interface
func (*Controller) SetQueryRules ¶
func (tqsc *Controller) SetQueryRules(ruleSource string, qrs *tabletserver.QueryRules) error
SetQueryRules is part of the tabletserver.Controller interface
func (*Controller) SetServingType ¶
func (tqsc *Controller) SetServingType(topodata.TabletType, bool) error
SetServingType is part of the tabletserver.Controller interface
func (*Controller) StartService ¶
func (tqsc *Controller) StartService(*pb.Target, *dbconfigs.DBConfigs, []tabletserver.SchemaOverride, mysqlctl.MysqlDaemon) error
StartService is part of the tabletserver.Controller interface
func (*Controller) StopService ¶
func (tqsc *Controller) StopService()
StopService is part of the tabletserver.Controller interface
func (*Controller) UnRegisterQueryRuleSource ¶
func (tqsc *Controller) UnRegisterQueryRuleSource(ruleSource string)
UnRegisterQueryRuleSource is part of the tabletserver.Controller interface