Documentation
¶
Overview ¶
Factorial: A simple service that calculates the factorial of a whole number
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FactorialContractId ¶
func FactorialContractId() string
FactorialContractId returns the capability contract id for this interface
func FactorialHandler ¶
func FactorialHandler(actor_ Factorial) actor.Handler
FactorialHandler is called by an actor during `main` to generate a dispatch handler The output of this call should be passed into `actor.RegisterHandlers`
Types ¶
type Factorial ¶
type Factorial interface { // Calculates the factorial (n!) of the input parameter Calculate(ctx *actor.Context, arg uint32) (uint64, error) }
The Factorial service has a single method, calculate, which calculates the factorial of its whole number parameter.
type FactorialReceiver ¶
type FactorialReceiver struct{}
FactorialReceiver receives messages defined in the Factorial service interface The Factorial service has a single method, calculate, which calculates the factorial of its whole number parameter.
func (*FactorialReceiver) Dispatch ¶
func (r *FactorialReceiver) Dispatch(ctx *actor.Context, svc interface{}, message *actor.Message) (*actor.Message, error)
type FactorialSender ¶
type FactorialSender struct {
// contains filtered or unexported fields
}
FactorialSender sends messages to a Factorial service The Factorial service has a single method, calculate, which calculates the factorial of its whole number parameter.
func NewActorFactorialSender ¶
func NewActorFactorialSender(actor_id string) *FactorialSender
NewActorSender constructs a client for actor-to-actor messaging using the recipient actor's public key
func NewProviderFactorial ¶
func NewProviderFactorial() *FactorialSender
NewProvider constructs a client for sending to a Factorial provider implementing the 'wasmcloud:example:factorial' capability contract, with the "default" link
func NewProviderFactorialLink ¶
func NewProviderFactorialLink(linkName string) *FactorialSender
NewProviderFactorialLink constructs a client for sending to a Factorial provider implementing the 'wasmcloud:example:factorial' capability contract, with the specified link name