server

package
v0.0.0-...-293aeef Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// We must use two mutex to synchronise the creation of new topic store.
	ProducerAddrs []string
	ConsumerAddrs []string
	// contains filtered or unexported fields
}

func NewServer

func NewServer(serverOpts ...ServerOption) (*Server, error)

func (*Server) Start

func (s *Server) Start() error

type ServerOption

type ServerOption func(*Server)

func WithConsumerAddr

func WithConsumerAddr(consumerAddrs ...string) ServerOption

will update the port at 4000 only if atleast one port it given, else will keep on running at 4000 if no addr is passed.

func WithProducerAddr

func WithProducerAddr(producerAddrs ...string) ServerOption

will update the port at 3000 only if atleast one port it given, else will keep on running at 3000 if no addr is passed.

Jump to

Keyboard shortcuts

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