server

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2025 License: MIT Imports: 38 Imported by: 0

Documentation

Index

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 ReplicationServerConfig struct {
	Ctx           context.Context
	DB            *sql.DB
	Log           *zap.Logger
	NodeRegistry  registry.NodeRegistry
	Options       *config.ServerOptions
	ServerVersion *semver.Version
	GRPCListener  net.Listener
	HTTPListener  net.Listener
}

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

Jump to

Keyboard shortcuts

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