server

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2025 License: MIT Imports: 36 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
	ListenAddress     string
	HttpListenAddress string
}

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 WithHTTPListenAddress added in v0.4.0

func WithHTTPListenAddress(addr string) ReplicationServerOption

func WithListenAddress added in v0.4.0

func WithListenAddress(addr string) 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