custom

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2026 License: Apache-2.0 Imports: 10 Imported by: 45

Documentation

Overview

Package custom adapts typed user-defined Go handlers to the shared runtime handler contract. It owns no binding, routing, SQL, or transaction behavior.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Factory

func Factory[I, O any](create func() xhandler.Contract[I, O]) func() (rhandler.TypedHandler, error)

Factory is the typed linking bridge registered as a compiled export in viant/x. It creates one custom adapter per registration build.

func New

func New[I any, O any](contract xhandler.Contract[I, O]) rhandler.TypedHandler

New adapts the public binder-aware custom Go contract to the unified runtime handler. The engine has already bound and initialized input before Execute.

func NewFunc

func NewFunc[I any, O any](fn xhandler.Func[I, O]) rhandler.TypedHandler

NewFunc adapts a simple pure Go function. Handlers that need DI or response control should use New with xdatly/handler.Contract instead.

Types

This section is empty.

Jump to

Keyboard shortcuts

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