sync

package
v0.0.0-...-d989b54 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConnectTimeout = time.Duration(10) * time.Second
	ReadTimeout    = time.Duration(30) * time.Second
	WriteTimeout   = time.Duration(30) * time.Second
)

Variables

This section is empty.

Functions

func AddPromNodeEvent

func AddPromNodeEvent(typ string, evt *model.Event, node *model.Node)

func EventOperateProxy

func EventOperateProxy(evt model.Event) error

func Rollback

func Rollback(operate model.Operate) error

func Update

func Update(operates ...model.Operate) error

check operates and commit data

func Watch

func Watch()

Types

type Client

type Client struct {
	*gorpc.Client
}

type GSyncServer

type GSyncServer struct{}

func (*GSyncServer) Sync

func (server *GSyncServer) Sync(syncServer pb.Sync_SyncServer) error

grpc协议同步配置 目前只要报错,就直接把当前stream连接断开,后续需要修改 @todo 规范grpc error code

type Server

type Server struct{}

为兼容先前gorpc,仍命名为Server

func (*Server) GetNode

func (srv *Server) GetNode(nodeInfoReq *model.NodeInfo, nodeResp *model.Node) error

func (*Server) Sync

func (srv *Server) Sync(evtReq *model.Event, evtResp *model.Event) error

Jump to

Keyboard shortcuts

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