Documentation ¶
Index ¶
- Variables
- func RegisterFixture(name string, handler FixtureHandler)
- func ValidFixtures() []string
- func Zeno()
- type ClientCreate
- type ClientCreationMethod
- type Config
- type FixtureDefinition
- type FixtureHandler
- type FixtureVariable
- type Multiverse
- type NodeInfo
- type ServiceCreate
- type Simple
- func (s *Simple) Auth() (authIface.Client, error)
- func (s *Simple) Hoarder() (hoarderIface.Client, error)
- func (s *Simple) Monkey() (monkeyIface.Client, error)
- func (s *Simple) Patrick() (patrickIface.Client, error)
- func (s *Simple) PeerNode() peer.Node
- func (s *Simple) Provides(clients ...string) error
- func (s *Simple) Seer() (seerIface.Client, error)
- func (s *Simple) TNS() (tnsIface.Client, error)
- type SimpleConfig
- type SimpleConfigClients
- type Universe
- func (u *Universe) All() []peer.Node
- func (u *Universe) Auth() auth.Service
- func (u *Universe) AuthByPid(pid string) (auth.Service, bool)
- func (u *Universe) Cleanup()
- func (u *Universe) Context() context.Context
- func (u *Universe) CreateSimpleNode(name string, config *SimpleConfig) (peer.Node, error)
- func (u *Universe) Gateway() gateway.Service
- func (u *Universe) GetInfo(node peer.Node) (*NodeInfo, error)
- func (u *Universe) GetPortHttp(node peer.Node) (int, error)
- func (u *Universe) GetServicePids(name string) ([]string, error)
- func (u *Universe) GetURLHttp(node peer.Node) (string, error)
- func (u *Universe) GetURLHttps(node peer.Node) (string, error)
- func (u *Universe) Hoarder() hoarder.Service
- func (u *Universe) HoarderByPid(pid string) (hoarder.Service, bool)
- func (u *Universe) Id() string
- func (u *Universe) Kill(name string) error
- func (u *Universe) KillNodeByNameID(name, id string) error
- func (u *Universe) ListNumber(name string) int
- func (u *Universe) Lookup(id string) (*NodeInfo, bool)
- func (u *Universe) Mesh(newNodes ...peer.Node)
- func (u *Universe) Monkey() monkey.Service
- func (u *Universe) MonkeyByPid(pid string) (monkey.Service, bool)
- func (u *Universe) Name() string
- func (u *Universe) Patrick() patrick.Service
- func (u *Universe) PatrickByPid(pid string) (patrick.Service, bool)
- func (u *Universe) PortFor(proto, _type string) (int, error)
- func (u *Universe) Provides(services ...string) error
- func (u *Universe) Register(node peer.Node, name string, ports map[string]int)
- func (u *Universe) Root() string
- func (u *Universe) RunFixture(name string, params ...interface{}) error
- func (u *Universe) Seer() seer.Service
- func (u *Universe) SeerByPid(pid string) (seer.Service, bool)
- func (u *Universe) Service(name string, config *commonIface.ServiceConfig) error
- func (u *Universe) Simple(name string) (*Simple, error)
- func (u *Universe) StartAll(simples ...string) error
- func (u *Universe) StartWithConfig(mainConfig *Config) error
- func (u *Universe) Stop()
- func (u *Universe) Substrate() substrate.Service
- func (u *Universe) SubstrateByPid(pid string) (substrate.Service, bool)
- func (u *Universe) SwarmKey() []byte
- func (u *Universe) TNS() tns.Service
- func (u *Universe) TnsByPid(pid string) (tns.Service, bool)
- type UniverseConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Ports map[string]int DreamlandApiListen = DefaultHost + ":1421" DefaultHost string = "127.0.0.1" DefaultP2PListenFormat string = "/ip4/" + DefaultHost + "/tcp/%d" DefaultHTTPListenFormat string = "%s://" + DefaultHost + ":%d" BaseAfterStartDelay = 500 // Millisecond MaxAfterStartDelay = 1000 // Millisecond MeshTimeout = 5 * time.Second )
TODO: Need to verify which vars need to be exported
View Source
var FixtureMap = map[string]FixtureDefinition{ "setBranch": { Description: "set the default branch for services to resolve", ImportRef: "libdream/common/fixtures", Variables: []FixtureVariable{ { Name: "name", Alias: "n", Required: true, }, }, }, "createProjectWithJobs": { Description: "creates jobs for code and config repos", ImportRef: "patrick", Internal: true, }, "pushAll": { Description: "pushes all ", ImportRef: "patrick", Variables: []FixtureVariable{ { Name: "project-id", Alias: "pid", Required: false, }, { Name: "branch", Alias: "b", Required: false, }, }, }, "pushConfig": { Description: "pushes into config repo", ImportRef: "patrick", Internal: true, }, "pushCode": { Description: "pushes into code repo", ImportRef: "patrick", Internal: true, }, "pushWebsite": { Description: "pushes website repo", ImportRef: "patrick", Internal: true, }, "pushLibrary": { Description: "pushes library repo", ImportRef: "patrick", Internal: true, }, "attachDomain": { Description: "attaches default FQDN", ImportRef: "substrate", Internal: true, }, "clearRepos": { Description: "delete all unused repos", ImportRef: "dreamland-test/fixtures", Internal: true, }, "attachPlugin": { Description: "inject a plugin binary built using VM-Orbit", ImportRef: "substrate", Variables: []FixtureVariable{ { Name: "paths", Description: "comma separated list of binary paths", Alias: "p", Required: true, }, }, }, "pushSpecific": { Description: "pushes specific repos", ImportRef: "patrick", Variables: []FixtureVariable{ { Name: "repository-id", Alias: "rid", Required: true, }, { Name: "repository-fullname", Alias: "fn", Description: "ex: taubyte-test/tb_repo", Required: true, }, { Name: "project-id", Alias: "pid", Description: "Defaults to the test project id", Required: false, }, { Name: "branch", Alias: "b", Description: fmt.Sprintf("Defaults to %v", commonSpec.DefaultBranches), Required: false, }, }, }, "attachProdProject": { Description: "Attach a production project to dreamland", ImportRef: "dreamland-test/fixtures", Internal: true, Variables: []FixtureVariable{ { Name: "project-id", Alias: "pid", Description: "", Required: true, }, { Name: "git-token", Alias: "t", Description: "", Required: true, }, }, }, "importProdProject": { Description: "Import a production project to dreamland and push all the repos", ImportRef: "dreamland-test/fixtures", Internal: true, Variables: []FixtureVariable{ { Name: "project-id", Alias: "pid", Description: "", Required: true, }, { Name: "git-token", Alias: "t", Description: "", Required: true, }, { Name: "branch", Alias: "b", Description: fmt.Sprintf("Defaults to %v", commonSpec.DefaultBranches), Required: false, }, }, }, "fakeProject": { Description: "Pushes the internal project to tns", ImportRef: "tau/dream/common/fixtures", Internal: true, }, "injectProject": { Description: "Pass in a *projectSchema.Project to inject it into tns", ImportRef: "tau/dream/common/fixtures", BlockCLI: true, Internal: true, }, "compileFor": { Description: "pushes specific repos", ImportRef: "monkey/fixtures/compile", Internal: true, Variables: []FixtureVariable{ { Name: "project-id", Alias: "pid", Description: "Defaults to the test project id", Required: true, }, { Name: "application-id", Alias: "app", Description: "", Required: false, }, { Name: "resource-id", Alias: "rid", Description: "", Required: true, }, { Name: "branch", Alias: "b", Description: fmt.Sprintf("Defaults to %v", commonSpec.DefaultBranches), Required: false, }, { Name: "path", Alias: "p", Description: "Can be a directory, go file, or a wasm file. Defaults to a ping/pong wasm file", Required: false, }, { Name: "call", Alias: "c", Description: "", Required: false, }, }, }, "buildLocalProject": { Description: "pushes specific repos", ImportRef: "monkey/fixtures/compile", Internal: true, Variables: []FixtureVariable{ { Name: "config", Description: "Do build config", Required: true, }, { Name: "code", Description: "Do build code", Required: true, }, { Name: "path", Alias: "p", Description: "path/to/taubyte/project", Required: true, }, { Name: "branch", Alias: "b", Description: fmt.Sprintf("Defaults to %v", commonSpec.DefaultBranches), Required: false, }, }, }, }
TODO: This should be generated
View Source
var Registry *handlerRegistry
Functions ¶
func ValidFixtures ¶
func ValidFixtures() []string
Types ¶
type ClientCreate ¶
type ClientCreate func(peer.Node, *commonIface.ClientConfig) (commonIface.Client, error)
type ClientCreationMethod ¶
type ClientCreationMethod func(*commonIface.ClientConfig) error
type Config ¶
type Config struct { Services map[string]commonIface.ServiceConfig Simples map[string]SimpleConfig }
type FixtureDefinition ¶
type FixtureDefinition struct { Description string ImportRef string Variables []FixtureVariable BlockCLI bool Internal bool }
type FixtureHandler ¶
Order of params important!
type FixtureVariable ¶
type Multiverse ¶
type Multiverse struct{}
func MultiVerse ¶
func MultiVerse() *Multiverse
func (*Multiverse) Context ¶
func (m *Multiverse) Context() context.Context
func (*Multiverse) Status ¶
func (m *Multiverse) Status() interface{}
func (*Multiverse) Universe ¶
func (m *Multiverse) Universe(name string) *Universe
func (*Multiverse) Universes ¶
func (m *Multiverse) Universes() interface{}
type ServiceCreate ¶
type ServiceCreate func(*Universe, *commonIface.ServiceConfig) (commonIface.Service, error)
type SimpleConfig ¶
type SimpleConfig struct { commonIface.CommonConfig Clients map[string]*commonIface.ClientConfig }
type SimpleConfigClients ¶
type SimpleConfigClients struct { TNS *commonIface.ClientConfig Auth *commonIface.ClientConfig Seer *commonIface.ClientConfig Patrick *commonIface.ClientConfig Monkey *commonIface.ClientConfig Hoarder *commonIface.ClientConfig }
Deprecated use Map[string]*commonIface.ClientConfig{}
func (SimpleConfigClients) Compat ¶
func (s SimpleConfigClients) Compat() map[string]*commonIface.ClientConfig
type Universe ¶
type Universe struct {
// contains filtered or unexported fields
}
func GetUniverse ¶
func (*Universe) CreateSimpleNode ¶
func (*Universe) KillNodeByNameID ¶
func (*Universe) ListNumber ¶
func (*Universe) RunFixture ¶
func (*Universe) Service ¶
func (u *Universe) Service(name string, config *commonIface.ServiceConfig) error
func (*Universe) StartWithConfig ¶
Start universe based on config
func (*Universe) SubstrateByPid ¶
type UniverseConfig ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.