Help us shape the future of Go! Take the 2026 Go Developer Survey

server

package
v0.510.3 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2025 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Config

func Config[T ftl.ConfigType](module, name string) reflection.VerbResource

func DatabaseHandle

func DatabaseHandle[T any](name, dbtype string) reflection.VerbResource

func Egress added in v0.477.0

func Egress(name string) reflection.VerbResource

func EmptyClient

func EmptyClient[Verb any]() reflection.VerbResource

func InitDatabase

func InitDatabase(ref reflection.Ref, dbtype string, protoDBtype deploymentcontext.DBType, driver string) (reflection.ReflectedDatabase, *once.Handle[*sql.DB])

func InvokeVerb

func InvokeVerb[Req, Resp any](ref reflection.Ref) func(ctx context.Context, req Req) (resp Resp, err error)

func NewUserVerbServer

func NewUserVerbServer(projectName string, 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.

func Query added in v0.431.0

func Query[Req, Resp any](
	module string,
	verbName string,
	commandType reflection.CommandType,
	dbName string,
	dbType string,
	rawSQL string,
	fields []string,
	colToFieldName []tuple.Pair[string, string],
) reflection.Registree

func QueryEmpty added in v0.431.0

func QueryEmpty(
	module string,
	verbName string,
	commandType reflection.CommandType,
	dbName string,
	dbType string,
	rawSQL string,
	fields []string,
	colToFieldName []tuple.Pair[string, string],
) reflection.Registree

func QuerySink added in v0.431.0

func QuerySink[Req any](
	module string,
	verbName string,
	commandType reflection.CommandType,
	dbName string,
	dbType string,
	rawSQL string,
	fields []string,
	colToFieldName []tuple.Pair[string, string],
) reflection.Registree

func QuerySource added in v0.431.0

func QuerySource[Resp any](
	module string,
	verbName string,
	commandType reflection.CommandType,
	dbName string,
	dbType string,
	rawSQL string,
	fields []string,
	colToFieldName []tuple.Pair[string, string],
) reflection.Registree

func Secret

func Secret[T ftl.SecretType](module, name string) reflection.VerbResource

func SinkClient

func SinkClient[Verb, Req any]() reflection.VerbResource

func SourceClient

func SourceClient[Verb, Resp any]() reflection.VerbResource

func TopicHandle

func TopicHandle[E any, M ftl.TopicPartitionMap[E]](module, name string) reflection.VerbResource

func VerbClient

func VerbClient[Verb, Req, Resp any]() reflection.VerbResource

Types

type Handler

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

Handler for a Verb.

func HandleCall

func HandleCall[Req, Resp any](module string, verb string) Handler

func HandleEmpty

func HandleEmpty(module string, verb string) Handler

func HandleSink

func HandleSink[Req any](module string, verb string) Handler

func HandleSource

func HandleSource[Resp any](module string, verb string) Handler

type UserVerbConfig

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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