CovenantSQL: Index | Files

package mirror

import ""


Package Files

server.go service.go


var (
    // ErrNotReadQuery represents invalid query type for mirror service to respond.
    ErrNotReadQuery = errors.New("only read query is supported")

func StopMirror Uses

func StopMirror(service *Service)

StopMirror stops the mirror server.

type Service Uses

type Service struct {
    // contains filtered or unexported fields

Service defines a database mirror service handler.

func NewService Uses

func NewService(database string, server *rpc.Server) (s *Service, err error)

NewService returns new mirror service handler.

func StartMirror Uses

func StartMirror(database string, listenAddr string) (service *Service, err error)

StartMirror starts the mirror server and start mirror database.

func (*Service) Ack Uses

func (s *Service) Ack(ack *types.Ack, _ *types.AckResponse) (err error)

Ack mocks DBS.Ack for mirrored database.

func (*Service) Query Uses

func (s *Service) Query(req *types.Request, res *types.Response) (err error)

Query mocks DBS.Query for mirrored database.

Package mirror imports 20 packages (graph). Updated 2019-05-18. Refresh now. Tools for package owners.