Documentation
¶
Index ¶
- func ContractFor() (factory arctic.ContractFactory[Contract])
- type Contract
- func (contract Contract) Join(request InitialRequest) (response GenericResponse, err error)
- func (contract Contract) Math(request MathRequest) (response MathResponse, err error)
- func (contract Contract) OnJoin(handler func(InitialRequest) GenericResponse)
- func (contract Contract) OnMath(handler func(MathRequest) MathResponse)
- type ContractDefinition
- type ContractOptions
- type GenericResponse
- type InitialRequest
- type MathOperand
- type MathRequest
- type MathResponse
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 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 ¶
Click to show internal directories.
Click to hide internal directories.