query

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseService

type BaseService struct {
	plugins.Config
	// contains filtered or unexported fields
}

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-in 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 CollectionMessageObject struct {
	Database   string
	Collection string
}

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.

type StoreService added in v1.0.0

type StoreService interface {
	// SetStore sets the store.
	SetStore(store store.Store)
	// Store returns the store.
	Store() store.Store
}

StoreService represents a store interface for query service.

Directories

Path Synopsis
nolint:gocognit
nolint:gocognit
nolint:gocognit
nolint:gocognit

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL