replication

package
v0.0.0-...-9750751 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MAX_RETRY                int32         = 1
	MAX_RETRY_RECLOCK        int32         = 3
	REPLICATION_RESP_TIMEOUT time.Duration = 1000 * time.Millisecond
)

Functions

func Enabled

func Enabled() bool

func Finalize

func Finalize()

func Init

func Init(conf *repconfig.Config) (err error)

func Initialize

func Initialize(args ...interface{}) (err error)

Types

type RepRequestContext

type RepRequestContext struct {
	util.QueItemBase
	// contains filtered or unexported fields
}

func (*RepRequestContext) Cancel

func (r *RepRequestContext) Cancel()

func (*RepRequestContext) GetCtx

func (r *RepRequestContext) GetCtx() context.Context

func (*RepRequestContext) GetMessage

func (r *RepRequestContext) GetMessage() *proto.RawMessage

func (*RepRequestContext) GetReceiveTime

func (r *RepRequestContext) GetReceiveTime() time.Time

func (*RepRequestContext) OnCleanup

func (r *RepRequestContext) OnCleanup()

func (*RepRequestContext) OnComplete

func (r *RepRequestContext) OnComplete()

func (*RepRequestContext) OnExpiration

func (r *RepRequestContext) OnExpiration()

func (*RepRequestContext) Read

func (r *RepRequestContext) Read(reader goio.Reader) (n int, err error)

func (*RepRequestContext) Reply

func (r *RepRequestContext) Reply(resp io.IResponseContext)

func (*RepRequestContext) SetTimeout

func (r *RepRequestContext) SetTimeout(parent context.Context, timeout time.Duration)

To be implement

func (*RepRequestContext) WriteWithOpaque

func (r *RepRequestContext) WriteWithOpaque(opaque uint32, w goio.Writer) (n int, err error)

type Replicator

type Replicator struct {
	// contains filtered or unexported fields
}
var (
	// The singleton
	TheReplicator *Replicator
)

func (*Replicator) GetProcessors

func (r *Replicator) GetProcessors() []*replicationProcessorT

func (*Replicator) SendRequest

func (r *Replicator) SendRequest(opMsg *proto.OperationalMessage)

func (*Replicator) Shutdown

func (r *Replicator) Shutdown()

type ReplicattionHandshaker

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

func (*ReplicattionHandshaker) ExpectResponse

func (h *ReplicattionHandshaker) ExpectResponse() bool

func (*ReplicattionHandshaker) GetHandshakeTimeout

func (h *ReplicattionHandshaker) GetHandshakeTimeout() util.Duration

func (*ReplicattionHandshaker) GetName

func (h *ReplicattionHandshaker) GetName() string

func (*ReplicattionHandshaker) GetPingIP

func (h *ReplicattionHandshaker) GetPingIP() string

func (*ReplicattionHandshaker) GetPingRequest

func (h *ReplicattionHandshaker) GetPingRequest() io.IRequestContext

func (*ReplicattionHandshaker) OnPingResponse

func (h *ReplicattionHandshaker) OnPingResponse(resp io.IResponseContext) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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