Documentation ¶
Index ¶
Constants ¶
View Source
const StatusInfoLog = 101
TODO(bep) move
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dispatcher ¶
type Dispatcher interface {
Infof(format string, args ...interface{})
}
type Heartbeater ¶
type Server ¶
func NewServer ¶
func NewServer[Q Heartbeater[R], R any](call func(Dispatcher, Q) R) (*Server[Q, R], error)
NewServer creates a new server which will call the given function with a request Q. The Dispatcher an be used for logging. Any errors needs to be sent in R.
Click to show internal directories.
Click to hide internal directories.