scenario

package
v0.0.0-...-1a96828 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(scenario string, apps ...string) (string, *errs.OctlError)

func GitClone

func GitClone(repo, user string) (string, *errs.OctlError)

func GitPush

func GitPush(repo, user string) (string, *errs.OctlError)

func ScenarioApply

func ScenarioApply(ctx context.Context, scenFolder string, target string, message string) ([]string, *errs.OctlError)

func ScenarioCommit

func ScenarioCommit(ctx context.Context, configuration *ScenarioConfigModel, message string) ([]string, *errs.OctlError)

func ScenarioCreate

func ScenarioCreate(ctx context.Context, name, description string) ([]string, *errs.OctlError)

func ScenarioDelete

func ScenarioDelete(ctx context.Context, name string) ([]string, *errs.OctlError)

func ScenarioFix

func ScenarioFix(name string) (string, *errs.OctlError)

func ScenarioInfo

func ScenarioInfo(name string) ([]byte, *errs.OctlError)

func ScenarioPrepare

func ScenarioPrepare(ctx context.Context, configuration *ScenarioConfigModel, message string) ([]string, *errs.OctlError)

func ScenarioPurge

func ScenarioPurge(ctx context.Context, configuration *ScenarioConfigModel) ([]string, *errs.OctlError)

func ScenarioReset

func ScenarioReset(name string, version string, message string) (string, *errs.OctlError)

func ScenarioRun

func ScenarioRun(ctx context.Context, configuration *ScenarioConfigModel, target string) ([]string, *errs.OctlError)

func ScenarioUpdate

func ScenarioUpdate(ctx context.Context, name, message string) ([]string, *errs.OctlError)

func ScenarioVersion

func ScenarioVersion(name string, offset, limit int) ([]byte, *errs.OctlError)

func ScenariosInfo

func ScenariosInfo() ([][]byte, *errs.OctlError)

Types

type ApplicationConfigModel

type ApplicationConfigModel struct {
	Name        string              `yaml:"name"`
	Description string              `yaml:"description"`
	ScriptPath  string              `yaml:"scriptpath"`
	SourcePath  string              `yaml:"sourcepath"`
	Nodes       []string            `yaml:"nodes"`
	Script      []ScriptConfigModel `yaml:"script"`
}

type NodeInfoText

type NodeInfoText struct {
	Name         string `json:"name"`
	Health       string `json:"health"`
	MsgConnState string `json:"msg_conn"`
	OnlineTime   string `json:"online_time,omitempty"`
	OfflineTime  string `json:"offline_time,omitempty"`
	LastOnline   string `json:"last_active,omitempty"`
}

type NodesInfoText

type NodesInfoText struct {
	NodeInfoList []*NodeInfoText `json:"nodes"`
	Total        int             `json:"total"`
	Active       int             `json:"active"`
	Offline      int             `json:"offline"`
}

type ScenarioConfigModel

type ScenarioConfigModel struct {
	Name         string                   `yaml:"name"`
	Description  string                   `yaml:"description"`
	Applications []ApplicationConfigModel `yaml:"applications"`
}

type ScriptConfigModel

type ScriptConfigModel struct {
	Target string `yaml:"target"`
	File   string `yaml:"file"`
	Order  int    `yaml:"order"`
}

Jump to

Keyboard shortcuts

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