mantra

package module
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2019 License: BSD-3-Clause Imports: 12 Imported by: 0

README

Mantra

GoDoc Build Status

Experimental framework.

Should I use it for my own project?

NO. Not yet.

Credits

Mantra is a combination of amazing libraries:

Documentation

Index

Constants

View Source
const VERSION = "0.3.0"

VERSION is mantra's version

Variables

This section is empty.

Functions

func New

func New(services ...Service) error

New registers a new application TODO: Rename to Start

func Send

func Send(address *Address, method interface{}, args ...interface{})

Send supperseeds Send Deprecated: use it from address directly

func Stop

func Stop()

Stop stops the application

Types

type Address

type Address struct {
	// TODO find a better representation
	// might be better as a node name (string)
	PID         int
	HostName    string
	ServiceName string
}

Address is a service's address

func Lookup

func Lookup(name string) *Address

Lookup returns a services address

func (*Address) Send added in v0.3.2

func (a *Address) Send(method string, args ...interface{})

Send sends a message

func (*Address) String

func (a *Address) String() string

type Event

type Event *bus.Event

Event is an event from bus.Event

type Service

type Service interface {
	// TODO: See if I can get rid of Stop
	Stop() error
}

Service is a service

Directories

Path Synopsis
cmd
internal
log
Package log is a wrapper around logrus For more information see https://godoc.org/github.com/sirupsen/logrus
Package log is a wrapper around logrus For more information see https://godoc.org/github.com/sirupsen/logrus
net
slice
Package slice contains commonly used slices methods
Package slice contains commonly used slices methods
structs
Package structs are some helpers functions extractef from https://github.com/fatih/structs
Package structs are some helpers functions extractef from https://github.com/fatih/structs

Jump to

Keyboard shortcuts

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