services

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: BSD-3-Clause Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BasicMultiverse

func BasicMultiverse(name string) *basicMultiverse

func ClientsWithDefaults

func ClientsWithDefaults(names ...string) common.SimpleConfigClients

func Exist

func Exist(name string) bool

func LastSimplePortAllocated

func LastSimplePortAllocated() int

func LastUniversePortShift

func LastUniversePortShift() int

func Multiverse

func Multiverse(config UniverseConfig) common.Universe

create or fetch a universe

func NewMultiVerse

func NewMultiVerse() common.Multiverse

func ValidClients

func ValidClients() []string

func ValidServices

func ValidServices() []string

func Zeno

func Zeno()

kill them all ref: https://dragonball.fandom.com/wiki/Zeno

Types

type Simple

type Simple struct {
	p2p.Node
	Clients struct {
		// contains filtered or unexported fields
	}
}

func (*Simple) Auth

func (s *Simple) Auth() authIface.Client

func (*Simple) CreateAuthClient

func (s *Simple) CreateAuthClient(config *commonIface.ClientConfig) error

func (*Simple) CreateHoarderClient

func (s *Simple) CreateHoarderClient(config *commonIface.ClientConfig) error

func (*Simple) CreateMonkeyClient

func (s *Simple) CreateMonkeyClient(config *commonIface.ClientConfig) error

func (*Simple) CreatePatrickClient

func (s *Simple) CreatePatrickClient(config *commonIface.ClientConfig) error

func (*Simple) CreateSeerClient

func (s *Simple) CreateSeerClient(config *commonIface.ClientConfig) error

func (*Simple) CreateTNSClient

func (s *Simple) CreateTNSClient(config *commonIface.ClientConfig) error

func (*Simple) Hoarder

func (s *Simple) Hoarder() hoarderIface.Client

func (*Simple) Monkey

func (s *Simple) Monkey() monkeyIface.Client

func (*Simple) Patrick

func (s *Simple) Patrick() patrickIface.Client

func (*Simple) PeerNode

func (s *Simple) PeerNode() p2p.Node

func (*Simple) Provides

func (s *Simple) Provides(clients ...string) error

func (*Simple) Seer

func (s *Simple) Seer() seerIface.Client

func (*Simple) TNS

func (s *Simple) TNS() tnsIface.Client

type Universe

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

func (*Universe) All

func (u *Universe) All() []peer.Node

func (*Universe) Auth

func (u *Universe) Auth() auth.Service

func (*Universe) AuthByPid

func (u *Universe) AuthByPid(pid string) (auth.Service, bool)

func (*Universe) Cleanup

func (u *Universe) Cleanup()

func (*Universe) Context

func (u *Universe) Context() context.Context

func (*Universe) CreateAuthService

func (u *Universe) CreateAuthService(config *commonIface.ServiceConfig) (peer.Node, error)

func (*Universe) CreateHoarderService

func (u *Universe) CreateHoarderService(config *commonIface.ServiceConfig) (peer.Node, error)

func (*Universe) CreateMonkeyService

func (u *Universe) CreateMonkeyService(config *commonIface.ServiceConfig) (peer.Node, error)

func (*Universe) CreatePatrickService

func (u *Universe) CreatePatrickService(config *commonIface.ServiceConfig) (peer.Node, error)

func (*Universe) CreateSeerService

func (u *Universe) CreateSeerService(config *commonIface.ServiceConfig) (peer.Node, error)

func (*Universe) CreateSimpleNode

func (u *Universe) CreateSimpleNode(name string, config *common.SimpleConfig) (peer.Node, error)

func (*Universe) CreateSubstrateService

func (u *Universe) CreateSubstrateService(config *commonIface.ServiceConfig) (peer.Node, error)

func (*Universe) CreateTNSService

func (u *Universe) CreateTNSService(config *commonIface.ServiceConfig) (peer.Node, error)

func (*Universe) GetPortHttp

func (u *Universe) GetPortHttp(node peer.Node) (int, error)

func (*Universe) GetServicePids

func (u *Universe) GetServicePids(name string) ([]string, error)

func (*Universe) GetURLHttp

func (u *Universe) GetURLHttp(node peer.Node) (url string, err error)

func (*Universe) GetURLHttps

func (u *Universe) GetURLHttps(node peer.Node) (url string, err error)

func (*Universe) Hoarder

func (u *Universe) Hoarder() hoarder.Service

func (*Universe) HoarderByPid

func (u *Universe) HoarderByPid(pid string) (hoarder.Service, bool)

func (*Universe) Id

func (u *Universe) Id() string

func (*Universe) Kill

func (u *Universe) Kill(name string) error

func (*Universe) KillNodeByNameID

func (u *Universe) KillNodeByNameID(name, id string) error

func (*Universe) ListNumber

func (u *Universe) ListNumber(name string) int

func (*Universe) Lookup

func (u *Universe) Lookup(id string) (*common.NodeInfo, bool)

func (*Universe) Mesh

func (u *Universe) Mesh(newNodes ...peer.Node)

func (*Universe) Monkey

func (u *Universe) Monkey() monkey.Service

func (*Universe) MonkeyByPid

func (u *Universe) MonkeyByPid(pid string) (monkey.Service, bool)

func (*Universe) Name

func (u *Universe) Name() string

func (*Universe) Patrick

func (u *Universe) Patrick() patrick.Service

func (*Universe) PatrickByPid

func (u *Universe) PatrickByPid(pid string) (patrick.Service, bool)

func (*Universe) PortFor

func (u *Universe) PortFor(proto, _type string) int

func (*Universe) Provides

func (u *Universe) Provides(services ...string) error

func (*Universe) Register

func (u *Universe) Register(node peer.Node, name string, ports map[string]int)

func (*Universe) Root

func (u *Universe) Root() string

func (*Universe) RunFixture

func (u *Universe) RunFixture(name string, params ...interface{}) error

func (*Universe) Seer

func (u *Universe) Seer() seer.Service

func (*Universe) SeerByPid

func (u *Universe) SeerByPid(pid string) (seer.Service, bool)

func (*Universe) Service

func (u *Universe) Service(name string, config *commonIface.ServiceConfig) error

func (*Universe) Simple

func (u *Universe) Simple(name string) (common.Simple, error)

func (*Universe) StartAll

func (u *Universe) StartAll(simples ...string) error

func (*Universe) StartWithConfig

func (u *Universe) StartWithConfig(mainConfig *common.Config) error

Start universe based on config

func (*Universe) Stop

func (u *Universe) Stop()

compatibility

func (*Universe) Substrate

func (u *Universe) Substrate() substrate.Service

func (*Universe) SubstrateByPid

func (u *Universe) SubstrateByPid(pid string) (substrate.Service, bool)

func (*Universe) TNS

func (u *Universe) TNS() tns.Service

func (*Universe) TnsByPid

func (u *Universe) TnsByPid(pid string) (tns.Service, bool)

type UniverseConfig

type UniverseConfig struct {
	Name     string
	Id       string
	KeepRoot bool
}

Jump to

Keyboard shortcuts

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