Documentation ¶
Index ¶
- Constants
- Variables
- type Config
- type Peer
- func (peer *Peer) Address() string
- func (peer *Peer) Close() error
- func (peer *Peer) Coordinator(name string) (coordinator.Coordinator, bool)
- func (peer *Peer) Coordinators() []string
- func (peer *Peer) Device(name string) (device.Device, bool)
- func (peer *Peer) Devices() []string
- func (peer *Peer) Processor(name string) (processor.Processor, bool)
- func (peer *Peer) Processors() []string
- func (peer *Peer) RunWebservice() error
Constants ¶
View Source
const (
WebServicePort string = "6666"
)
Variables ¶
View Source
var ( // ErrPeer is the root of errors caused by Peer ErrPeer = errors.NewClass("Peer Error") // ErrClosed indicates that the peer is closed ErrClosed = ErrPeer.New("Peer is closed") // ErrInvalid is used when the calling arguments are wrong ErrInvalid = ErrPeer.New("Invalid arguments") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Manifest manifest.Manifest `validate:"required"` Address string `validate:"omitempty,ip"` }
Config is the configuration for the Peer. If address is empty then the localhost is used instead
type Peer ¶
Peer is a continuous configuration process that handles the proxies
func (*Peer) Address ¶
Address returns the ip address which the peer will use to spawn microservices. The address must be the same as in the Manifest
func (*Peer) Coordinator ¶
func (peer *Peer) Coordinator(name string) (coordinator.Coordinator, bool)
Coordinator returns the Coordinator corresponding to the name
func (*Peer) Coordinators ¶
Coordinators return the names of the instantiated proxy Coordinators
func (*Peer) Processors ¶
Processors return the names of the instantiated proxy Processors
func (*Peer) RunWebservice ¶
RunWebservice makes the peer functionality availablle through RPC
Click to show internal directories.
Click to hide internal directories.