sdk

package
v0.71.12 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Call

func Call[Req, Resp any](ctx context.Context, verb Verb[Req, Resp], req Req) (resp Resp, err error)

Call a Verb through the FTL Controller.

Types

type DataRef

type DataRef struct {
	Module string `json:"module,omitempty"`
	Name   string `json:"name"`
}

DataRef is a reference to a Data type.

func DataRefFromProto

func DataRefFromProto(p *schemapb.DataRef) DataRef

func ParseDataRef

func ParseDataRef(ref string) (DataRef, error)

func (DataRef) String

func (v DataRef) String() string

func (DataRef) ToProto

func (v DataRef) ToProto() *schemapb.DataRef

func (*DataRef) UnmarshalText

func (v *DataRef) UnmarshalText(text []byte) error

type Sink

type Sink[Req any] func(context.Context, Req) error

A Sink is a function that can be called with an input and no output.

type Verb

type Verb[Req, Resp any] func(context.Context, Req) (Resp, error)

A Verb is a function that can be called with an input and an output.

type VerbRef

type VerbRef struct {
	Module string `json:"module,omitempty"`
	Name   string `json:"name"`
}

VerbRef is a reference to a Verb.

func ParseVerbRef

func ParseVerbRef(ref string) (VerbRef, error)

func ToVerbRef

func ToVerbRef[Req, Resp any](verb Verb[Req, Resp]) VerbRef

ToVerbRef returns the FTL reference for a Verb.

func VerbRefFromProto

func VerbRefFromProto(p *schemapb.VerbRef) VerbRef

func (VerbRef) String

func (v VerbRef) String() string

func (VerbRef) ToProto

func (v VerbRef) ToProto() *schemapb.VerbRef

func (*VerbRef) UnmarshalText

func (v *VerbRef) UnmarshalText(text []byte) error

Directories

Path Synopsis
Package kvstore provides a generic key-value store.
Package kvstore provides a generic key-value store.

Jump to

Keyboard shortcuts

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