fullstack

package
v0.0.0-...-e652847 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2020 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildSimpleGraph

func BuildSimpleGraph(eventtype, consumerrole string) string

BuildSimpleGraph builds a graph

Types

type Fullstack

type Fullstack struct {
	T *testing.T

	ServerCert []byte

	Server *server.Server

	Client *xbus.Client

	Logger  *testutils.TestLogger
	Model   *model.Model
	DB      *yago.DB
	CloseDB sqldb.CloseFunction
}

Fullstack is the stub we use in our tests

func InitFullstack

func InitFullstack(t *testing.T, autostart bool) *Fullstack

InitFullstack is used to produce and kickstart a full stack environment ready for testing

func (*Fullstack) CreateAccount

func (ft *Fullstack) CreateAccount(name string, aType api.Account_Type) *xbus.Client

CreateAccount ...

func (*Fullstack) CreateConsumer

func (ft *Fullstack) CreateConsumer(name string, roles []string) (*xbus.Client, *xbus.Actor)

CreateConsumer ...

func (*Fullstack) CreateEmitter

func (ft *Fullstack) CreateEmitter(name string, roles []string) (*xbus.Client, *xbus.Actor)

CreateEmitter ...

func (*Fullstack) CreateRole

func (ft *Fullstack) CreateRole(actorKind api.Actor_Kind, name string) api.UUID

CreateRole ...

func (*Fullstack) CreateWorker

func (ft *Fullstack) CreateWorker(name string, roles []string) (*xbus.Client, *xbus.Actor)

CreateWorker ...

func (*Fullstack) GetEnvStateChan

func (ft *Fullstack) GetEnvStateChan(emitter *xbus.Actor, envID api.UUID) (
	<-chan api.EmitterEnvelopeState, *nats.Subscription,
)

GetEnvStateChan returns a chan and subscrition to an envelope state updates

func (*Fullstack) InstallGraph

func (ft *Fullstack) InstallGraph(graph string)

InstallGraph save & activate a graph

func (*Fullstack) ServerStart

func (ft *Fullstack) ServerStart() bool

ServerStart is responsible to start the Xbus server

func (*Fullstack) ServerStop

func (ft *Fullstack) ServerStop()

ServerStop is used during shutdown to properly exit all processes

func (*Fullstack) Shutdown

func (ft *Fullstack) Shutdown()

Shutdown is what you call to teardown the whole fullstack env

Jump to

Keyboard shortcuts

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