MCPcopy
hub / github.com/lni/dragonboat / TransportFactory

Interface TransportFactory

config/config.go:474–484  ·  view source on GitHub ↗

TransportFactory is the interface used for creating custom transport modules.

Source from the content-addressed store, hash-verified

472
473// TransportFactory is the interface used for creating custom transport modules.
474type TransportFactory interface {
475 // Create creates a transport module.
476 Create(NodeHostConfig,
477 raftio.MessageHandler, raftio.ChunkHandler) raftio.ITransport
478 // Validate validates the RaftAddress of the NodeHost. When using a custom
479 // transport module, users are granted full control on what address type to
480 // use for the NodeHostConfig.RaftAddress field, it can be of the traditional
481 // IP:Port format or any other form. The Validate method is used to validate
482 // that a received address is of the valid form.
483 Validate(string) bool
484}
485
486// LogDBInfo is the info provided when LogDBCallback is invoked.
487type LogDBInfo struct {

Callers 2

createFunction · 0.95
ValidateMethod · 0.65

Implementers 6

validatorTestModulenodehost_test.go
chanTransportFactorynodehost_test.go
ChanTransportFactoryplugin/chan/chan.go
NOOPTransportFactoryinternal/transport/noop.go
DefaultTransportFactoryinternal/transport/transport.go
defaultTransportconfig/config.go

Calls

no outgoing calls

Tested by

no test coverage detected