server

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New[C, Q, M, R any](opts Options[C, Q, M, R]) (*execrpc.Server[C, Q, M, R], error)

New is just a wrapper around execrpc.New with some additional and common checks.

Types

type Options added in v0.8.0

type Options[C, Q, M, R any] struct {
	// Init is the function that will be called when the server is started.
	Init func(C, execrpc.ProtocolInfo) error

	// Handle is the function that will be called when a request is received.
	Handle func(*execrpc.Call[Q, M, R])
}

Options is a sub set of execrpc.ServerOptions.

Jump to

Keyboard shortcuts

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