Versions in this module Expand all Collapse all v0 v0.1.0 Jul 2, 2024 Changes in this version + const DNSErrorStatus + const HTTPErrorStatus + const IncompatibleStateStatus + const InvalidArgumentStatus + const InvalidResponseStatus + const NotFoundStatus + const OKStatus + const PermanentErrorStatus + const PermissionDeniedStatus + const TCPErrorStatus + const TLSErrorStatus + const TemporaryErrorStatus + const ThrottledStatus + const TimeoutStatus + const UnauthenticatedStatus + const UnspecifiedStatus + func CoroutineState(state Any) interface + func CorrelationID(correlationID uint64) interface + func DispatchID(id ID) interface + func Input(input Any) interface + func Output(output Any) interface + type Any struct + func Bool(v bool) Any + func Bytes(v []byte) Any + func Duration(v time.Duration) Any + func Float(v float64) Any + func Int(v int64) Any + func Marshal(v any) (Any, error) + func Nil() Any + func String(v string) Any + func Time(v time.Time) Any + func Uint(v uint64) Any + func (a Any) Equal(other Any) bool + func (a Any) String() string + func (a Any) TypeURL() string + func (a Any) Unmarshal(v any) error + type Call struct + func NewCall(endpoint, function string, opts ...CallOption) Call + func (c Call) Clone() Call + func (c Call) CorrelationID() uint64 + func (c Call) Endpoint() string + func (c Call) Equal(other Call) bool + func (c Call) Expiration() time.Duration + func (c Call) Function() string + func (c Call) Input() Any + func (c Call) Request() Request + func (c Call) String() string + func (c Call) Version() string + func (c Call) With(opts ...CallOption) Call + type CallOption interface + func Expiration(expiration time.Duration) CallOption + func Version(version string) CallOption + type CallResult struct + func NewCallResult(opts ...CallResultOption) CallResult + func (r CallResult) Clone() CallResult + func (r CallResult) CorrelationID() uint64 + func (r CallResult) DispatchID() ID + func (r CallResult) Equal(other CallResult) bool + func (r CallResult) Error() (Error, bool) + func (r CallResult) Output() (Any, bool) + func (r CallResult) String() string + func (r CallResult) With(opts ...CallResultOption) CallResult + type CallResultOption interface + type Error struct + func Errorf(msg string, args ...any) Error + func NewError(err error) Error + func NewErrorMessage(typ, message string, opts ...ErrorOption) Error + func (e Error) Equal(other Error) bool + func (e Error) Error() string + func (e Error) Message() string + func (e Error) String() string + func (e Error) Traceback() []byte + func (e Error) Type() string + func (e Error) Value() []byte + type ErrorOption func(*Error) + func ErrorValue(value []byte) ErrorOption + func Traceback(traceback []byte) ErrorOption + type Exit struct + func NewExit(opts ...ExitOption) Exit + func (e Exit) Equal(other Exit) bool + func (e Exit) Error() (Error, bool) + func (e Exit) Output() (Any, bool) + func (e Exit) Result() (CallResult, bool) + func (e Exit) String() string + func (e Exit) TailCall() (Call, bool) + type ExitOption interface + func TailCall(tailCall Call) ExitOption + type Function func(context.Context, Request) Response + type FunctionMap map[string]Function + func (m FunctionMap) Run(ctx context.Context, req Request) Response + type ID string + type Poll struct + func NewPoll(minResults, maxResults int, maxWait time.Duration, opts ...PollOption) Poll + func (p Poll) Calls() []Call + func (p Poll) CoroutineState() Any + func (p Poll) Equal(other Poll) bool + func (p Poll) MaxResults() int32 + func (p Poll) MaxWait() time.Duration + func (p Poll) MinResults() int32 + func (p Poll) Result() PollResult + func (p Poll) String() string + type PollOption interface + func Calls(calls ...Call) PollOption + type PollResult struct + func NewPollResult(opts ...PollResultOption) PollResult + func (r PollResult) Clone() PollResult + func (r PollResult) CoroutineState() Any + func (r PollResult) Equal(other PollResult) bool + func (r PollResult) Error() (Error, bool) + func (r PollResult) Results() []CallResult + func (r PollResult) String() string + func (r PollResult) With(opts ...PollResultOption) PollResult + type PollResultOption interface + func CallResults(results ...CallResult) PollResultOption + type Request struct + func NewRequest(function string, opts ...RequestOption) Request + func (r Request) Clone() Request + func (r Request) CreationTime() (time.Time, bool) + func (r Request) DispatchID() ID + func (r Request) Equal(other Request) bool + func (r Request) ExpirationTime() (time.Time, bool) + func (r Request) Function() string + func (r Request) Input() (Any, bool) + func (r Request) ParentID() ID + func (r Request) PollResult() (PollResult, bool) + func (r Request) RootID() ID + func (r Request) String() string + func (r Request) With(opts ...RequestOption) Request + type RequestOption interface + func CreationTime(timestamp time.Time) RequestOption + func ExpirationTime(timestamp time.Time) RequestOption + func ParentDispatchID(id ID) RequestOption + func RootDispatchID(id ID) RequestOption + type Response struct + func NewResponse(opts ...ResponseOption) Response + func NewResponseError(err error) Response + func NewResponseErrorf(msg string, args ...any) Response + func (r Response) Clone() Response + func (r Response) Equal(other Response) bool + func (r Response) Error() (Error, bool) + func (r Response) Exit() (Exit, bool) + func (r Response) Marshal() ([]byte, error) + func (r Response) OK() bool + func (r Response) Output() (Any, bool) + func (r Response) Poll() (Poll, bool) + func (r Response) Result() (CallResult, bool) + func (r Response) Status() Status + func (r Response) String() string + func (r Response) With(opts ...ResponseOption) Response + type ResponseOption interface + type Status int + func ErrorStatus(err error) Status + func StatusOf(v any) Status + func (s Status) GoString() string + func (s Status) String() string + type StatusError Status + func (e StatusError) Error() string + func (e StatusError) Status() Status