Documentation
¶
Index ¶
- type BaseService
- func (service *BaseService) Coordinator() coordinator.Coordinator
- func (service *BaseService) OnMessageReceived(msg coordinator.Message)
- func (service *BaseService) PostCollectionCreateMessage(database string, collection string) error
- func (service *BaseService) PostCollectionDropMessage(database string, collection string) error
- func (service *BaseService) PostCollectionUpdateMessage(database string, collection string) error
- func (service *BaseService) PostDatabaseCreateMessage(database string) error
- func (service *BaseService) PostDatabaseDropMessage(database string) error
- func (service *BaseService) PostDatabaseUpdateMessage(database string) error
- func (service *BaseService) ServiceType() plugins.ServiceType
- func (service *BaseService) SetCoordinator(coordinator coordinator.Coordinator)
- func (service *BaseService) SetStore(store store.Store)
- func (service *BaseService) Store() store.Store
- type CollectionMessageObject
- type CoordinatorService
- type DatabaseMessageObject
- type Service
- type StoreService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseService ¶
func NewBaseService ¶ added in v1.0.0
func NewBaseService() *BaseService
NewBaseService returns a new query base service.
func (*BaseService) Coordinator ¶ added in v0.9.0
func (service *BaseService) Coordinator() coordinator.Coordinator
Coordinator returns the coordinator.
func (*BaseService) OnMessageReceived ¶ added in v1.0.0
func (service *BaseService) OnMessageReceived(msg coordinator.Message)
OnMessageReceived is called when a message is received from the coordinator.
func (*BaseService) PostCollectionCreateMessage ¶ added in v1.0.0
func (service *BaseService) PostCollectionCreateMessage(database string, collection string) error
PostCollectionCreateMessage posts a create collection message to the coordinator.
func (*BaseService) PostCollectionDropMessage ¶ added in v1.0.0
func (service *BaseService) PostCollectionDropMessage(database string, collection string) error
PostCollectionDropMessage posts a drop collection message to the coordinator.
func (*BaseService) PostCollectionUpdateMessage ¶ added in v1.0.0
func (service *BaseService) PostCollectionUpdateMessage(database string, collection string) error
PostCollectionDeleteMessage posts a update collection message to the coordinator.
func (*BaseService) PostDatabaseCreateMessage ¶ added in v1.0.0
func (service *BaseService) PostDatabaseCreateMessage(database string) error
PostDatabaseCreateMessage posts a create database message to the coordinator.
func (*BaseService) PostDatabaseDropMessage ¶ added in v1.0.0
func (service *BaseService) PostDatabaseDropMessage(database string) error
PostDatabaseDropMessage posts a drop database message to the coordinator.
func (*BaseService) PostDatabaseUpdateMessage ¶ added in v1.0.0
func (service *BaseService) PostDatabaseUpdateMessage(database string) error
PostDatabaseDeleteMessage posts a update database message to the coordinator.
func (*BaseService) ServiceType ¶
func (service *BaseService) ServiceType() plugins.ServiceType
ServiceType returns the plug-ing service type.
func (*BaseService) SetCoordinator ¶ added in v0.9.0
func (service *BaseService) SetCoordinator(coordinator coordinator.Coordinator)
SetCoordinator sets the coordinator.
func (*BaseService) SetStore ¶
func (service *BaseService) SetStore(store store.Store)
SetStore sets the store.
func (*BaseService) Store ¶
func (service *BaseService) Store() store.Store
Store returns the store.
type CollectionMessageObject ¶ added in v1.0.0
type CoordinatorService ¶ added in v1.0.0
type CoordinatorService interface {
// SetCoordinator sets the coordinator.
SetCoordinator(coordinator coordinator.Coordinator)
// Coordinator returns the coordinator.
Coordinator() coordinator.Coordinator
// Observer is an interface to receive a message from the coordinator.
coordinator.Observer
// PostDatabaseCreateMessage posts a create database message to the coordinator.
PostDatabaseCreateMessage(database string) error
// PostDatabaseDeleteMessage posts a update database message to the coordinator.
PostDatabaseUpdateMessage(database string) error
// PostDatabaseDropMessage posts a drop database message to the coordinator.
PostDatabaseDropMessage(database string) error
// PostCollectionCreateMessage posts a create collection message to the coordinator.
PostCollectionCreateMessage(database string, collection string) error
// PostCollectionDeleteMessage posts a update collection message to the coordinator.
PostCollectionUpdateMessage(database string, collection string) error
// PostCollectionDropMessage posts a drop collection message to the coordinator.
PostCollectionDropMessage(database string, collection string) error
}
CoordinatorService represents a coordinator interface for query service.
type DatabaseMessageObject ¶ added in v1.0.0
type DatabaseMessageObject struct {
Database string
}
type Service ¶
type Service interface {
plugins.Service
CoordinatorService
StoreService
// SetTracer sets the tracing tracer.
SetTracer(t tracer.Tracer)
// SetPort sets the listen port.
SetPort(port int)
}
Service represents a query service.