service

package
v0.0.0-...-8bebed1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFrom

func CreateFrom(msg *p.Message, cmd int32) *p.Message

func CreateMsgId

func CreateMsgId() string

Types

type CMDHandler

type CMDHandler interface {
	Handler(msg *p.Message) error
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(cnf *conf.ServiceConf, support *model.Support, routing bind.Routing, registor registor.Registor, syncProtocol p.SyncProtocol) *Server

func (*Server) AddToBatch

func (self *Server) AddToBatch(token int64, id string, msg *p.Message) error

func (*Server) BeginBatch

func (self *Server) BeginBatch() int64

func (*Server) CommitBatch

func (self *Server) CommitBatch(token int64)

func (*Server) DeleteBatch

func (self *Server) DeleteBatch(token int64)

func (*Server) GetSyncProtocol

func (self *Server) GetSyncProtocol() p.SyncProtocol

func (*Server) RawWriteTo

func (self *Server) RawWriteTo(id string, msg *p.Message) error

func (*Server) Registry

func (self *Server) Registry(cmd int32, handler CMDHandler)

func (*Server) Serve

func (self *Server) Serve() error

func (*Server) WriteTo

func (self *Server) WriteTo(id string, msg *p.Message) error

Jump to

Keyboard shortcuts

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