proto

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: AGPL-3.0 Imports: 1 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContractFor

func ContractFor() (factory arctic.ContractFactory[Contract])

Types

type Contract

type Contract struct {
	// contains filtered or unexported fields
}

func (Contract) Join

func (contract Contract) Join(request InitialRequest) (response GenericResponse, err error)

func (Contract) Math

func (contract Contract) Math(request MathRequest) (response MathResponse, err error)

func (Contract) OnJoin

func (contract Contract) OnJoin(handler func(InitialRequest) GenericResponse)

func (Contract) OnMath

func (contract Contract) OnMath(handler func(MathRequest) MathResponse)

type ContractDefinition

type ContractDefinition interface {
	Join(InitialRequest) GenericResponse
	Math(MathRequest) MathResponse
	// contains filtered or unexported methods
}

type ContractOptions

type ContractOptions struct {
	Join struct{} `arctic:"direction=client-server,one-at-once"`
}

type GenericResponse

type GenericResponse struct {
	OK      bool
	Message string
}

type InitialRequest

type InitialRequest struct {
	Message string
}

type MathOperand

type MathOperand uint8
const (
	MathOperandAddition MathOperand = iota
	MathOperandSubtraction
	MathOperandMultiplication
	MathOperandDivision
)

type MathRequest

type MathRequest struct {
	FirstOperator, SecondOperator float64
	Operand                       MathOperand
}

type MathResponse

type MathResponse struct {
	Valid        bool
	ErrorMessage string
	Result       float64
}

Jump to

Keyboard shortcuts

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