chanrpc

package
v0.0.0-...-2fa33bc Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package chanrpc owns the application's process-wide ChanRPC dispatcher.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Call

func Call[Ack any](ctx context.Context, request any) (Ack, error)

Call waits for a typed reply from the handler.

func Register

func Register[Req, Ack any](handler func(Req) (Ack, error)) error

Register binds a request type to a handler before Start. Handlers run concurrently and must not call back into the same dispatcher.

func Start

func Start(ctx context.Context) (<-chan struct{}, error)

Start starts dispatching registered handlers. The returned channel closes once the context is canceled and the dispatcher and its worker pool stop.

func Submit

func Submit(ctx context.Context, request any) error

Submit checks cancellation before dispatch. Once dispatched, it waits for a definitive acknowledgement: a canceled wait could otherwise make a caller roll back data for a command the worker has already accepted.

Types

This section is empty.

Jump to

Keyboard shortcuts

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