server

package
v0.255.3 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewUserVerbServer

func NewUserVerbServer(moduleName string, handlers ...Handler) plugin.Constructor[ftlv1connect.VerbServiceHandler, UserVerbConfig]

NewUserVerbServer starts a new code-generated drive for user Verbs.

This function is intended to be used by the code generator.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler for a Verb.

func HandleCall added in v0.149.2

func HandleCall[Req, Resp any](verb func(ctx context.Context, req Req) (Resp, error)) Handler

HandleCall creates a Handler from a Verb.

func HandleEmpty added in v0.149.2

func HandleEmpty(empty func(ctx context.Context) error) Handler

HandleEmpty creates a Handler from a Verb with no request or response.

func HandleSink added in v0.149.2

func HandleSink[Req any](sink func(ctx context.Context, req Req) error) Handler

HandleSink creates a Handler from a Sink with no response.

func HandleSource added in v0.149.2

func HandleSource[Resp any](source func(ctx context.Context) (Resp, error)) Handler

HandleSource creates a Handler from a Source with no request.

type UserVerbConfig

type UserVerbConfig struct {
	FTLEndpoint         *url.URL             `help:"FTL endpoint." env:"FTL_ENDPOINT" required:""`
	ObservabilityConfig observability.Config `embed:"" prefix:"o11y-"`
	Config              []string             `` /* 139-byte string literal not displayed */
}

Jump to

Keyboard shortcuts

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