Versions in this module Expand all Collapse all v0 v0.1.0 Jul 2, 2024 Changes in this version + var ErrDNS error = dispatchproto.StatusError(dispatchproto.DNSErrorStatus) + var ErrHTTP error = dispatchproto.StatusError(dispatchproto.HTTPErrorStatus) + var ErrIncompatibleState error = dispatchproto.StatusError(dispatchproto.IncompatibleStateStatus) + var ErrInvalidArgument error = dispatchproto.StatusError(dispatchproto.InvalidArgumentStatus) + var ErrInvalidResponse error = dispatchproto.StatusError(dispatchproto.InvalidResponseStatus) + var ErrNotFound error = dispatchproto.StatusError(dispatchproto.NotFoundStatus) + var ErrPermanent error = dispatchproto.StatusError(dispatchproto.PermanentErrorStatus) + var ErrPermissionDenied error = dispatchproto.StatusError(dispatchproto.PermissionDeniedStatus) + var ErrTCP error = dispatchproto.StatusError(dispatchproto.TCPErrorStatus) + var ErrTLS error = dispatchproto.StatusError(dispatchproto.TLSErrorStatus) + var ErrTemporary error = dispatchproto.StatusError(dispatchproto.TemporaryErrorStatus) + var ErrThrottled error = dispatchproto.StatusError(dispatchproto.ThrottledStatus) + var ErrTimeout error = dispatchproto.StatusError(dispatchproto.TimeoutStatus) + var ErrUnauthenticated error = dispatchproto.StatusError(dispatchproto.UnauthenticatedStatus) + type AnyFunction interface + Register func(*Dispatch) (string, dispatchproto.Function) + type Dispatch struct + func New(opts ...Option) (*Dispatch, error) + func (d *Dispatch) Client() (*dispatchclient.Client, error) + func (d *Dispatch) Handler() (string, http.Handler) + func (d *Dispatch) ListenAndServe() error + func (d *Dispatch) Register(fn AnyFunction) + func (d *Dispatch) RegisterPrimitive(name string, fn dispatchproto.Function) + func (d *Dispatch) URL() string + type Function struct + func Func[I, O any](name string, fn func(context.Context, I) (O, error)) *Function[I, O] + func (f *Function[I, O]) Await(input I, opts ...dispatchproto.CallOption) (O, error) + func (f *Function[I, O]) BuildCall(input I, opts ...dispatchproto.CallOption) (dispatchproto.Call, error) + func (f *Function[I, O]) Dispatch(ctx context.Context, input I, opts ...dispatchproto.CallOption) (dispatchproto.ID, error) + func (f *Function[I, O]) Gather(inputs []I, opts ...dispatchproto.CallOption) ([]O, error) + func (f *Function[I, O]) Name() string + func (f *Function[I, O]) Register(endpoint *Dispatch) (string, dispatchproto.Function) + type Option interface + func Client(client *dispatchclient.Client) Option + func EndpointUrl(endpointUrl string) Option + func Env(env ...string) Option + func ServeAddress(addr string) Option + func VerificationKey(verificationKey string) Option