gizmoapi

package
v0.41.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package gizmoapi implements the acme:component:gizmo API, a demonstraction API showcasing the available GRPC method types.

Index

Constants

This section is empty.

Variables

View Source
var API = resource.APINamespace("acme").WithComponentType("gizmo")

API is the full API definition.

Functions

func Named

func Named(name string) resource.Name

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

func NewRPCServiceServer added in v0.2.36

func NewRPCServiceServer(coll resource.APIResourceCollection[Gizmo]) interface{}

NewRPCServiceServer returns a new RPC server for the gizmo API.

Types

type Gizmo

type Gizmo interface {
	resource.Resource
	DoOne(ctx context.Context, arg1 string) (bool, error)
	DoOneClientStream(ctx context.Context, arg1 []string) (bool, error)
	DoOneServerStream(ctx context.Context, arg1 string) ([]bool, error)
	DoOneBiDiStream(ctx context.Context, arg1 []string) ([]bool, error)
	DoTwo(ctx context.Context, arg1 bool) (string, error)
}

Gizmo defines the Go interface for the component (should match the protobuf methods.)

func FromRobot

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

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

func NewClientFromConn

func NewClientFromConn(conn rpc.ClientConn, remoteName string, name resource.Name, logger logging.Logger) Gizmo

NewClientFromConn creates a new gizmo RPC client from an existing connection.

Jump to

Keyboard shortcuts

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