fiesta

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2020 License: MIT Imports: 7 Imported by: 0

README

fiesta

Micro-service gateway with the peer-mesh network as backend.

It is a hard fork of flatend, mainly for producing a gateway for the peer-mesh network by reconstruction and reducing some other language support or other feathers, not for improvement.

Further information

Thanks to Kenta Iwasaki for his excellent work.

More

examples: counter,file,hello_world,pipe

How to run count service example

Step 1
$ ./fiesta -c ./examples/counter/config.toml (in fiesta folder)
2020/06/17 02:12:53 Listening for fiesta nodes on '127.0.0.1:9000'.
2020/06/17 02:12:53 Listening for HTTP requests on '[::]:3000'.
2020/06/17 02:12:59 <anon> has connected to you. Services: [count]
Step 2
$ go run main.go  (in fiesta/examples/counter) or ./fiesta/examples/counter/counter_osx
2020/06/17 02:13:00 You are now connected to 127.0.0.1:9000. Services: []
Step 3
$ curl http://localhost:3000
0

$ curl http://localhost:3000
1

$ curl http://localhost:3000
2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	// A reachable, public address which peers may reach you on.
	// The format of the address must be [host]:[port].
	PublicAddr string

	// A list of IPv4/IPv6 addresses and ports assembled as [host]:[port] which
	// your fiesta node will listen for other nodes from.
	BindAddrs []string

	StreamNode *sr.StreamNode
	// contains filtered or unexported fields
}

func (*Node) Shutdown

func (n *Node) Shutdown()

func (*Node) StartWithKeyAndServiceAndProbeAddrs

func (n *Node) StartWithKeyAndServiceAndProbeAddrs(sk kademlia.PrivateKey, services map[string]sr.Handler, probeAddrs ...string) error

Directories

Path Synopsis
cmd
fiesta command
examples
broadcast command
clock command
counter command
file command
hello_world command
pipe command
pubsub command
todo command
ws_chat_clock command

Jump to

Keyboard shortcuts

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