summationapi

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2022 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package summation defines a simple number summing service API for demonstration purposes.

Index

Constants

This section is empty.

Variables

Functions

func Named

func Named(name string) resource.Name

Named is a helper for getting the named Summation's typed resource name.

func NewUnimplementedInterfaceError

func NewUnimplementedInterfaceError(actual interface{}) error

NewUnimplementedInterfaceError is used when there is a failed interface check.

Types

type Summation

type Summation interface {
	Sum(ctx context.Context, nums []float64) (float64, error)
}

Summation defines the Go interface for the service (should match the protobuf methods.)

func FromRobot

func FromRobot(r robot.Robot, name string) (Summation, error)

FromRobot is a helper for getting the named Summation from the given Robot.

Jump to

Keyboard shortcuts

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