Documentation
¶
Overview ¶
Package server implements the replication server.
Index ¶
- type ReplicationServer
- type ReplicationServerConfig
- type ReplicationServerOption
- func WithContext(ctx context.Context) ReplicationServerOption
- func WithDB(db *sql.DB) ReplicationServerOption
- func WithGRPCListener(listener net.Listener) ReplicationServerOption
- func WithHTTPListener(listener net.Listener) ReplicationServerOption
- func WithLogger(log *zap.Logger) ReplicationServerOption
- func WithNodeRegistry(reg registry.NodeRegistry) ReplicationServerOption
- func WithServerOptions(opts *config.ServerOptions) ReplicationServerOption
- func WithServerVersion(version *semver.Version) ReplicationServerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReplicationServer ¶
type ReplicationServer struct {
// contains filtered or unexported fields
}
func NewReplicationServer ¶
func NewReplicationServer( opts ...ReplicationServerOption, ) (*ReplicationServer, error)
func (*ReplicationServer) Addr ¶
func (s *ReplicationServer) Addr() net.Addr
func (*ReplicationServer) Shutdown ¶
func (s *ReplicationServer) Shutdown(timeout time.Duration)
func (*ReplicationServer) WaitForShutdown ¶
func (s *ReplicationServer) WaitForShutdown(timeout time.Duration)
type ReplicationServerConfig ¶ added in v0.4.0
type ReplicationServerOption ¶ added in v0.4.0
type ReplicationServerOption func(*ReplicationServerConfig)
func WithContext ¶ added in v0.4.0
func WithContext(ctx context.Context) ReplicationServerOption
func WithDB ¶ added in v0.4.0
func WithDB(db *sql.DB) ReplicationServerOption
func WithGRPCListener ¶ added in v0.5.0
func WithGRPCListener(listener net.Listener) ReplicationServerOption
func WithHTTPListener ¶ added in v0.5.0
func WithHTTPListener(listener net.Listener) ReplicationServerOption
func WithLogger ¶ added in v0.4.0
func WithLogger(log *zap.Logger) ReplicationServerOption
func WithNodeRegistry ¶ added in v0.4.0
func WithNodeRegistry(reg registry.NodeRegistry) ReplicationServerOption
func WithServerOptions ¶ added in v0.4.0
func WithServerOptions(opts *config.ServerOptions) ReplicationServerOption
func WithServerVersion ¶ added in v0.4.0
func WithServerVersion(version *semver.Version) ReplicationServerOption
Click to show internal directories.
Click to hide internal directories.