v1

package
v0.0.0-...-1e88fee Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2020 License: MPL-2.0 Imports: 13 Imported by: 0

README

Scenario 1

A bike renting service provides bikes, a person rents a bike from the renter.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Person

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

Person is a NaHS agent representing a single person

func NewPerson

func NewPerson(maxPrice float64) Person

NewPerson creates a new Person NaHS agent

func (Person) RentBike

func (p Person) RentBike(origin, destination string) (string, error)

RentBike looks for a node that plays the Renter role in the Bike Rental protocol and requests it

type Renter

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

Renter is a NaHS agent that rents bikes to Clients.

func NewRenter

func NewRenter() Renter

NewRenter creates a new Renter NaHS agents

Jump to

Keyboard shortcuts

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