plugins

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

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 Heartbeater[R any] interface {
	HeartbeatResponse() (R, bool)
}

type Server

type Server[Q, R any] struct {
	*execrpc.Server[Q, R]
}

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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