server

package
v0.408.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Config added in v0.402.0

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

func DatabaseHandle added in v0.398.0

func DatabaseHandle[T ftl.DatabaseConfig](dbtype string) reflection.VerbResource

func EmptyClient added in v0.372.0

func EmptyClient[Verb any]() reflection.VerbResource

func InitDatabase added in v0.398.0

func InitDatabase(ref reflection.Ref, dbtype string, protoDBtype modulecontext.DBType, driver string) *reflection.ReflectedDatabaseHandle

func InitMySQL added in v0.398.0

func InitPostgres added in v0.393.0

func InvokeVerb added in v0.393.0

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 Secret added in v0.402.0

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

func SinkClient added in v0.372.0

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

func SourceClient added in v0.372.0

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

func TopicHandle added in v0.401.0

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

func VerbClient added in v0.372.0

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 added in v0.149.2

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

func HandleEmpty added in v0.149.2

func HandleEmpty(verb any) Handler

func HandleSink added in v0.149.2

func HandleSink[Req any](verb any) Handler

func HandleSource added in v0.149.2

func HandleSource[Resp any](verb any) Handler

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